On Tue, May 4, 2021 at 10:37 AM Jim Mattson <jmattson@xxxxxxxxxx> wrote: > > On Tue, May 4, 2021 at 10:17 AM Sean Christopherson <seanjc@xxxxxxxxxx> wrote: > > > > Clear KVM's RDPID capability if the ENABLE_RDTSCP secondary exec control is > > unsupported. Despite being enumerated in a separate CPUID flag, RDPID is > > bundled under the same VMCS control as RDTSCP and will #UD in VMX non-root > > if ENABLE_RDTSCP is not enabled. > > > > Fixes: 41cd02c6f7f6 ("kvm: x86: Expose RDPID in KVM_GET_SUPPORTED_CPUID") > > Cc: stable@xxxxxxxxxxxxxxx > > Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx> > > But KVM will happily emulate RDPID if the instruction causes a #UD > VM-exit, won't it? See commit fb6d4d340e05 (KVM: x86: emulate RDPID). Oh, after reading the second patch, I now see why this is needed. You mispelled 'advertise' in the summary line. Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>