]> git.baikalelectronics.ru Git - kernel.git/commitdiff
x86/kvm: rename HV_X64_MSR_APIC_ASSIST_PAGE to HV_X64_MSR_VP_ASSIST_PAGE
authorLadi Prosek <lprosek@redhat.com>
Tue, 20 Mar 2018 14:02:07 +0000 (15:02 +0100)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 28 Mar 2018 20:47:06 +0000 (22:47 +0200)
The assist page has been used only for the paravirtual EOI so far, hence
the "APIC" in the MSR name. Renaming to match the Hyper-V TLFS where it's
called "Virtual VP Assist MSR".

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/include/asm/hyperv-tlfs.h
arch/x86/kvm/hyperv.c
arch/x86/kvm/lapic.h
arch/x86/kvm/x86.c

index a9d6738d2071e6fb9ef84e00575485711934adaa..a36ad742eac75ce7e61d419ff62a8e6500c36b57 100644 (file)
 #define HV_X64_MSR_EOI                         0x40000070
 #define HV_X64_MSR_ICR                         0x40000071
 #define HV_X64_MSR_TPR                         0x40000072
-#define HV_X64_MSR_APIC_ASSIST_PAGE            0x40000073
+#define HV_X64_MSR_VP_ASSIST_PAGE              0x40000073
 
 /* Define synthetic interrupt controller model specific registers. */
 #define HV_X64_MSR_SCONTROL                    0x40000080
@@ -331,10 +331,10 @@ struct hv_tsc_emulation_status {
 #define HVCALL_POST_MESSAGE                    0x005c
 #define HVCALL_SIGNAL_EVENT                    0x005d
 
-#define HV_X64_MSR_APIC_ASSIST_PAGE_ENABLE             0x00000001
-#define HV_X64_MSR_APIC_ASSIST_PAGE_ADDRESS_SHIFT      12
-#define HV_X64_MSR_APIC_ASSIST_PAGE_ADDRESS_MASK       \
-               (~((1ull << HV_X64_MSR_APIC_ASSIST_PAGE_ADDRESS_SHIFT) - 1))
+#define HV_X64_MSR_VP_ASSIST_PAGE_ENABLE       0x00000001
+#define HV_X64_MSR_VP_ASSIST_PAGE_ADDRESS_SHIFT        12
+#define HV_X64_MSR_VP_ASSIST_PAGE_ADDRESS_MASK \
+               (~((1ull << HV_X64_MSR_VP_ASSIST_PAGE_ADDRESS_SHIFT) - 1))
 
 #define HV_X64_MSR_TSC_REFERENCE_ENABLE                0x00000001
 #define HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT 12
index d52d029581324e105ac5b329e65bb96b06bc22dc..98618e397342297cdff01a94975147ee543419c0 100644 (file)
@@ -1042,17 +1042,17 @@ static int kvm_hv_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host)
                        return 1;
                hv->vp_index = (u32)data;
                break;
-       case HV_X64_MSR_APIC_ASSIST_PAGE: {
+       case HV_X64_MSR_VP_ASSIST_PAGE: {
                u64 gfn;
                unsigned long addr;
 
-               if (!(data & HV_X64_MSR_APIC_ASSIST_PAGE_ENABLE)) {
+               if (!(data & HV_X64_MSR_VP_ASSIST_PAGE_ENABLE)) {
                        hv->hv_vapic = data;
                        if (kvm_lapic_enable_pv_eoi(vcpu, 0))
                                return 1;
                        break;
                }
-               gfn = data >> HV_X64_MSR_APIC_ASSIST_PAGE_ADDRESS_SHIFT;
+               gfn = data >> HV_X64_MSR_VP_ASSIST_PAGE_ADDRESS_SHIFT;
                addr = kvm_vcpu_gfn_to_hva(vcpu, gfn);
                if (kvm_is_error_hva(addr))
                        return 1;
@@ -1171,7 +1171,7 @@ static int kvm_hv_get_msr(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
                return kvm_hv_vapic_msr_read(vcpu, APIC_ICR, pdata);
        case HV_X64_MSR_TPR:
                return kvm_hv_vapic_msr_read(vcpu, APIC_TASKPRI, pdata);
-       case HV_X64_MSR_APIC_ASSIST_PAGE:
+       case HV_X64_MSR_VP_ASSIST_PAGE:
                data = hv->hv_vapic;
                break;
        case HV_X64_MSR_VP_RUNTIME:
index 56c36014f7b76006fbb921da411e611715c901a6..edce055e9fd70845e1575a00ac6e9e2e6d41535b 100644 (file)
@@ -109,7 +109,7 @@ int kvm_hv_vapic_msr_read(struct kvm_vcpu *vcpu, u32 msr, u64 *data);
 
 static inline bool kvm_hv_vapic_assist_page_enabled(struct kvm_vcpu *vcpu)
 {
-       return vcpu->arch.hyperv.hv_vapic & HV_X64_MSR_APIC_ASSIST_PAGE_ENABLE;
+       return vcpu->arch.hyperv.hv_vapic & HV_X64_MSR_VP_ASSIST_PAGE_ENABLE;
 }
 
 int kvm_lapic_enable_pv_eoi(struct kvm_vcpu *vcpu, u64 data);
index bf89876e620b63d2a531d258933a9dbb4bb91e6f..260261d01a415d5bff3ce8da542dccd7738dca68 100644 (file)
@@ -1038,7 +1038,7 @@ static u32 emulated_msrs[] = {
        HV_X64_MSR_VP_RUNTIME,
        HV_X64_MSR_SCONTROL,
        HV_X64_MSR_STIMER0_CONFIG,
-       HV_X64_MSR_APIC_ASSIST_PAGE,
+       HV_X64_MSR_VP_ASSIST_PAGE,
        HV_X64_MSR_REENLIGHTENMENT_CONTROL, HV_X64_MSR_TSC_EMULATION_CONTROL,
        HV_X64_MSR_TSC_EMULATION_STATUS,