diff options
| author | Sean Christopherson <[email protected]> | 2024-10-10 18:24:16 +0000 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2024-10-25 17:00:49 +0000 |
| commit | ee0fa693546decf6673a87e75dec39ed2ab1524b (patch) | |
| tree | 8f367136685d364b4fbdcd183aaf9474983251e0 /rust/helpers/helpers.c | |
| parent | KVM: PPC: Remove extra get_page() to fix page refcount leak (diff) | |
| download | kernel-ee0fa693546decf6673a87e75dec39ed2ab1524b.tar.gz kernel-ee0fa693546decf6673a87e75dec39ed2ab1524b.zip | |
KVM: PPC: Use kvm_vcpu_map() to map guest memory to patch dcbz instructions
Use kvm_vcpu_map() when patching dcbz in guest memory, as a regular GUP
isn't technically sufficient when writing to data in the target pages.
As per Documentation/core-api/pin_user_pages.rst:
Correct (uses FOLL_PIN calls):
pin_user_pages()
write to the data within the pages
unpin_user_pages()
INCORRECT (uses FOLL_GET calls):
get_user_pages()
write to the data within the pages
put_page()
As a happy bonus, using kvm_vcpu_{,un}map() takes care of creating a
mapping and marking the page dirty.
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 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions
