[opensuse-virtual] xen-tools-3.4.1_19718_01-11.1 bug in hvmloader setup (vcpu and extid args swapped)
One of the patches for novell_shim support breaks the marshalling of arguments between python and C code in one portion of the xen api. The effect of this bug is that the extid and vcpu parameters are swapped when constructing the environment for the hvmloader. The corrected hunk for the hv_tools.patch from the xen-3.4.1-testing SRPM is below. The correction is to swap the "&vcpus" and "&extid" arguments to PyArg_Parse_tupleAndKeywords() so the order matches the strings in the kwd_list. Without this change I could not boot a FreeBSD DomU as a vcpu of 0 (taken from extid being 0) prevents the hvmloader from creating local APIC entries in the MADT. Mucking with extid in an effort to cause vcpus to be set for the hvmloader, causes the Novell shim to be activated, which prevents FreeBSD from attaching to Xen for PV driver support (FreeBSD doesn't scan high enough yet in the cpuid space to see that XenVMM support has been shifted to a higher region). -- Justin Index: xen-3.4.1-testing/tools/python/xen/lowlevel/xc/xc.c =================================================================== --- xen-3.4.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c +++ xen-3.4.1-testing/tools/python/xen/lowlevel/xc/xc.c @@ -890,14 +890,14 @@ static PyObject *pyxc_hvm_build(XcObject int i; #endif char *image; - int memsize, target=-1, vcpus = 1, acpi = 0, apic = 1; + int memsize, target=-1, vcpus = 1, acpi = 0, apic = 1, extid=0; static char *kwd_list[] = { "domid", - "memsize", "image", "target", "vcpus", "acpi", - "apic", NULL }; - if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iis|iiii", kwd_list, - &dom, &memsize, &image, &target, &vcpus, - &acpi, &apic) ) + "memsize", "image", "target", "vcpus", "extid", + "acpi", "apic", NULL }; + if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iis|iiiii", kwd_list, + &dom, &memsize, &image, &target, &vcpus, + &extid, &acpi, &apic) ) return NULL; if ( target == -1 ) @@ -923,6 +923,7 @@ static PyObject *pyxc_hvm_build(XcObject va_hvm->checksum -= sum; munmap(va_map, XC_PAGE_SIZE); #endif + xc_set_hvm_param(self->xc_handle, dom, HVM_PARAM_EXTEND_HYPERVISOR, extid); return Py_BuildValue("{}"); } -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-virtual+help@opensuse.org
Justin T. Gibbs wrote:
One of the patches for novell_shim support breaks the marshalling of arguments between python and C code in one portion of the xen api. The effect of this bug is that the extid and vcpu parameters are swapped when constructing the environment for the hvmloader. The corrected hunk for the hv_tools.patch from the xen-3.4.1-testing SRPM is below. The correction is to swap the "&vcpus" and "&extid" arguments to PyArg_Parse_tupleAndKeywords() so the order matches the strings in the kwd_list.
Did you get that SRPM from 11.2 final? That bug was fixed in 11.2 RC1 IIRC. Regards, Jim -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-virtual+help@opensuse.org
On 11/12/2009 4:33 PM, Jim Fehlig wrote:
Justin T. Gibbs wrote:
One of the patches for novell_shim support breaks the marshalling of arguments between python and C code in one portion of the xen api.
...
Did you get that SRPM from 11.2 final? That bug was fixed in 11.2 RC1 IIRC.
No. I'm running 11.1 and pulled this SRPM from the virtualization repo. I mistakenly assumed it would be the latest. It's nice to know that this is already fixed. -- Justin -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-virtual+help@opensuse.org
participants (2)
-
Jim Fehlig
-
Justin T. Gibbs