diff options
author | 2024-10-10 11:23:33 -0700 | |
---|---|---|
committer | 2024-10-25 12:58:00 -0400 | |
commit | 2bcb52a3602bf4cbc55d8fb4da00c930f83d7789 (patch) | |
tree | bccd6ec12e60bfcf1e956f6a0060e65a76d023d8 /tools/perf/scripts/python | |
parent | KVM: Migrate kvm_vcpu_map() to kvm_follow_pfn() (diff) | |
download | wireguard-linux-2bcb52a3602bf4cbc55d8fb4da00c930f83d7789.tar.xz wireguard-linux-2bcb52a3602bf4cbc55d8fb4da00c930f83d7789.zip |
KVM: Pin (as in FOLL_PIN) pages during kvm_vcpu_map()
Pin, as in FOLL_PIN, pages when mapping them for direct access by KVM.
As per Documentation/core-api/pin_user_pages.rst, writing to a page that
was gotten via FOLL_GET is explicitly disallowed.
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()
Unfortunately, FOLL_PIN is a "private" flag, and so kvm_follow_pfn must
use a one-off bool instead of being able to piggyback the "flags" field.
Link: https://lwn.net/Articles/930667
Link: https://lore.kernel.org/all/cover.1683044162.git.lstoakes@gmail.com
Tested-by: Alex Bennée <alex.bennee@linaro.org>
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-32-seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions