]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: x86: Rename kvm_lapic_enable_pv_eoi()
authorVitaly Kuznetsov <vkuznets@redhat.com>
Mon, 8 Nov 2021 15:28:18 +0000 (16:28 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Nov 2021 15:56:22 +0000 (10:56 -0500)
kvm_lapic_enable_pv_eoi() is a misnomer as the function is also
used to disable PV EOI. Rename it to kvm_lapic_set_pv_eoi().

No functional change intended.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20211108152819.12485-2-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/hyperv.c
arch/x86/kvm/lapic.c
arch/x86/kvm/lapic.h
arch/x86/kvm/x86.c

index 4f15c0165c05da759abf1096583165e2d5e440de..4a555f32885a8c489c7f70750956d08fa545d0f4 100644 (file)
@@ -1472,7 +1472,7 @@ static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host)
 
                if (!(data & HV_X64_MSR_VP_ASSIST_PAGE_ENABLE)) {
                        hv_vcpu->hv_vapic = data;
-                       if (kvm_lapic_enable_pv_eoi(vcpu, 0, 0))
+                       if (kvm_lapic_set_pv_eoi(vcpu, 0, 0))
                                return 1;
                        break;
                }
@@ -1490,7 +1490,7 @@ static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host)
                        return 1;
                hv_vcpu->hv_vapic = data;
                kvm_vcpu_mark_page_dirty(vcpu, gfn);
-               if (kvm_lapic_enable_pv_eoi(vcpu,
+               if (kvm_lapic_set_pv_eoi(vcpu,
                                            gfn_to_gpa(gfn) | KVM_MSR_ENABLED,
                                            sizeof(struct hv_vp_assist_page)))
                        return 1;
index 76fb0092120377bec06e4f2e9aeb2d2bb7d3f099..3573b50d9036a141c255e1a4eaae8cda74a0ef39 100644 (file)
@@ -2852,7 +2852,7 @@ int kvm_hv_vapic_msr_read(struct kvm_vcpu *vcpu, u32 reg, u64 *data)
        return 0;
 }
 
-int kvm_lapic_enable_pv_eoi(struct kvm_vcpu *vcpu, u64 data, unsigned long len)
+int kvm_lapic_set_pv_eoi(struct kvm_vcpu *vcpu, u64 data, unsigned long len)
 {
        u64 addr = data & ~KVM_MSR_ENABLED;
        struct gfn_to_hva_cache *ghc = &vcpu->arch.pv_eoi.data;
index d7c25d0c135498bf22d095d44b56dd76b38a23ac..2b44e533fc8df3eaa8637134c160cf1bab64308a 100644 (file)
@@ -127,7 +127,7 @@ int kvm_x2apic_msr_read(struct kvm_vcpu *vcpu, u32 msr, u64 *data);
 int kvm_hv_vapic_msr_write(struct kvm_vcpu *vcpu, u32 msr, u64 data);
 int kvm_hv_vapic_msr_read(struct kvm_vcpu *vcpu, u32 msr, u64 *data);
 
-int kvm_lapic_enable_pv_eoi(struct kvm_vcpu *vcpu, u64 data, unsigned long len);
+int kvm_lapic_set_pv_eoi(struct kvm_vcpu *vcpu, u64 data, unsigned long len);
 void kvm_lapic_exit(void);
 
 #define VEC_POS(v) ((v) & (32 - 1))
index d7d2f1bbd83fc08022b8e9429971322d4c079877..3a22aa207c734edd39d17b541b75de875e670853 100644 (file)
@@ -3556,7 +3556,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
                if (!guest_pv_has(vcpu, KVM_FEATURE_PV_EOI))
                        return 1;
 
-               if (kvm_lapic_enable_pv_eoi(vcpu, data, sizeof(u8)))
+               if (kvm_lapic_set_pv_eoi(vcpu, data, sizeof(u8)))
                        return 1;
                break;