tools/libxc: Fix HVM_PARAM_PAE_ENABLED handling in xc_cpuid_apply_policy()
PATCH 1/1 tools/libxc: Fix HVM_PARAM_PAE_ENABLED handling in xc_cpuid_apply_policy()
Despite as suggested in c/s 685e922d6f3, not all HVM_PARAMs are handled in the same way. HVM_PARAM_PAE_ENABLED is a toolstack-only value, and the xc_cpuid_apply_policy() used to be the only consumer.
Reinstate the old behaviour (mad as it is) to avoid regressions.
---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Ian Jackson <[email protected]>
Spotted while trying to come up with a less mad behaviour, and wondering where the consumer had disappaered to.
This needs backporting to 4.13.
I was tempted to not fix it for the general security betterness of the world (disabling PAE disables NX and 64bit), and while I could probably get away with it, it would a little rude to do so.
--- tools/libxc/xc_cpuid_x86.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
tools/libxc/xc_cpuid_x86.c +12 -0
@@ -579,6 +579,8 @@ int xc_cpuid_apply_policy(xc_interface *xch, uint32_t domid, }else { +uint64_t val; +/* * Topology for HVM guests is entirely controlled by Xen. For now, we * hardcode APIC_ID = vcpu_id * 2 to give the illusion of no SMT.
@@ -633,6 +635,16 @@ int xc_cpuid_apply_policy(xc_interface *xch, uint32_t domid, }/* +* HVM_PARAM_PAE_ENABLED is a parameter to this function, stashed in +* Xen. Nothing else has ever taken notice of the value. +*/ + rc =xc_hvm_param_get (xch, domid,HVM_PARAM_PAE_ENABLED , &val); +if ( rc ) + goto out; + + p->basic.pae = val; + +/* * These settings are necessary to cause earlier HVM_PARAM_NESTEDHVM / * XEN_DOMCTL_disable_migrate settings to be reflected correctly in * CPUID. Xen will discard these bits if configuration hasn't been
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 7 lines · Andrew Cooper
Despite as suggested in c/s
685e922d6f3, not allHVM_PARAMsare handled in the same way.HVM_PARAM_PAE_ENABLEDis a toolstack-only value, and thexc_cpuid_apply_policy()used to be the only consumer.Reinstate the old behaviour (mad as it is) to avoid regressions.
Signed-off-by Andrew Cooper <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel