Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
# HG changeset patch
# User andre.przywara@xxxxxxx
# Date 1186489698 -7200
# Node ID 0534ec5aa830c665ac95bc0750a22cd6c5413733
# Parent c362bcee8047d3d30b8c7655d26d8a8702371b6f
added numanodes=n config file option
diff -r c362bcee8047 -r 0534ec5aa830 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Sun Aug 12 16:09:13 2007 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Tue Aug 07 14:28:18 2007 +0200
@@ -537,14 +537,16 @@ static PyObject *pyxc_hvm_build(XcObject
#endif
char *image;
int store_evtchn, memsize, vcpus = 1, pae = 0, acpi = 0, apic = 1;
+ int numanodes = 0;
unsigned long store_mfn;
static char *kwd_list[] = { "domid", "store_evtchn",
"memsize", "image", "vcpus", "pae", "acpi",
- "apic", NULL };
- if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiis|iiii", kwd_list,
+ "apic", "numanodes", NULL };
+ if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiis|iiiii", kwd_list,
&dom, &store_evtchn, &memsize,
- &image, &vcpus, &pae, &acpi, &apic) )
+ &image, &vcpus, &pae, &acpi, &apic,
+ &numanodes) )
return NULL;
if ( xc_hvm_build(self->xc_handle, dom, memsize, image) != 0 )
@@ -564,6 +566,7 @@ static PyObject *pyxc_hvm_build(XcObject
va_hvm->acpi_enabled = acpi;
va_hvm->apic_mode = apic;
va_hvm->nr_vcpus = vcpus;
+ va_hvm->numanodes = numanodes;
for ( i = 0, sum = 0; i < va_hvm->length; i++ )
sum += ((uint8_t *)va_hvm)[i];
va_hvm->checksum = -sum;
diff -r c362bcee8047 -r 0534ec5aa830 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py Sun Aug 12 16:09:13 2007 +0100
+++ b/tools/python/xen/xend/XendConfig.py Tue Aug 07 14:28:18 2007 +0200
@@ -124,6 +124,7 @@ LEGACY_CFG_TO_XENAPI_CFG = reverse_dict(
# Platform configuration keys.
XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'boot', 'device_model', 'display',
'fda', 'fdb', 'keymap', 'isa', 'localtime', 'monitor',
+ 'numanodes',
'nographic', 'pae', 'rtc_timeoffset', 'serial', 'sdl',
'soundhw','stdvga', 'usb', 'usbdevice', 'vnc',
'vncconsole', 'vncdisplay', 'vnclisten',
diff -r c362bcee8047 -r 0534ec5aa830 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py Sun Aug 12 16:09:13 2007 +0100
+++ b/tools/python/xen/xend/image.py Tue Aug 07 14:28:18 2007 +0200
@@ -277,6 +277,7 @@ class HVMImageHandler(ImageHandler):
self.pae = int(vmConfig['platform'].get('pae', 0))
self.apic = int(vmConfig['platform'].get('apic', 0))
self.acpi = int(vmConfig['platform'].get('acpi', 0))
+ self.numanodes = int(vmConfig['platform'].get('numanodes', 0))
def buildDomain(self):
@@ -292,6 +293,7 @@ class HVMImageHandler(ImageHandler):
log.debug("pae = %d", self.pae)
log.debug("acpi = %d", self.acpi)
log.debug("apic = %d", self.apic)
+ log.debug("numanodes = %d", self.numanodes)
rc = xc.hvm_build(domid = self.vm.getDomid(),
image = self.kernel,
@@ -300,6 +302,7 @@ class HVMImageHandler(ImageHandler):
vcpus = self.vm.getVCpuCount(),
pae = self.pae,
acpi = self.acpi,
+ numanodes = self.numanodes,
apic = self.apic)
rc['notes'] = { 'SUSPEND_CANCEL': 1 }
return rc
diff -r c362bcee8047 -r 0534ec5aa830 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py Sun Aug 12 16:09:13 2007 +0100
+++ b/tools/python/xen/xm/create.py Tue Aug 07 14:28:18 2007 +0200
@@ -201,6 +201,10 @@ gopts.var('apic', val='APIC',
gopts.var('apic', val='APIC',
fn=set_int, default=1,
use="Disable or enable APIC mode.")
+
+gopts.var('numanodes', val='NUMANODES',
+ fn=set_int, default=0,
+ use="Number of NUMA nodes in the domain.")
gopts.var('vcpus', val='VCPUS',
fn=set_int, default=1,
@@ -721,7 +725,7 @@ def configure_hvm(config_image, vals):
'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
- 'acpi', 'apic', 'usb', 'usbdevice', 'keymap' ]
+ 'acpi', 'apic', 'numanodes', 'usb', 'usbdevice', 'keymap' ]
for a in args:
if a in vals.__dict__ and vals.__dict__[a] is not None:
config_image.append([a, vals.__dict__[a]])
diff -r c362bcee8047 -r 0534ec5aa830 tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py Sun Aug 12 16:09:13 2007 +0100
+++ b/tools/python/xen/xm/xenapi_create.py Tue Aug 07 14:28:18 2007 +0200
@@ -821,7 +821,7 @@ class sxp2xml:
def extract_platform(self, image, document):
- platform_keys = ['acpi', 'apic', 'pae']
+ platform_keys = ['acpi', 'apic', 'pae', 'numanodes']
def extract_platform_key(key):
platform = document.createElement("platform")
diff -r c362bcee8047 -r 0534ec5aa830 xen/include/public/hvm/hvm_info_table.h
--- a/xen/include/public/hvm/hvm_info_table.h Sun Aug 12 16:09:13 2007 +0100
+++ b/xen/include/public/hvm/hvm_info_table.h Tue Aug 07 14:28:18 2007 +0200
@@ -36,6 +36,7 @@ struct hvm_info_table {
uint8_t acpi_enabled;
uint8_t apic_mode;
uint32_t nr_vcpus;
+ uint32_t numanodes;
};
#endif /* __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ */
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|