2010-07-15 00:43:11 +02:00
|
|
|
--- a/tools/python/xen/lowlevel/xc/xc.c
|
|
|
|
+++ b/tools/python/xen/lowlevel/xc/xc.c
|
2010-04-26 23:23:48 +02:00
|
|
|
@@ -944,16 +944,16 @@ static PyObject *pyxc_hvm_build(XcObject
|
2010-03-02 01:46:54 +01:00
|
|
|
#endif
|
2010-03-02 01:46:56 +01:00
|
|
|
int i;
|
2008-03-06 02:36:51 +01:00
|
|
|
char *image;
|
2009-05-04 18:38:09 +02:00
|
|
|
- int memsize, target=-1, vcpus = 1, acpi = 0, apic = 1;
|
2009-10-12 16:04:55 +02:00
|
|
|
+ int memsize, target=-1, vcpus = 1, acpi = 0, apic = 1, extid = 0;
|
2010-03-02 01:46:56 +01:00
|
|
|
PyObject *vcpu_avail_handle = NULL;
|
|
|
|
uint8_t vcpu_avail[(HVM_MAX_VCPUS + 7)/8];
|
2008-03-06 02:36:51 +01:00
|
|
|
|
|
|
|
static char *kwd_list[] = { "domid",
|
2010-01-16 01:12:54 +01:00
|
|
|
- "memsize", "image", "target", "vcpus",
|
|
|
|
- "vcpu_avail", "acpi", "apic", NULL };
|
2010-03-02 01:46:56 +01:00
|
|
|
- if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iis|iiOii", kwd_list,
|
2010-01-16 01:12:54 +01:00
|
|
|
+ "memsize", "image", "target", "vcpus",
|
|
|
|
+ "vcpu_avail", "extid", "acpi", "apic", NULL };
|
2010-03-02 01:46:56 +01:00
|
|
|
+ if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iis|iiOiii", kwd_list,
|
2009-10-12 16:04:55 +02:00
|
|
|
&dom, &memsize, &image, &target, &vcpus,
|
2010-03-02 01:46:56 +01:00
|
|
|
- &vcpu_avail_handle, &acpi, &apic) )
|
|
|
|
+ &vcpu_avail_handle, &extid, &acpi, &apic) )
|
2008-03-06 02:36:51 +01:00
|
|
|
return NULL;
|
|
|
|
|
2010-03-02 01:46:56 +01:00
|
|
|
memset(vcpu_avail, 0, sizeof(vcpu_avail));
|
2010-04-26 23:23:48 +02:00
|
|
|
@@ -1005,6 +1005,7 @@ static PyObject *pyxc_hvm_build(XcObject
|
2009-05-04 18:38:09 +02:00
|
|
|
va_hvm->checksum -= sum;
|
2008-03-06 02:36:51 +01:00
|
|
|
munmap(va_map, XC_PAGE_SIZE);
|
|
|
|
#endif
|
|
|
|
+ xc_set_hvm_param(self->xc_handle, dom, HVM_PARAM_EXTEND_HYPERVISOR, extid);
|
|
|
|
|
|
|
|
return Py_BuildValue("{}");
|
|
|
|
}
|
2010-07-15 00:43:11 +02:00
|
|
|
--- a/tools/python/xen/xend/XendConfig.py
|
|
|
|
+++ b/tools/python/xen/xend/XendConfig.py
|
2010-03-02 01:46:56 +01:00
|
|
|
@@ -151,6 +151,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
|
2008-03-15 00:07:14 +01:00
|
|
|
'nographic': int,
|
2010-01-16 01:12:54 +01:00
|
|
|
'nomigrate': int,
|
2008-03-15 00:07:14 +01:00
|
|
|
'pae' : int,
|
2010-01-16 01:12:54 +01:00
|
|
|
+ 'extid': int,
|
2008-03-15 00:07:14 +01:00
|
|
|
'rtc_timeoffset': int,
|
2010-01-16 01:12:54 +01:00
|
|
|
'parallel': str,
|
2008-03-15 00:07:14 +01:00
|
|
|
'serial': str,
|
2010-07-15 00:43:11 +02:00
|
|
|
--- a/tools/python/xen/xend/image.py
|
|
|
|
+++ b/tools/python/xen/xend/image.py
|
2010-03-02 01:46:56 +01:00
|
|
|
@@ -839,6 +839,7 @@ class HVMImageHandler(ImageHandler):
|
2008-03-06 02:36:51 +01:00
|
|
|
|
|
|
|
self.apic = int(vmConfig['platform'].get('apic', 0))
|
|
|
|
self.acpi = int(vmConfig['platform'].get('acpi', 0))
|
2008-09-12 17:57:53 +02:00
|
|
|
+ self.extid = int(vmConfig['platform'].get('extid', 0))
|
2008-03-06 02:36:51 +01:00
|
|
|
self.guest_os_type = vmConfig['platform'].get('guest_os_type')
|
2010-01-16 01:12:54 +01:00
|
|
|
self.memory_sharing = int(vmConfig['memory_sharing'])
|
2010-07-15 00:43:11 +02:00
|
|
|
try:
|
|
|
|
@@ -966,6 +967,7 @@ class HVMImageHandler(ImageHandler):
|
2009-05-04 18:38:09 +02:00
|
|
|
log.debug("target = %d", mem_mb)
|
2008-03-06 02:36:51 +01:00
|
|
|
log.debug("vcpus = %d", self.vm.getVCpuCount())
|
2010-01-16 01:12:54 +01:00
|
|
|
log.debug("vcpu_avail = %li", self.vm.getVCpuAvail())
|
2008-09-12 17:57:53 +02:00
|
|
|
+ log.debug("extid = %d", self.extid)
|
2008-03-06 02:36:51 +01:00
|
|
|
log.debug("acpi = %d", self.acpi)
|
|
|
|
log.debug("apic = %d", self.apic)
|
|
|
|
|
2010-07-15 00:43:11 +02:00
|
|
|
@@ -975,6 +977,7 @@ class HVMImageHandler(ImageHandler):
|
2009-05-04 18:38:09 +02:00
|
|
|
target = mem_mb,
|
2008-03-06 02:36:51 +01:00
|
|
|
vcpus = self.vm.getVCpuCount(),
|
2010-01-16 01:12:54 +01:00
|
|
|
vcpu_avail = self.vm.getVCpuAvail(),
|
2008-09-12 17:57:53 +02:00
|
|
|
+ extid = self.extid,
|
2008-03-06 02:36:51 +01:00
|
|
|
acpi = self.acpi,
|
|
|
|
apic = self.apic)
|
|
|
|
rc['notes'] = { 'SUSPEND_CANCEL': 1 }
|
2010-07-15 00:43:11 +02:00
|
|
|
--- a/tools/python/xen/xm/create.py
|
|
|
|
+++ b/tools/python/xen/xm/create.py
|
2010-01-16 01:12:54 +01:00
|
|
|
@@ -242,6 +242,10 @@ gopts.var('viridian', val='VIRIDIAN',
|
2009-05-04 18:38:09 +02:00
|
|
|
use="""Expose Viridian interface to x86 HVM guest?
|
|
|
|
(Default is 0).""")
|
2008-03-06 02:36:51 +01:00
|
|
|
|
|
|
|
+gopts.var('extid', val='EXTID',
|
|
|
|
+ fn=set_int, default=0,
|
|
|
|
+ use="Specify extention ID for a HVM domain.")
|
|
|
|
+
|
|
|
|
gopts.var('acpi', val='ACPI',
|
|
|
|
fn=set_int, default=1,
|
|
|
|
use="Disable or enable ACPI of HVM domain.")
|
2010-05-14 00:42:02 +02:00
|
|
|
@@ -1083,7 +1087,7 @@ def configure_hvm(config_image, vals):
|
2010-01-16 01:12:54 +01:00
|
|
|
'timer_mode',
|
|
|
|
'usb', 'usbdevice',
|
|
|
|
'vcpus', 'vnc', 'vncconsole', 'vncdisplay', 'vnclisten',
|
|
|
|
- 'vncunused', 'viridian', 'vpt_align',
|
|
|
|
+ 'vncunused', 'viridian', 'extid', 'vpt_align',
|
|
|
|
'xauthority', 'xen_extended_power_mgmt', 'xen_platform_pci',
|
|
|
|
'memory_sharing' ]
|
|
|
|
|