introduce numanodes=n config file option
PATCH 1/4 introduce numanodes=n config file option
Signed-off-by Andre Przywara <[email protected]>
# HG changeset patch
# User [email protected]
# Date 1186489698 -7200
# Node ID 0534ec5aa830c665ac95bc0750a22cd6c5413733 # Parent c362bcee8047d3d30b8c7655d26d8a8702371b6f added numanodes=n config file option
tools/python/xen/lowlevel/xc/xc.c +6 -3
@@ -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;
tools/python/xen/xend/XendConfig.py +1 -0
@@ -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',
tools/python/xen/xend/image.py +3 -0
@@ -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
tools/python/xen/xm/create.py +5 -1
@@ -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]])
tools/python/xen/xm/xenapi_create.py +1 -1
@@ -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")
xen/include/public/hvm/hvm_info_table.h +1 -0
@@ -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
[email protected]
http://lists.xensource.com/xen-devel