tools/libxc: Drop dombuilder support for PV autotranslate guests
PATCH 1/1 tools/libxc: Drop dombuilder support for PV autotranslate guests
c/s 4045953 "x86/paging: Enforce PG_external == PG_translate == PG_refcounts" in the hypervisor finally prevented the construction of PV autotranslate guests.
Remove support for such guests in the domain builder, bailing out with an obvious "no longer supported" message, rather than a more obscure "SHADOW_OP_ENABLED failed".
As a piece of cleanup, rename xc_dom_feature_translated() to xc_dom_translated() to match its actual semantics.
---
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
--- tools/libxc/include/xc_dom.h | 5 +- tools/libxc/xc_dom_arm.c | 6 +- tools/libxc/xc_dom_boot.c | 2 +- tools/libxc/xc_dom_x86.c | 133 ++++++++----------------------------------- tools/libxl/libxl_dom.c | 2 +- 5 files changed, 30 insertions(+), 118 deletions(-)
tools/libxc/include/xc_dom.h +2 -3
@@ -168,7 +168,6 @@ struct xc_dom_image {xc_interface *xch;domid_t guest_domid;int claim_enabled;/* 0 by default, 1 enables it */ -int shadow_enabled;int xen_version;xen_capabilities_info_t xen_caps;
@@ -334,7 +333,7 @@ int xc_dom_gnttab_seed(xc_interface *xch, domid_t domid,xen_pfn_t xenstore_gmfn, domid_t console_domid, domid_t xenstore_domid); -int xc_dom_feature_translated (struct xc_dom_image *dom); +bool xc_dom_translated (const struct xc_dom_image *dom);/* --- debugging bits ---------------------------------------------- */
@@ -420,7 +419,7 @@ static inline void *xc_dom_vaddr_to_ptr(struct xc_dom_image *dom,static inline xen_pfn_t xc_dom_p2m (struct xc_dom_image *dom,xen_pfn_t pfn) { -if ( dom->shadow_enabled ||xc_dom_feature_translated (dom) ) +if (xc_dom_translated (dom) )return pfn;if (pfn < dom->rambase_pfn || pfn >= dom->rambase_pfn + dom->total_pages)return INVALID_MFN ;
tools/libxc/xc_dom_arm.c +2 -4
@@ -419,8 +419,6 @@ static int meminit(struct xc_dom_image *dom)if ( rc )return rc; - dom->shadow_enabled =1 ; -for ( i =0 ; ramsize && i <GUEST_RAM_BANKS ; i++ ) {uint64_t banksize = ramsize > bankmax[i] ? bankmax[i] : ramsize;
@@ -504,9 +502,9 @@ static int meminit(struct xc_dom_image *dom)return 0 ; } -int xc_dom_feature_translated (struct xc_dom_image *dom) +bool xc_dom_translated (const struct xc_dom_image *dom) { -return 1 ; +return true; }/* ------------------------------------------------------------------------ */
tools/libxc/xc_dom_boot.c +1 -1
@@ -407,7 +407,7 @@ int xc_dom_gnttab_hvm_seed(xc_interface *xch, domid_t domid,int xc_dom_gnttab_init (struct xc_dom_image *dom) { -if (xc_dom_feature_translated (dom) ) { +if (xc_dom_translated (dom) ) {return xc_dom_gnttab_hvm_seed (dom->xch, dom->guest_domid, dom->console_pfn, dom->xenstore_pfn, dom->console_domid, dom->xenstore_domid);
tools/libxc/xc_dom_x86.c +24 -109
186 lines not on this page · raw message
tools/libxl/libxl_dom.c +1 -1
@@ -767,7 +767,7 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,if (ret !=0 ) goto out; -if (xc_dom_feature_translated (dom)) { +if (xc_dom_translated (dom)) { state->console_mfn = dom->console_pfn; state->store_mfn = dom->xenstore_pfn; }else {
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 8 lines · Andrew Cooper
c/s 4045953 "x86/paging: Enforce
PG_external==PG_translate==PG_refcounts" in the hypervisor finally prevented the construction of PV autotranslate guests.Remove support for such guests in the domain builder, bailing out with an obvious "no longer supported" message, rather than a more obscure "
SHADOW_OP_ENABLEDfailed".
Quoted 7 lines
As a piece of cleanup, rename
xc_dom_feature_translated()toxc_dom_translated()to match its actual semantics.Signed-off-by Andrew Cooper <[email protected]>---
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel