summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/mmu/mmu.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-02-12 16:50:09 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2021-02-19 03:08:33 -0500
commit6dd03800b1afe4d3b6f26b0d20f2e1ecebf32b29 (patch)
treeca9cff18ac8e0206d72ddcd1b825f2c539564ec8 /arch/x86/kvm/mmu/mmu.c
parent2855f98265dc579bd2becb79ce0156d08e0df813 (diff)
downloadlwn-6dd03800b1afe4d3b6f26b0d20f2e1ecebf32b29.tar.gz
lwn-6dd03800b1afe4d3b6f26b0d20f2e1ecebf32b29.zip
KVM: x86/mmu: Make dirty log size hook (PML) a value, not a function
Store the vendor-specific dirty log size in a variable, there's no need to wrap it in a function since the value is constant after hardware_setup() runs. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20210213005015.1651772-9-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu/mmu.c')
-rw-r--r--arch/x86/kvm/mmu/mmu.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 4f2dfd59f9a2..0ed52397c274 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -1294,10 +1294,7 @@ void kvm_arch_mmu_enable_log_dirty_pt_masked(struct kvm *kvm,
int kvm_cpu_dirty_log_size(void)
{
- if (kvm_x86_ops.cpu_dirty_log_size)
- return static_call(kvm_x86_cpu_dirty_log_size)();
-
- return 0;
+ return kvm_x86_ops.cpu_dirty_log_size;
}
bool kvm_mmu_slot_gfn_write_protect(struct kvm *kvm,