Patchwork KVM: use macro APIC_SEND_PENDING

login
register
mail settings
Submitter Li RongQing
Date March 13, 2019, 11:23 a.m.
Message ID <1552476212-32518-1-git-send-email-lirongqing@baidu.com>
Download mbox | patch
Permalink /patch/748071/
State New
Headers show

Comments

Li RongQing - March 13, 2019, 11:23 a.m.
instead of hardcode value, use APIC_SEND_PENDING to make
code more readable

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 arch/x86/kvm/lapic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 4b6c2da7265c..cd538179920f 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1863,7 +1863,7 @@  int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
 	}
 	case APIC_ICR:
 		/* No delay here, so we always clear the pending bit */
-		kvm_lapic_set_reg(apic, APIC_ICR, val & ~(1 << 12));
+		kvm_lapic_set_reg(apic, APIC_ICR, val & ~(APIC_SEND_PENDING));
 		apic_send_ipi(apic);
 		break;