KVM: Drop @gpa from exported gfn=>pfn cache check() and refresh() helpers
authorSean Christopherson <seanjc@google.com>
Thu, 13 Oct 2022 21:12:31 +0000 (21:12 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 30 Nov 2022 19:25:24 +0000 (19:25 +0000)
commit58f5ee5fedd981e05cb086cba4e8f923c3727a04
tree14e4ac0c59bb8d8bc5c16b6494779a4be983ab5a
parent5762cb10235776dd1ed5f5f9d6c1aff2b73bec5c
KVM: Drop @gpa from exported gfn=>pfn cache check() and refresh() helpers

Drop the @gpa param from the exported check()+refresh() helpers and limit
changing the cache's GPA to the activate path.  All external users just
feed in gpc->gpa, i.e. this is a fancy nop.

Allowing users to change the GPA at check()+refresh() is dangerous as
those helpers explicitly allow concurrent calls, e.g. KVM could get into
a livelock scenario.  It's also unclear as to what the expected behavior
should be if multiple tasks attempt to refresh with different GPAs.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/kvm/x86.c
arch/x86/kvm/xen.c
include/linux/kvm_host.h
virt/kvm/pfncache.c