]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: x86: lapic: Rename [GET/SET]_APIC_DEST_FIELD to [GET/SET]_XAPIC_DEST_FIELD
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Thu, 19 May 2022 10:26:54 +0000 (05:26 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Jun 2022 16:44:34 +0000 (12:44 -0400)
To signify that the macros only support 8-bit xAPIC destination ID.

Suggested-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220519102709.24125-3-suravee.suthikulpanit@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/hyperv/hv_apic.c
arch/x86/include/asm/apicdef.h
arch/x86/kernel/apic/apic.c
arch/x86/kernel/apic/ipi.c
arch/x86/kvm/lapic.c
arch/x86/kvm/svm/avic.c

index db2d92fb44daf820402f90bd4d320cb5c133477a..fb8b2c088681a2958a0cfbbb1746fb38c1784447 100644 (file)
@@ -46,7 +46,7 @@ static void hv_apic_icr_write(u32 low, u32 id)
 {
        u64 reg_val;
 
-       reg_val = SET_APIC_DEST_FIELD(id);
+       reg_val = SET_XAPIC_DEST_FIELD(id);
        reg_val = reg_val << 32;
        reg_val |= low;
 
index 92035eb3afeedf7345983c25cbf98e37b4cc9e6b..68d213e83fcc20e9b94655b7d13e8d9d7fd767a6 100644 (file)
@@ -89,8 +89,8 @@
 #define                APIC_DM_EXTINT          0x00700
 #define                APIC_VECTOR_MASK        0x000FF
 #define        APIC_ICR2       0x310
-#define                GET_APIC_DEST_FIELD(x)  (((x) >> 24) & 0xFF)
-#define                SET_APIC_DEST_FIELD(x)  ((x) << 24)
+#define                GET_XAPIC_DEST_FIELD(x) (((x) >> 24) & 0xFF)
+#define                SET_XAPIC_DEST_FIELD(x) ((x) << 24)
 #define        APIC_LVTT       0x320
 #define        APIC_LVTTHMR    0x330
 #define        APIC_LVTPC      0x340
index 189d3a5e471adc43c44b7d6aa8d2805a0a9a475b..a4347605ab005042306ef1ef43721352657fc91e 100644 (file)
@@ -275,7 +275,7 @@ void native_apic_icr_write(u32 low, u32 id)
        unsigned long flags;
 
        local_irq_save(flags);
-       apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(id));
+       apic_write(APIC_ICR2, SET_XAPIC_DEST_FIELD(id));
        apic_write(APIC_ICR, low);
        local_irq_restore(flags);
 }
index d1fb874fbe64bafac3248120872ecbdb94ebae3b..2a6509e8c840d19944484f624f805a3e9ae06814 100644 (file)
@@ -99,7 +99,7 @@ sendmask:
 
 static inline int __prepare_ICR2(unsigned int mask)
 {
-       return SET_APIC_DEST_FIELD(mask);
+       return SET_XAPIC_DEST_FIELD(mask);
 }
 
 static inline void __xapic_wait_icr_idle(void)
index f03facc2ee3ee3c63933db7b809cb671f4ff74ca..6f31cc0548f0ff833b8b3a34a5b0ac7fcf2ab2e7 100644 (file)
@@ -1326,7 +1326,7 @@ void kvm_apic_send_ipi(struct kvm_lapic *apic, u32 icr_low, u32 icr_high)
        if (apic_x2apic_mode(apic))
                irq.dest_id = icr_high;
        else
-               irq.dest_id = GET_APIC_DEST_FIELD(icr_high);
+               irq.dest_id = GET_XAPIC_DEST_FIELD(icr_high);
 
        trace_kvm_apic_ipi(icr_low, irq.dest_id);
 
index d1bc5820ea469349bedb6f61cc8d209cdb75190f..37016feb5ac4a27a5a24e14ad351e7c31af1dfc9 100644 (file)
@@ -303,7 +303,7 @@ static int avic_kick_target_vcpus_fast(struct kvm *kvm, struct kvm_lapic *source
        if (apic_x2apic_mode(source))
                dest = icrh;
        else
-               dest = GET_APIC_DEST_FIELD(icrh);
+               dest = GET_XAPIC_DEST_FIELD(icrh);
 
        if (dest_mode == APIC_DEST_PHYSICAL) {
                /* broadcast destination, use slow path */
@@ -397,7 +397,7 @@ static void avic_kick_target_vcpus(struct kvm *kvm, struct kvm_lapic *source,
         */
        kvm_for_each_vcpu(i, vcpu, kvm) {
                if (kvm_apic_match_dest(vcpu, source, icrl & APIC_SHORT_MASK,
-                                       GET_APIC_DEST_FIELD(icrh),
+                                       GET_XAPIC_DEST_FIELD(icrh),
                                        icrl & APIC_DEST_MASK)) {
                        vcpu->arch.apic->irr_pending = true;
                        svm_complete_interrupt_delivery(vcpu,