]> Git Repo - linux.git/commitdiff
KVM: X86: Drop KVM_APIC_SHORT_MASK and KVM_APIC_DEST_MASK
authorPeter Xu <[email protected]>
Wed, 4 Dec 2019 19:07:19 +0000 (20:07 +0100)
committerPaolo Bonzini <[email protected]>
Wed, 8 Jan 2020 16:33:15 +0000 (17:33 +0100)
We have both APIC_SHORT_MASK and KVM_APIC_SHORT_MASK defined for the
shorthand mask.  Similarly, we have both APIC_DEST_MASK and
KVM_APIC_DEST_MASK defined for the destination mode mask.

Drop the KVM_APIC_* macros and replace the only user of them to use
the APIC_DEST_* macros instead.  At the meantime, move APIC_SHORT_MASK
and APIC_DEST_MASK from lapic.c to lapic.h.

Reviewed-by: Vitaly Kuznetsov <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
arch/x86/kvm/lapic.c
arch/x86/kvm/lapic.h
arch/x86/kvm/svm.c

index 1eabe58bb6d5e70f20d5652c3396035ac66fdfaa..805c18178bbf9744563d5f9a1599ccec3bd67cd3 100644 (file)
@@ -56,9 +56,6 @@
 #define APIC_VERSION                   (0x14UL | ((KVM_APIC_LVT_NUM - 1) << 16))
 #define LAPIC_MMIO_LENGTH              (1 << 12)
 /* followed define is not in apicdef.h */
-#define APIC_SHORT_MASK                        0xc0000
-#define APIC_DEST_NOSHORT              0x0
-#define APIC_DEST_MASK                 0x800
 #define MAX_APIC_VECTOR                        256
 #define APIC_VECTORS_PER_REG           32
 
index 0b9bbadd1f3cad807dd6fce89905346c7b791563..5a9f29ed9a4ba18055587bf31eaaff41e234813b 100644 (file)
@@ -10,8 +10,9 @@
 #define KVM_APIC_SIPI          1
 #define KVM_APIC_LVT_NUM       6
 
-#define KVM_APIC_SHORT_MASK    0xc0000
-#define KVM_APIC_DEST_MASK     0x800
+#define APIC_SHORT_MASK                        0xc0000
+#define APIC_DEST_NOSHORT              0x0
+#define APIC_DEST_MASK                 0x800
 
 #define APIC_BUS_CYCLE_NS       1
 #define APIC_BUS_FREQUENCY      (1000000000ULL / APIC_BUS_CYCLE_NS)
index 122d4ce3b1ab055d1e7fae7ebb4745382d3346b4..8f1b715dfde83136a3d37d0554b8750fac025259 100644 (file)
@@ -4519,9 +4519,9 @@ static int avic_incomplete_ipi_interception(struct vcpu_svm *svm)
                 */
                kvm_for_each_vcpu(i, vcpu, kvm) {
                        bool m = kvm_apic_match_dest(vcpu, apic,
-                                                    icrl & KVM_APIC_SHORT_MASK,
+                                                    icrl & APIC_SHORT_MASK,
                                                     GET_APIC_DEST_FIELD(icrh),
-                                                    icrl & KVM_APIC_DEST_MASK);
+                                                    icrl & APIC_DEST_MASK);
 
                        if (m && !avic_vcpu_is_running(vcpu))
                                kvm_vcpu_wake_up(vcpu);
This page took 0.057087 seconds and 4 git commands to generate.