-
- Downloads
KVM: Pass in write/dirty to kvm_vcpu_map(), not kvm_vcpu_unmap()
Now that all kvm_vcpu_{,un}map() users pass "true" for @dirty, have them pass "true" as a @writable param to kvm_vcpu_map(), and thus create a read-only mapping when possible. Note, creating read-only mappings can be theoretically slower, as they don't play nice with fast GUP due to the need to break CoW before mapping the underlying PFN. But practically speaking, creating a mapping isn't a super hot path, and getting a writable mapping for reading is weird and confusing. 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-34-seanjc@google.com>
Showing
- arch/x86/kvm/svm/nested.c 2 additions, 2 deletionsarch/x86/kvm/svm/nested.c
- arch/x86/kvm/svm/sev.c 1 addition, 1 deletionarch/x86/kvm/svm/sev.c
- arch/x86/kvm/svm/svm.c 4 additions, 4 deletionsarch/x86/kvm/svm/svm.c
- arch/x86/kvm/vmx/nested.c 8 additions, 8 deletionsarch/x86/kvm/vmx/nested.c
- include/linux/kvm_host.h 18 additions, 2 deletionsinclude/linux/kvm_host.h
- virt/kvm/kvm_main.c 7 additions, 5 deletionsvirt/kvm/kvm_main.c
Loading
Please register or sign in to comment