]> Gentwo Git Trees - linux/.git/commit
KVM: x86: Add a fastpath handler for INVD
authorSean Christopherson <seanjc@google.com>
Tue, 5 Aug 2025 19:05:26 +0000 (12:05 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 19 Aug 2025 18:59:43 +0000 (11:59 -0700)
commit6c3d4b917995a17f515943ccd39ba11b81753b0d
tree2f9cae00847b25aab8909b7de6963b41933b3e19
parent8bb8b60c95c55c13f9924f3f090232e14d035d43
KVM: x86: Add a fastpath handler for INVD

Add a fastpath handler for INVD so that the common fastpath logic can be
trivially tested on both Intel and AMD.  Under KVM, INVD is always:
(a) intercepted, (b) available to the guest, and (c) emulated as a nop,
with no side effects.  Combined with INVD not having any inputs or outputs,
i.e. no register constraints, INVD is the perfect instruction for
exercising KVM's fastpath as it can be inserted into practically any
guest-side code stream.

Link: https://lore.kernel.org/r/20250805190526.1453366-19-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c
arch/x86/kvm/x86.h