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

[Xen-devel] [PATCH] fixup sysctl/libxl: choose a sane default for HAP



This delta wants folding to keep the Ocaml stubs in line.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Ian Jackson <Ian.Jackson@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Christian Lindig <christian.lindig@xxxxxxxxxx>
CC: Rob Hoes <Rob.Hoes@xxxxxxxxxx>
---
 tools/ocaml/libs/xc/xenctrl.ml      | 1 +
 tools/ocaml/libs/xc/xenctrl.mli     | 1 +
 tools/ocaml/libs/xc/xenctrl_stubs.c | 3 ++-
 xen/include/public/sysctl.h         | 2 +-
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml
index cd7e95a6fa..5da7c96cee 100644
--- a/tools/ocaml/libs/xc/xenctrl.ml
+++ b/tools/ocaml/libs/xc/xenctrl.ml
@@ -101,6 +101,7 @@ type physinfo_cap_flag =
        | CAP_HVM
        | CAP_PV
        | CAP_DirectIO
+       | CAP_HAP
 
 type physinfo =
 {
diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.mli
index 0bd06ed920..b4e76b827e 100644
--- a/tools/ocaml/libs/xc/xenctrl.mli
+++ b/tools/ocaml/libs/xc/xenctrl.mli
@@ -86,6 +86,7 @@ type physinfo_cap_flag =
   | CAP_HVM
   | CAP_PV
   | CAP_DirectIO
+  | CAP_HAP
 type physinfo = {
   threads_per_core : int;
   cores_per_socket : int;
diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c 
b/tools/ocaml/libs/xc/xenctrl_stubs.c
index ce8dbba437..10b306f9f8 100644
--- a/tools/ocaml/libs/xc/xenctrl_stubs.c
+++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
@@ -690,7 +690,8 @@ CAMLprim value stub_xc_physinfo(value xch)
        BUILD_BUG_ON(XEN_SYSCTL_PHYSCAP_hvm      != (1u <<  0));
        BUILD_BUG_ON(XEN_SYSCTL_PHYSCAP_pv       != (1u <<  1));
        BUILD_BUG_ON(XEN_SYSCTL_PHYSCAP_directio != (1u <<  2));
-       BUILD_BUG_ON(XEN_SYSCTL_PHYSCAP_MAX      != 
XEN_SYSCTL_PHYSCAP_directio);
+       BUILD_BUG_ON(XEN_SYSCTL_PHYSCAP_hap      != (1u <<  3));
+       BUILD_BUG_ON(XEN_SYSCTL_PHYSCAP_MAX      != XEN_SYSCTL_PHYSCAP_hap);
        cap_list = c_bitmap_to_ocaml_list(c_physinfo.capabilities);
 
        physinfo = caml_alloc_tuple(10);
diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h
index c325ae496c..d4b455619c 100644
--- a/xen/include/public/sysctl.h
+++ b/xen/include/public/sysctl.h
@@ -95,7 +95,7 @@ struct xen_sysctl_tbuf_op {
 #define XEN_SYSCTL_PHYSCAP_hap           (1u<<_XEN_SYSCTL_PHYSCAP_hap)
 
 /* Max XEN_SYSCTL_PHYSCAP_* constant.  Used for ABI checking. */
-#define XEN_SYSCTL_PHYSCAP_MAX XEN_SYSCTL_PHYSCAP_directio
+#define XEN_SYSCTL_PHYSCAP_MAX XEN_SYSCTL_PHYSCAP_hap
 
 struct xen_sysctl_physinfo {
     uint32_t threads_per_core;
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.