KVM: SVM: Add a dedicated INVD intercept routine
authorTom Lendacky <thomas.lendacky@amd.com>
Thu, 24 Sep 2020 18:41:57 +0000 (13:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 15:36:31 +0000 (17:36 +0200)
commit15f6c3869c6c44031337a49879f02a49f7c9a23a
treec137bdbb6b42edf69812a702ea71098d85b45787
parentef4f69a4682462e19375f3d4c4c3448ce0bced1e
KVM: SVM: Add a dedicated INVD intercept routine

[ Upstream commit 4bb05f30483fd21ea5413eaf1182768f251cf625 ]

The INVD instruction intercept performs emulation. Emulation can't be done
on an SEV guest because the guest memory is encrypted.

Provide a dedicated intercept routine for the INVD intercept. And since
the instruction is emulated as a NOP, just skip it instead.

Fixes: 1654efcbc431 ("KVM: SVM: Add KVM_SEV_INIT command")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <a0b9a19ffa7fef86a3cc700c7ea01cb2731e04e5.1600972918.git.thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/svm/svm.c