|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [RFC PATCH 4/4] libxl: Add support for enabling physaddr_abi
Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
---
tools/include/libxl.h | 5 +++++
tools/libs/light/libxl_create.c | 4 ++++
tools/libs/light/libxl_types.idl | 1 +
tools/xl/xl_parse.c | 1 +
4 files changed, 11 insertions(+)
diff --git a/tools/include/libxl.h b/tools/include/libxl.h
index b7ad7735ca..6af9a658c9 100644
--- a/tools/include/libxl.h
+++ b/tools/include/libxl.h
@@ -178,6 +178,11 @@
*/
#define LIBXL_HAVE_BUILDINFO_EVENT_CHANNELS 1
+/*
+ * The libxl_domain_build_info has physaddr_abi field.
+ */
+#define LIBXL_HAVE_BUILDINFO_PHYS_ADDR_ABI 1
+
/*
* libxl_domain_build_info has the u.hvm.ms_vm_genid field.
*/
diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c
index e03599ea99..43e8c18768 100644
--- a/tools/libs/light/libxl_create.c
+++ b/tools/libs/light/libxl_create.c
@@ -466,6 +466,7 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
libxl_defbool_setdefault(&b_info->apic, true);
libxl_defbool_setdefault(&b_info->nested_hvm, false);
+ libxl_defbool_setdefault(&b_info->physaddr_abi, false);
}
if (b_info->max_grant_version == LIBXL_MAX_GRANT_DEFAULT) {
@@ -662,6 +663,9 @@ int libxl__domain_make(libxl__gc *gc, libxl_domain_config
*d_config,
if ( libxl_defbool_val(b_info->nested_hvm) )
create.flags |= XEN_DOMCTL_CDF_nested_virt;
+
+ if (libxl_defbool_val(b_info->physaddr_abi))
+ create.flags |= XEN_DOMCTL_CDF_physaddr_abi;
}
if (libxl_defbool_val(b_info->vpmu))
diff --git a/tools/libs/light/libxl_types.idl b/tools/libs/light/libxl_types.idl
index 9bb2969931..d02e84471b 100644
--- a/tools/libs/light/libxl_types.idl
+++ b/tools/libs/light/libxl_types.idl
@@ -637,6 +637,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
("nested_hvm", libxl_defbool),
("apic", libxl_defbool),
("dm_restrict", libxl_defbool),
+ ("physaddr_abi", libxl_defbool),
("tee", libxl_tee_type),
("u", KeyedUnion(None, libxl_domain_type, "type",
[("hvm", Struct(None, [("firmware", string),
diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index 089a88935a..bd674684fa 100644
--- a/tools/xl/xl_parse.c
+++ b/tools/xl/xl_parse.c
@@ -1803,6 +1803,7 @@ void parse_config_data(const char *config_source,
}
xlu_cfg_get_defbool(config, "nestedhvm", &b_info->nested_hvm, 0);
+ xlu_cfg_get_defbool(config, "physaddr_abi", &b_info->physaddr_abi, 0);
switch(b_info->type) {
case LIBXL_DOMAIN_TYPE_HVM:
--
2.47.2
Teddy Astie | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |