]> 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>
Mon, 20 Nov 2023 18:06:23 +0000 (18:06 +0000)
commit3145eba19d4e3b304b2969d431c7f6f02e7d7a07
treefc7cf311adcb1efe418642adfc0b6a4a50783302
parent6984519cfa0c66658c627316a1907100473fbdd6
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>
---

v8:
 - New in v8.
arch/x86/kvm/x86.c
arch/x86/kvm/xen.c
include/linux/kvm_host.h
include/linux/kvm_types.h
virt/kvm/pfncache.c