[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4c072161-80dd-b7ed-7adb-02acccaa0701@gmail.com>
Date: Tue, 21 Jul 2020 16:23:54 +0800
From: Haiwei Li <lihaiwei.kernel@...il.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>
Cc: "pbonzini@...hat.com" <pbonzini@...hat.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
"wanpengli@...cent.com" <wanpengli@...cent.com>,
"vkuznets@...hat.com" <vkuznets@...hat.com>,
"jmattson@...gle.com" <jmattson@...gle.com>,
"joro@...tes.org" <joro@...tes.org>,
"tglx@...utronix.de" <tglx@...utronix.de>, mingo@...hat.com,
"bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>
Subject: [PATCH] KVM: Using macros instead of magic values
From: Haiwei Li <lihaiwei@...cent.com>
Instead of using magic values, use macros.
Signed-off-by: Haiwei Li <lihaiwei@...cent.com>
---
arch/x86/kvm/lapic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 47801a4..d5fb2ea 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -2083,7 +2083,8 @@ int kvm_lapic_reg_write(struct kvm_lapic *apic,
u32 reg, u32 val)
case APIC_SELF_IPI:
if (apic_x2apic_mode(apic)) {
- kvm_lapic_reg_write(apic, APIC_ICR, 0x40000 | (val & 0xff));
+ kvm_lapic_reg_write(apic, APIC_ICR,
+ APIC_DEST_SELF | (val & APIC_VECTOR_MASK));
} else
ret = 1;
break;
--
1.8.3.1
Powered by blists - more mailing lists