>>> On 07.05.18 at 12:00, <andrew.coop...@citrix.com> wrote: > --- a/xen/arch/x86/pv/emul-priv-op.c > +++ b/xen/arch/x86/pv/emul-priv-op.c > @@ -867,9 +867,16 @@ static int read_msr(unsigned int reg, uint64_t *val, > return X86EMUL_OKAY; > > case MSR_EFER: > - *val = read_efer(); > + /* Hide unknown bits, and unconditionally hide SVME from guests. */ > + *val = read_efer() & EFER_KNOWN_MASK & ~EFER_SVME; > + /* > + * Hide the 64-bit features from 32-bit guests. SCE has > + * vendor-dependent behaviour. > + */ > if ( is_pv_32bit_domain(currd) ) > - *val &= ~(EFER_LME | EFER_LMA | EFER_LMSLE); > + *val &= ~(EFER_LME | EFER_LMA | EFER_LMSLE | > + (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL > + ? EFER_SCE : 0)); > return X86EMUL_OKAY;
Ideally this would check the domain's x86_vendor, but that would require wiring up emulation afaict, so fwiw Reviewed-by: Jan Beulich <jbeul...@suse.com> Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel