KVM: x86: Use standard mmu_notifier invalidate hooks for APIC access page
authorSean Christopherson <seanjc@google.com>
Fri, 2 Jun 2023 01:15:17 +0000 (18:15 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 6 Jun 2023 22:07:05 +0000 (15:07 -0700)
commit0a8a5f2c8c266e9d94fb45f76a26cff135d0051c
tree35835af6de1c66f035e8024fc86de729ba45e6eb
parent878940b33d7678e39a526ffe264ee025977dc67e
KVM: x86: Use standard mmu_notifier invalidate hooks for APIC access page

Now that KVM honors past and in-progress mmu_notifier invalidations when
reloading the APIC-access page, use KVM's "standard" invalidation hooks
to trigger a reload and delete the one-off usage of invalidate_range().

Aside from eliminating one-off code in KVM, dropping KVM's use of
invalidate_range() will allow common mmu_notifier to redefine the API to
be more strictly focused on invalidating secondary TLBs that share the
primary MMU's page tables.

Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Alistair Popple <apopple@nvidia.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20230602011518.787006-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c