Thread (148 messages) 148 messages, 14 authors, 2024-04-26

Re: [PATCH v13 12/35] KVM: Prepare for handling only shared mappings in mmu_notifier events

From: Paolo Bonzini <pbonzini@redhat.com>
Date: 2023-11-02 11:14:22
Also in: kvm, kvm-riscv, kvmarm, linux-arm-kernel, linux-fsdevel, linux-mips, linux-mm, linux-riscv, lkml

On 11/2/23 06:59, Binbin Wu wrote:
quoted
Add flags to "struct kvm_gfn_range" to let notifier events target
only shared and only private mappings, and write up the existing
mmu_notifier events to be shared-only (private memory is never
associated with a userspace virtual address, i.e. can't be reached
via mmu_notifiers).

Add two flags so that KVM can handle the three possibilities
(shared, private, and shared+private) without needing something
like a tri-state enum.
I see the two flags are set/cleared in __kvm_handle_hva_range() in
this patch and kvm_handle_gfn_range() from the later patch 13/35, but
I didn't see they are used/read in this patch series if I didn't miss
anything.  How are they supposed to be used in KVM?
They are going to be used by SNP/TDX patches.

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help