Re: [PATCH] KVM: x86: Fix emulated CPUID features being applied to wrong sub-leaf
From: Sean Christopherson
Date: Tue Jul 14 2026 - 14:45:34 EST
On Tue, 09 Jun 2026 15:57:48 +0800, Binbin Wu wrote:
> Pass the CPUID index into cpuid_func_emulated() and return no emulated
> features for indexed CPUID leaves with a non-zero index.
>
> KVM currently emulates CPUID features only for index 0, but
> kvm_vcpu_after_set_cpuid() looks up emulated features by function alone.
> As a result, reverse_cpuid[] entries that share a function but use a
> non-zero index, e.g. CPUID.7.1:ECX, can inherit emulated features that
> belong to index 0. For example, RDPID, which is CPUID.7.0:ECX[22], can
> be incorrectly OR'd into CPUID.7.1:ECX.
>
> [...]
Applied to kvm-x86 misc, thanks!
[1/1] KVM: x86: Fix emulated CPUID features being applied to wrong sub-leaf
https://github.com/kvm-x86/linux/commit/8835a24a5608
--
https://github.com/kvm-x86/linux/tree/next