summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2024-10-10 20:24:22 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-10-25 19:01:35 +0200
commitd0ef8d9fbebea0d23d80fbf6734c2b4f8bebc144 (patch)
treec0b0e97d47548b7e8d59a2144b002a7a6ab1e528 /arch/s390/kvm
parentKVM: Drop gfn_to_pfn() APIs now that all users are gone (diff)
downloadlinux-d0ef8d9fbebea0d23d80fbf6734c2b4f8bebc144.tar.xz
linux-d0ef8d9fbebea0d23d80fbf6734c2b4f8bebc144.zip
KVM: s390: Use kvm_release_page_dirty() to unpin "struct page" memory
Use kvm_release_page_dirty() when unpinning guest pages, as the pfn was retrieved via pin_guest_page(), i.e. is guaranteed to be backed by struct page memory. This will allow dropping kvm_release_pfn_dirty() and friends. 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-81-seanjc@google.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r--arch/s390/kvm/vsie.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index 763a070f5955..e1fdf83879cf 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -670,7 +670,7 @@ static int pin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t *hpa)
/* Unpins a page previously pinned via pin_guest_page, marking it as dirty. */
static void unpin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t hpa)
{
- kvm_release_pfn_dirty(hpa >> PAGE_SHIFT);
+ kvm_release_page_dirty(pfn_to_page(hpa >> PAGE_SHIFT));
/* mark the page always as dirty for migration */
mark_page_dirty(kvm, gpa_to_gfn(gpa));
}