[PATCH] Support Xen sysctl version 9 in Xen 4.2

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

 



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 |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index fdc3071..3244bbd 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -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
-- 
1.7.10.4

--
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]