[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 7/8] tools, libxl: add helpers to establish if guest is auto-translated
This commit adds, for each architecture supported by libxl, a helper function which establishes if a domain uses an auto-translated physmap from the libxl_domain_config structure related to it. Signed-off-by: Arianna Avanzini <avanzini.arianna@xxxxxxxxx> Cc: Dario Faggioli <dario.faggioli@xxxxxxxxxx> Cc: Paolo Valente <paolo.valente@xxxxxxxxxx> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Cc: Julien Grall <julien.grall@xxxxxxxxxx> Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx> Cc: Jan Beulich <JBeulich@xxxxxxxx> Cc: Keir Fraser <keir@xxxxxxx> Cc: Tim Deegan <tim@xxxxxxx> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Cc: Eric Trudeau <etrudeau@xxxxxxxxxxxx> Cc: Viktor Kleinik <viktor.kleinik@xxxxxxxxxxxxxxx> --- tools/libxl/libxl_arch.h | 2 ++ tools/libxl/libxl_arm.c | 5 +++++ tools/libxl/libxl_x86.c | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/tools/libxl/libxl_arch.h b/tools/libxl/libxl_arch.h index aee0a91..963d98b 100644 --- a/tools/libxl/libxl_arch.h +++ b/tools/libxl/libxl_arch.h @@ -22,4 +22,6 @@ int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config *d_config, int libxl__arch_domain_configure(libxl__gc *gc, libxl_domain_build_info *info, struct xc_dom_image *dom); + +int libxl__arch_auto_translated_physmap(libxl_domain_config *d_config); #endif diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index 0cfd0cf..637f906 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -11,6 +11,11 @@ int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config *d_config, return 0; } +int libxl__arch_auto_translated_physmap(libxl_domain_config *d_config) +{ + return 1; +} + static struct arch_info { const char *guest_type; const char *timer_compat; diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c index b11d036..c6f9c68 100644 --- a/tools/libxl/libxl_x86.c +++ b/tools/libxl/libxl_x86.c @@ -317,3 +317,9 @@ int libxl__arch_domain_configure(libxl__gc *gc, { return 0; } + +int libxl__arch_auto_translated_physmap(libxl_domain_config *d_config) +{ + return (d_config->b_info.type == LIBXL_DOMAIN_TYPE_HVM || + libxl_defbool_val(d_config->c_info.pvh)); +} -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |