]> xenbits.xensource.com Git - people/pauldu/linux.git/commit
KVM: pfncache: remove KVM_GUEST_USES_PFN usage
authorPaul Durrant <pdurrant@amazon.com>
Thu, 9 Nov 2023 15:43:41 +0000 (15:43 +0000)
committerPaul Durrant <pdurrant@amazon.com>
Wed, 14 Feb 2024 16:32:10 +0000 (16:32 +0000)
commit569914329ea0945bc8c37eeef5a335722bfeeccf
treef5de5374ebd47939fca36b86933668d024f0a564
parentd5d6aa731176355a0f23fb110ee21f3f32ac0f5e
KVM: pfncache: remove KVM_GUEST_USES_PFN usage

As noted in [1] the KVM_GUEST_USES_PFN usage flag is never set by any
callers of kvm_gpc_init(), which also makes the 'vcpu' argument redundant.
Moreover, all existing callers specify KVM_HOST_USES_PFN so the usage
check in hva_to_pfn_retry() and hence the 'usage' argument to
kvm_gpc_init() are also redundant.
Remove the pfn_cache_usage enumeration and remove the redundant arguments,
fields of struct gfn_to_hva_cache, and all the related code.

[1] https://lore.kernel.org/all/ZQiR8IpqOZrOpzHC@google.com/

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
---
Cc: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: x86@kernel.org
v8:
 - New in this version.
arch/x86/kvm/x86.c
arch/x86/kvm/xen.c
include/linux/kvm_host.h
include/linux/kvm_types.h
virt/kvm/pfncache.c