x86/msr: Offer CPUID Faulting to PVH control domains

The control domain exclusion for CPUID Faulting predates dom0 PVH, but the
reason for the exclusion (to allow the domain builder to see host CPUID
values) isn't applicable.

The domain builder *is* broken in PVH control domains, and restricting the use
of CPUID Faulting doesn't make it any less broken.  Tweak the logic to only
exclude PV control domains.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
Andrew Cooper committed 2019-09-26 13:40:18 +01:00
1 parent 433387661e
commit ff78e50084
2 files changed
+5 -4

No files matched your search

+3 -2
View File
@@ -169,7 +169,7 @@ void ctxt_switch_levelling(const struct vcpu *next)
if (nextd && is_idle_domain(nextd))
return;
/*
* We *should* be enabling faulting for the control domain.
* We *should* be enabling faulting for PV control domains.
*
* Unfortunately, the domain builder (having only ever been a
* PV guest) expects to be able to see host cpuid state in a
@@ -184,7 +184,8 @@ void ctxt_switch_levelling(const struct vcpu *next)
* generating the maximum full cpuid policy into Xen, at which
* this problem will disappear.
*/
set_cpuid_faulting(nextd && !is_control_domain(nextd) &&
set_cpuid_faulting(nextd && (!is_control_domain(nextd) ||
!is_pv_domain(nextd)) &&
(is_pv_domain(nextd) ||
next->arch.msrs->
misc_features_enables.cpuid_faulting));
+2 -2
View File
@@ -91,8 +91,8 @@ int init_domain_msr_policy(struct domain *d)
if ( !mp )
return -ENOMEM;
/* See comment in intel_ctxt_switch_levelling() */
if ( is_control_domain(d) )
/* See comment in ctxt_switch_levelling() */
if ( is_control_domain(d) && is_pv_domain(d) )
mp->platform_info.cpuid_faulting = false;
d->arch.msr = mp;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.