summaryrefslogtreecommitdiffstats
path: root/scripts/objdiff
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2022-04-26 18:16:07 +0000
committerSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>2022-07-13 17:27:27 -0500
commite725f9f5a6a8f8f3a9958e41b7069ae714349bc9 (patch)
treef41843a051493ef3c08bdab459b8a70a84d13f6f /scripts/objdiff
parentaef0d554a9c415d3a6edb1f0865084efef8d042c (diff)
downloadcachepc-linux-e725f9f5a6a8f8f3a9958e41b7069ae714349bc9.tar.gz
cachepc-linux-e725f9f5a6a8f8f3a9958e41b7069ae714349bc9.zip
KVM: SVM: Make AVIC backing, VMSA and VMCB memory allocation SNP safe
Implement a workaround for an SNP erratum where the CPU will incorrectly signal an RMP violation #PF if a hugepage (2mb or 1gb) collides with the RMP entry of a VMCB, VMSA or AVIC backing page. When SEV-SNP is globally enabled, the CPU marks the VMCB, VMSA, and AVIC backing pages as "in-use" in the RMP after a successful VMRUN. This is done for _all_ VMs, not just SNP-Active VMs. If the hypervisor accesses an in-use page through a writable translation, the CPU will throw an RMP violation #PF. On early SNP hardware, if an in-use page is 2mb aligned and software accesses any part of the associated 2mb region with a hupage, the CPU will incorrectly treat the entire 2mb region as in-use and signal a spurious RMP violation #PF. The recommended is to not use the hugepage for the VMCB, VMSA or AVIC backing page. Add a generic allocator that will ensure that the page returns is not hugepage (2mb or 1gb) and is safe to be used when SEV-SNP is enabled. Co-developed-by: Marc Orr <marcorr@google.com> Signed-off-by: Marc Orr <marcorr@google.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions