OSDN Git Service

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)
commit7607b7174405aec7441ff6c970833c463114040a
treeb507a9bd87b758a01a532ac98814f614bffd3b38
parent3e233385ef4a217a2812115ed84d4be36eb16817
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