[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] [PATCH] Fix Xen-3.2 hypercalls



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?

Anyway, if it makes Xen 3.2 work, +1.  I'm still fixing my Rawhide box
at the moment, so can't test this ...

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]