Re: [PATCH] KVM: x86: change in pv_eoi_get_pending() to make code more readable

From: Paolo Bonzini
Date: Mon Dec 21 2020 - 13:32:20 EST


On 18/12/20 08:51, Stephen Zhang wrote:
Signed-off-by: Stephen Zhang <stephenzhangzsd@xxxxxxxxx>
---
arch/x86/kvm/lapic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 3136e05..7882322 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -674,7 +674,7 @@ static bool pv_eoi_get_pending(struct kvm_vcpu *vcpu)
(unsigned long long)vcpu->arch.pv_eoi.msr_val);
return false;
}
- return val & 0x1;
+ return val & KVM_PV_EOI_ENABLED;
}
static void pv_eoi_set_pending(struct kvm_vcpu *vcpu)


Queued, thanks.

Paolo