KVM: Tweak kvm_hva_range and hva_handler_t to allow reusing for gfn ranges
authorSean Christopherson <seanjc@google.com>
Fri, 27 Oct 2023 18:21:43 +0000 (11:21 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 13 Nov 2023 10:28:20 +0000 (05:28 -0500)
commite97b39c5c4362dc1cbc37a563ddac313b96c84f3
tree28201ca12433040d23e5db6540fba173c202cc14
parentef5b6a542b1dbb718226a5f8208be09ef405983d
KVM: Tweak kvm_hva_range and hva_handler_t to allow reusing for gfn ranges

Rework and rename "struct kvm_hva_range" into "kvm_mmu_notifier_range" so
that the structure can be used to handle notifications that operate on gfn
context, i.e. that aren't tied to a host virtual address.  Rename the
handler typedef too (arguably it should always have been gfn_handler_t).

Practically speaking, this is a nop for 64-bit kernels as the only
meaningful change is to store start+end as u64s instead of unsigned longs.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Message-Id: <20231027182217.3615211-2-seanjc@google.com>
Reviewed-by: Kai Huang <kai.huang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c