diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2020-09-24 13:41:58 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-09-28 07:57:25 -0400 |
commit | 28e2b2f1a40dbada5740fdd83e8645949d1c8db6 (patch) | |
tree | 7e504c9cea6461fae4b33886af454ccc46ada3d5 /arch/x86/kvm/vmx/vmx.c | |
parent | 14e3dd8d256b7a7a281ac18a65e3c8cc9573ec88 (diff) | |
download | lwn-28e2b2f1a40dbada5740fdd83e8645949d1c8db6.tar.gz lwn-28e2b2f1a40dbada5740fdd83e8645949d1c8db6.zip |
KVM: VMX: Do not perform emulation for INVD intercept
The INVD instruction is emulated as a NOP, just skip the instruction
instead.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <addd41be2fbf50f5f4059e990a2a0cff182d2136.1600972918.git.thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx/vmx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 1eeafec6c791..dc74bb62d1df 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -5127,7 +5127,8 @@ static int handle_vmcall(struct kvm_vcpu *vcpu) static int handle_invd(struct kvm_vcpu *vcpu) { - return kvm_emulate_instruction(vcpu, 0); + /* Treat an INVD instruction as a NOP and just skip it. */ + return kvm_skip_emulated_instruction(vcpu); } static int handle_invlpg(struct kvm_vcpu *vcpu) |