diff options
| author | Brijesh Singh <brijesh.singh@amd.com> | 2022-04-26 18:39:57 +0000 |
|---|---|---|
| committer | Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> | 2022-07-13 17:27:28 -0500 |
| commit | e097bfd27f7481cb08e058e203ad8dc2a917837b (patch) | |
| tree | 7602ff0753212cd43e2ef6fed192e4890551da7a /arch/x86/kvm/svm/svm.c | |
| parent | 5f3dee52b8d7b1b5fe7da95c6cc54730f5c0a6ba (diff) | |
| download | cachepc-linux-e097bfd27f7481cb08e058e203ad8dc2a917837b.tar.gz cachepc-linux-e097bfd27f7481cb08e058e203ad8dc2a917837b.zip | |
KVM: X86: Keep the NPT and RMP page level in sync
When running an SEV-SNP VM, the sPA used to index the RMP entry is
obtained through the NPT translation (gva->gpa->spa). The NPT page
level is checked against the page level programmed in the RMP entry.
If the page level does not match, then it will cause a nested page
fault with the RMP bit set to indicate the RMP violation.
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Diffstat (limited to 'arch/x86/kvm/svm/svm.c')
| -rw-r--r-- | arch/x86/kvm/svm/svm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 5dfcaea792e6..7728e3c11f0c 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -4738,6 +4738,7 @@ static struct kvm_x86_ops svm_x86_ops __initdata = { .vcpu_get_apicv_inhibit_reasons = avic_vcpu_get_apicv_inhibit_reasons, .alloc_apic_backing_page = svm_alloc_apic_backing_page, + .rmp_page_level_adjust = sev_rmp_page_level_adjust, }; /* |
