]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: install RSM intercept
authorBrijesh Singh <brijesh.singh@amd.com>
Mon, 19 Feb 2018 16:14:44 +0000 (10:14 -0600)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 24 Feb 2018 01:24:12 +0000 (02:24 +0100)
commitb0e2a6d7e34311fc41ab9b426f6d2202cdcb8af1
treeb507a9bd87b758a01a532ac98814f614bffd3b38
parenta58e3621dc427f66e73d0a18eb84c209052baad8
KVM: SVM: install RSM intercept

RSM instruction is used by the SMM handler to return from SMM mode.
Currently, rsm causes a #UD - which results in instruction fetch, decode,
and emulate. By installing the RSM intercept we can avoid the instruction
fetch since we know that #VMEXIT was due to rsm.

The patch is required for the SEV guest, because in case of SEV guest
memory is encrypted with guest-specific key and hypervisor will not
able to fetch the instruction bytes from the guest memory.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c