diff options
author | Sean Christopherson <[email protected]> | 2024-10-10 11:23:47 -0700 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2024-10-25 13:00:47 -0400 |
commit | 4af18dc6a9204464db76d9771d1f40e2b46bf6ae (patch) | |
tree | fa47ec2dddf36ae9a5dbec467072ab90f7ab078a /scripts/gdb/linux/stackdepot.py | |
parent | 54ba8c98a2589f816c52545c9cd3db6665ee0c67 (diff) |
KVM: guest_memfd: Pass index, not gfn, to __kvm_gmem_get_pfn()
Refactor guest_memfd usage of __kvm_gmem_get_pfn() to pass the index into
the guest_memfd file instead of the gfn, i.e. resolve the index based on
the slot+gfn in the caller instead of in __kvm_gmem_get_pfn(). This will
allow kvm_gmem_get_pfn() to retrieve and return the specific "struct page",
which requires the index into the folio, without a redoing the index
calculation multiple times (which isn't costly, just hard to follow).
Opportunistically add a kvm_gmem_get_index() helper to make the copy+pasted
code easier to understand.
Signed-off-by: Sean Christopherson <[email protected]>
Tested-by: Dmitry Osipenko <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Message-ID: <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/stackdepot.py')
0 files changed, 0 insertions, 0 deletions