KVM: PPC: Explicitly require struct page memory for Ultravisor sharing
authorSean Christopherson <seanjc@google.com>
Thu, 10 Oct 2024 18:24:20 +0000 (11:24 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Oct 2024 17:00:50 +0000 (13:00 -0400)
commit040537ce87e9094e4936b2dfdc60beecf2cc339e
tree5b27b73dee10e61b80b7e7b2900c87c2c49ae9e6
parent570d666c11af0c95eba0a86582ae2cd8689211d0
KVM: PPC: Explicitly require struct page memory for Ultravisor sharing

Explicitly require "struct page" memory when sharing memory between
guest and host via an Ultravisor.  Given the number of pfn_to_page()
calls in the code, it's safe to assume that KVM already requires that the
pfn returned by gfn_to_pfn() is backed by struct page, i.e. this is
likely a bug fix, not a reduction in KVM capabilities.

Switching to gfn_to_page() will eventually allow removing gfn_to_pfn()
and kvm_pfn_to_refcounted_page().

Signed-off-by: Sean Christopherson <seanjc@google.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20241010182427.1434605-79-seanjc@google.com>
arch/powerpc/kvm/book3s_hv_uvmem.c