]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Add NMI support for an SEV-ES guest
authorTom Lendacky <thomas.lendacky@amd.com>
Mon, 14 Dec 2020 16:16:03 +0000 (11:16 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 15 Dec 2020 10:20:56 +0000 (05:20 -0500)
commit48b2281b4970ac3a2ff537a9c2d0f721e5b134b8
tree948dd61c64f02e4f0fb89b60fe4b48af4a06f3b8
parent2f43e8a68a1357fe6b2cf1c4b28df629fa152e03
KVM: SVM: Add NMI support for an SEV-ES guest

The GHCB specification defines how NMIs are to be handled for an SEV-ES
guest. To detect the completion of an NMI the hypervisor must not
intercept the IRET instruction (because a #VC while running the NMI will
issue an IRET) and, instead, must receive an NMI Complete exit event from
the guest.

Update the KVM support for detecting the completion of NMIs in the guest
to follow the GHCB specification. When an SEV-ES guest is active, the
IRET instruction will no longer be intercepted. Now, when the NMI Complete
exit event is received, the iret_interception() function will be called
to simulate the completion of the NMI.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <5ea3dd69b8d4396cefdc9048ebc1ab7caa70a847.1607620209.git.thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c
arch/x86/kvm/svm/svm.c