Re: [libvirt] [PATCH] support XEN_SYSCTL_INTERFACE_VERSION

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

 



On Tue, Jan 26, 2010 at 11:34:28PM -0700, Jim Fehlig wrote:
> xen-unstable c/s 20762 bumped XEN_SYSCTL_INTERFACE_VERSION to 7.  I
> don't see how the interface change affects libvirt, other than failing
> xenHypervisorInit() since version 7 is not tried.
> 
> The attached patch accommodates the upcoming Xen 4.0 release by checking
> for XEN_SYSCTL_INTERFACE_VERSION 7.  If found, it sets
> XEN_DOMCTL_INTERFACE_VERSION to 6, which is also new to Xen 4.0.
> 
> Regards,
> Jim

> Index: libvirt-0.7.4/src/xen/xen_hypervisor.c
> ===================================================================
> --- libvirt-0.7.4.orig/src/xen/xen_hypervisor.c
> +++ libvirt-0.7.4/src/xen/xen_hypervisor.c
> @@ -2100,12 +2100,14 @@ xenHypervisorInit(void)
>              DEBUG0("Using hypervisor call v2, sys ver6 dom ver5\n");
>              goto done;
>          }
> -        /* Xen 4.0 */
> +    }
> +
> +    /* Xen 4.0 */
> +    sys_interface_version = 7; /* XEN_SYSCTL_INTERFACE_VERSION */
> +    if (virXen_getdomaininfo(fd, 0, &info) == 1) {
>          dom_interface_version = 6; /* XEN_DOMCTL_INTERFACE_VERSION */
> -        if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
> -            DEBUG0("Using hypervisor call v2, sys ver6 dom ver6\n");
> -            goto done;
> -        }
> +        DEBUG0("Using hypervisor call v2, sys ver7 dom ver6\n");
> +        goto done;
>      }
>  
>      hypervisor_version = 1;


ACK

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]