mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-13 11:15:08 +00:00
* src/xend_internal.c: applied patch from Beth Kon to fix
NUMA topology for cells without CPUs Daniel
This commit is contained in:
parent
77cf0390e4
commit
aa826860bc
@ -1,3 +1,8 @@
|
|||||||
|
Mon Oct 8 17:01:53 CEST 2007 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
|
* src/xend_internal.c: applied patch from Beth Kon to fix
|
||||||
|
NUMA topology for cells without CPUs
|
||||||
|
|
||||||
Thu Oct 4 21:05:59 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
Thu Oct 4 21:05:59 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* src/xend_internal.c: Fix error handling for NUMA topology
|
* src/xend_internal.c: Fix error handling for NUMA topology
|
||||||
|
@ -1988,10 +1988,16 @@ sexpr_to_xend_topology_xml(virConnectPtr conn, struct sexpr *root, virBufferPtr
|
|||||||
offset++;
|
offset++;
|
||||||
/* get list of cpus associated w/ single cell */
|
/* get list of cpus associated w/ single cell */
|
||||||
while (1) {
|
while (1) {
|
||||||
if ((len = getNumber(offset, &cpuNum)) < 0) {
|
len = getNumber(offset, &cpuNum);
|
||||||
|
if (len < 0) {
|
||||||
|
if (!strncmp (offset, "no cpus", 7)){
|
||||||
|
*(cpuIdsPtr++) = -1;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
virXendError(conn, VIR_ERR_XEN_CALL, "topology string syntax error");
|
virXendError(conn, VIR_ERR_XEN_CALL, "topology string syntax error");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
offset += len;
|
offset += len;
|
||||||
next = *(offset);
|
next = *(offset);
|
||||||
if (next == '-') {
|
if (next == '-') {
|
||||||
@ -2058,6 +2064,8 @@ sexpr_to_xend_topology_xml(virConnectPtr conn, struct sexpr *root, virBufferPtr
|
|||||||
if (r == -1) goto vir_buffer_failed;
|
if (r == -1) goto vir_buffer_failed;
|
||||||
|
|
||||||
for (i = 0; i < cellCpuCount; i++) {
|
for (i = 0; i < cellCpuCount; i++) {
|
||||||
|
if (*(iCpuIdsPtr + i) == -1)
|
||||||
|
break;
|
||||||
r = virBufferVSprintf (xml, "\
|
r = virBufferVSprintf (xml, "\
|
||||||
<cpu id='%d'/>\n", *(iCpuIdsPtr + i));
|
<cpu id='%d'/>\n", *(iCpuIdsPtr + i));
|
||||||
if (r == -1) goto vir_buffer_failed;
|
if (r == -1) goto vir_buffer_failed;
|
||||||
|
Loading…
Reference in New Issue
Block a user