]> xenbits.xensource.com Git - libvirt.git/commitdiff
Support Xen sysctl version 9 in Xen 4.2
authorJim Fehlig <jfehlig@suse.com>
Wed, 26 Sep 2012 16:34:17 +0000 (10:34 -0600)
committerJim Fehlig <jfehlig@suse.com>
Wed, 26 Sep 2012 19:53:22 +0000 (13:53 -0600)
Xen upstream c/s 24102:dc8e55c9 bumped the sysctl version to 9.
Support this sysctl version in the xen_hypervisor sub-driver.

src/xen/xen_hypervisor.c

index fdc307161d7cc1ebd971c809dafcc5902ab000f3..3244bbdaa9a72601546930b15ce9a0ec6fc9beac 100644 (file)
@@ -2164,6 +2164,18 @@ xenHypervisorInit(struct xenHypervisorVersions *override_versions)
         goto done;
     }
 
+    /* Xen 4.2
+     * sysctl version 9 -> xen-unstable c/s 24102:dc8e55c90604
+     * domctl version 8 -> unchanged from Xen 4.1
+     */
+    hv_versions.sys_interface = 9; /* XEN_SYSCTL_INTERFACE_VERSION */
+    if (virXen_getdomaininfo(fd, 0, &info) == 1) {
+        hv_versions.dom_interface = 8; /* XEN_DOMCTL_INTERFACE_VERSION */
+        if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0){
+            VIR_DEBUG("Using hypervisor call v2, sys ver9 dom ver8");
+            goto done;
+        }
+    }
 
     /*
      * we failed to make the getdomaininfolist hypercall