]> git.itanic.dy.fi Git - linux-stable/commitdiff
KVM: x86: Rename 'enable_direct_tlbflush' to 'enable_l2_tlb_flush'
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 1 Nov 2022 14:53:43 +0000 (15:53 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Nov 2022 17:59:00 +0000 (12:59 -0500)
To make terminology between Hyper-V-on-KVM and KVM-on-Hyper-V consistent,
rename 'enable_direct_tlbflush' to 'enable_l2_tlb_flush'. The change
eliminates the use of confusing 'direct' and adds the missing underscore.

No functional change.

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221101145426.251680-6-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm-x86-ops.h
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/svm_onhyperv.c
arch/x86/kvm/svm/svm_onhyperv.h
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c

index ea58e67e9a670159102525ecadd35dd1553b9d14..abccd51dcfca1b5b6848a1b481797fbaa043870e 100644 (file)
@@ -125,7 +125,7 @@ KVM_X86_OP_OPTIONAL(guest_memory_reclaimed)
 KVM_X86_OP(get_msr_feature)
 KVM_X86_OP(can_emulate_instruction)
 KVM_X86_OP(apic_init_signal_blocked)
-KVM_X86_OP_OPTIONAL(enable_direct_tlbflush)
+KVM_X86_OP_OPTIONAL(enable_l2_tlb_flush)
 KVM_X86_OP_OPTIONAL(migrate_timers)
 KVM_X86_OP(msr_filter_changed)
 KVM_X86_OP(complete_emulated_msr)
index 598eb3b9ae440e7fc551c426e8263d026022b3b9..a413f841e83080d19c5053e01da9d92c50232a04 100644 (file)
@@ -1652,7 +1652,7 @@ struct kvm_x86_ops {
                                        void *insn, int insn_len);
 
        bool (*apic_init_signal_blocked)(struct kvm_vcpu *vcpu);
-       int (*enable_direct_tlbflush)(struct kvm_vcpu *vcpu);
+       int (*enable_l2_tlb_flush)(struct kvm_vcpu *vcpu);
 
        void (*migrate_timers)(struct kvm_vcpu *vcpu);
        void (*msr_filter_changed)(struct kvm_vcpu *vcpu);
index 52c73a8be72b1215855e67208eb7ae2b42796ffe..26a89d0da93e46ba33f2b36164c2e1f751243fa3 100644 (file)
@@ -14,7 +14,7 @@
 #include "kvm_onhyperv.h"
 #include "svm_onhyperv.h"
 
-int svm_hv_enable_direct_tlbflush(struct kvm_vcpu *vcpu)
+int svm_hv_enable_l2_tlb_flush(struct kvm_vcpu *vcpu)
 {
        struct hv_vmcb_enlightenments *hve;
        struct hv_partition_assist_pg **p_hv_pa_pg =
index d5cb2c62e35574f89ed03bba79817299be9b9730..45faf84476cecf5d468ea4937c3e2d147874605b 100644 (file)
@@ -13,7 +13,7 @@
 
 static struct kvm_x86_ops svm_x86_ops;
 
-int svm_hv_enable_direct_tlbflush(struct kvm_vcpu *vcpu);
+int svm_hv_enable_l2_tlb_flush(struct kvm_vcpu *vcpu);
 
 static inline void svm_hv_init_vmcb(struct vmcb *vmcb)
 {
@@ -53,8 +53,8 @@ static inline void svm_hv_hardware_setup(void)
 
                        vp_ap->nested_control.features.directhypercall = 1;
                }
-               svm_x86_ops.enable_direct_tlbflush =
-                               svm_hv_enable_direct_tlbflush;
+               svm_x86_ops.enable_l2_tlb_flush =
+                               svm_hv_enable_l2_tlb_flush;
        }
 }
 
index aca88524fd1ece7fba2bf55ca3ad3b1d2f72712f..5806ab88851e45b99368611b50f074eed1a231df 100644 (file)
@@ -527,7 +527,7 @@ static unsigned long host_idt_base;
 static bool __read_mostly enlightened_vmcs = true;
 module_param(enlightened_vmcs, bool, 0444);
 
-static int hv_enable_direct_tlbflush(struct kvm_vcpu *vcpu)
+static int hv_enable_l2_tlb_flush(struct kvm_vcpu *vcpu)
 {
        struct hv_enlightened_vmcs *evmcs;
        struct hv_partition_assist_pg **p_hv_pa_pg =
@@ -8520,8 +8520,8 @@ static int __init vmx_init(void)
                }
 
                if (ms_hyperv.nested_features & HV_X64_NESTED_DIRECT_FLUSH)
-                       vmx_x86_ops.enable_direct_tlbflush
-                               = hv_enable_direct_tlbflush;
+                       vmx_x86_ops.enable_l2_tlb_flush
+                               = hv_enable_l2_tlb_flush;
 
        } else {
                enlightened_vmcs = false;
index 404325a13dc2ebc73ed6bace59a59ee317af3771..838ed4ea7e4d809960d52768b975981c45464bc1 100644 (file)
@@ -4481,7 +4481,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
                        kvm_x86_ops.nested_ops->get_state(NULL, NULL, 0) : 0;
                break;
        case KVM_CAP_HYPERV_DIRECT_TLBFLUSH:
-               r = kvm_x86_ops.enable_direct_tlbflush != NULL;
+               r = kvm_x86_ops.enable_l2_tlb_flush != NULL;
                break;
        case KVM_CAP_HYPERV_ENLIGHTENED_VMCS:
                r = kvm_x86_ops.nested_ops->enable_evmcs != NULL;
@@ -5494,10 +5494,10 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu,
                }
                return r;
        case KVM_CAP_HYPERV_DIRECT_TLBFLUSH:
-               if (!kvm_x86_ops.enable_direct_tlbflush)
+               if (!kvm_x86_ops.enable_l2_tlb_flush)
                        return -ENOTTY;
 
-               return static_call(kvm_x86_enable_direct_tlbflush)(vcpu);
+               return static_call(kvm_x86_enable_l2_tlb_flush)(vcpu);
 
        case KVM_CAP_HYPERV_ENFORCE_CPUID:
                return kvm_hv_set_enforce_cpuid(vcpu, cap->args[0]);