summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-03-03 15:41:11 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2022-04-02 05:34:41 -0400
commitd0d96121d03d6d9cf608d948247a9f24f5a02da9 (patch)
tree769ad25f70e79433c9a41cf71194cc7b102831e2 /arch/x86/kvm
parent4a9e7b9ea252842bc8b14d495706ac6317fafd5d (diff)
downloadlinux-stable-d0d96121d03d6d9cf608d948247a9f24f5a02da9.tar.gz
linux-stable-d0d96121d03d6d9cf608d948247a9f24f5a02da9.tar.bz2
linux-stable-d0d96121d03d6d9cf608d948247a9f24f5a02da9.zip
KVM: Use enum to track if cached PFN will be used in guest and/or host
Replace the guest_uses_pa and kernel_map booleans in the PFN cache code with a unified enum/bitmask. Using explicit names makes it easier to review and audit call sites. Opportunistically add a WARN to prevent passing garbage; instantating a cache without declaring its usage is either buggy or pointless. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220303154127.202856-2-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/xen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/xen.c b/arch/x86/kvm/xen.c
index 4aa0f2b31665..5be1c9227105 100644
--- a/arch/x86/kvm/xen.c
+++ b/arch/x86/kvm/xen.c
@@ -39,7 +39,7 @@ static int kvm_xen_shared_info_init(struct kvm *kvm, gfn_t gfn)
}
do {
- ret = kvm_gfn_to_pfn_cache_init(kvm, gpc, NULL, false, true,
+ ret = kvm_gfn_to_pfn_cache_init(kvm, gpc, NULL, KVM_HOST_USES_PFN,
gpa, PAGE_SIZE, false);
if (ret)
goto out;