Skip to content

Commit d0ef8d9

Browse files
sean-jcbonzini
authored andcommitted
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 <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> Message-ID: <[email protected]>
1 parent 06cdaff commit d0ef8d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/kvm/vsie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ static int pin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t *hpa)
670670
/* Unpins a page previously pinned via pin_guest_page, marking it as dirty. */
671671
static void unpin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t hpa)
672672
{
673-
kvm_release_pfn_dirty(hpa >> PAGE_SHIFT);
673+
kvm_release_page_dirty(pfn_to_page(hpa >> PAGE_SHIFT));
674674
/* mark the page always as dirty for migration */
675675
mark_page_dirty(kvm, gpa_to_gfn(gpa));
676676
}

0 commit comments

Comments
 (0)