On Thu, Feb 28, 2008 at 01:52:00PM +0100, Jim Meyering wrote:
"Richard W.M. Jones" <rjones(a)redhat.com> wrote:
> On Thu, Feb 28, 2008 at 06:22:35AM -0500, Daniel Veillard wrote:
>> While testing against Xen-3.2 I found out that the Xen hypercalls
>> failed, this patches fixes it by checking the newer sysctl versions
>> when initializing the driver. I also merged the associated debugging
>> with the DEBUG from libvirt.c, to allow easier debugging of this issue.
>
> It's a bit tricky to understand this patch just by looking at it.
> After removing all the debug changes I get down to this:
>
>> sys_interface_version = 4; /* XEN_SYSCTL_INTERFACE_VERSION */
>> if (virXen_getdomaininfo(fd, 0, &info) == 1) {
>> - /* xen-unstable */
>> + /* Fedora 8 */
>> dom_interface_version = 5; /* XEN_DOMCTL_INTERFACE_VERSION */
>> if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
>> -#ifdef DEBUG
>> - fprintf(stderr, "Using hypervisor call v2, sys ver4 dom
ver5\n");
>> -#endif
>> + DEBUG0("Using hypervisor call v2, sys ver4 dom ver5\n");
>> + goto done;
>> + }
>> + }
>> +
>> + sys_interface_version = 6; /* XEN_SYSCTL_INTERFACE_VERSION */
>> + if (virXen_getdomaininfo(fd, 0, &info) == 1) {
>> + /* Xen 3.2, Fedora 9 */
>> + dom_interface_version = 5; /* XEN_DOMCTL_INTERFACE_VERSION */
>> + if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
>> + DEBUG0("Using hypervisor call v2, sys ver6 dom ver5\n");
>> goto done;
>> }
>> }
>
> The only change is to pass 6 to op->interface_version in the ioctl?
yes, add this as a new option in the hypercall sequence trial.
> Anyway, if it makes Xen 3.2 work, +1. I'm still fixing my
Rawhide box
> at the moment, so can't test this ...
Same here.
Well this can't break anything working :-)
Daniel
--
Red Hat Virtualization group
http://redhat.com/virtualization/
Daniel Veillard | virtualization library
http://libvirt.org/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit
http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine
http://rpmfind.net/