]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: SVM: Add a helper to convert a SME-aware PA back to a struct page
authorSean Christopherson <seanjc@google.com>
Fri, 2 Aug 2024 20:45:09 +0000 (13:45 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 30 Aug 2024 02:06:12 +0000 (19:06 -0700)
commit48547fe75ea7d5bf1ff9425a0a5d4d32b3a77777
tree67b1d7f42643726d1c6185de39f7c93776d65954
parentc501062bb22ba325b7b77c91433d79574b4a3dcc
KVM: SVM: Add a helper to convert a SME-aware PA back to a struct page

Add __sme_pa_to_page() to pair with __sme_page_pa() and use it to replace
open coded equivalents, including for "iopm_base", which previously
avoided having to do __sme_clr() by storing the raw PA in the global
variable.

Opportunistically convert __sme_page_pa() to a helper to provide type
safety.

No functional change intended.

Link: https://lore.kernel.org/r/20240802204511.352017-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h