On Wed, May 09, 2018 at 01:37:14PM -0700, Jim Mattson wrote: > If there is a possibility that a VM may migrate to a Skylake host, > then the hypervisor should report IA32_ARCH_CAPABILITIES.RSBA[bit 2] > as being set. This implies that Could you change the commit description a bit perhaps? Say: s/"as being set"/"as being set (future work of course)"/ > CPUID.(EAX=7,ECX=0):EDX.ARCH_CAPABILITIES[bit 29] should be > set. Therefore, kvm should report this CPUID bit as being supported > whether or not the host supports it. Userspace is still free to clear > the bit if it chooses. Can you also include: From Retpoline-A-Branch-Target-Injection-Mitigation.pdf A copy of this document is available at https://bugzilla.kernel.org/show_bug.cgi?id=199511 > > Since the IA32_ARCH_CAPABILITIES MSR is emulated in kvm, there is no > dependency on hardware support for this feature. with that. Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Thank you! > > Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx> > --- > arch/x86/kvm/cpuid.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c > index 82055b90a8b3..beadfe6e6893 100644 > --- a/arch/x86/kvm/cpuid.c > +++ b/arch/x86/kvm/cpuid.c > @@ -495,6 +495,11 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, > entry->ecx &= ~F(PKU); > entry->edx &= kvm_cpuid_7_0_edx_x86_features; > cpuid_mask(&entry->edx, CPUID_7_EDX); > + /* > + * We emulate ARCH_CAPABILITIES in software even > + * if the host doesn't support it. > + */ > + entry->edx |= F(ARCH_CAPABILITIES); > } else { > entry->ebx = 0; > entry->ecx = 0; > -- > 2.17.0.441.gb46fe60e1d-goog >