]> Gentwo Git Trees - linux/.git/commit
KVM: x86: Use KVM_REQ_RECALC_INTERCEPTS to react to CPUID updates
authorSean Christopherson <seanjc@google.com>
Wed, 6 Aug 2025 19:56:47 +0000 (12:56 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 18 Sep 2025 19:57:19 +0000 (12:57 -0700)
commit5a1a726e68ff256f564cf51ad21a96bceb4dd954
treeb704729a2afcb5cb60870cd54abcbff200fdf537
parent6057497336bbfabd3a2f632bba2cd2bfbcb7b304
KVM: x86: Use KVM_REQ_RECALC_INTERCEPTS to react to CPUID updates

Defer recalculating MSR and instruction intercepts after a CPUID update
via RECALC_INTERCEPTS to converge on RECALC_INTERCEPTS as the "official"
mechanism for triggering recalcs.  As a bonus, because KVM does a "recalc"
during vCPU creation, and every functional VMM sets CPUID at least once,
for all intents and purposes this saves at least one recalc.

Tested-by: Xudong Hao <xudong.hao@intel.com>
Link: https://lore.kernel.org/r/20250806195706.1650976-26-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/cpuid.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c