Skip to contentSkip to conversation

KVM: x86: change in pv_eoi_get_pending() to make code more readable

PATCH Applied Stephen Zhang 2 participants 2 messages Dec 18, 2020 – Dec 21, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: x86: change in pv_eoi_get_pending() to make code more readable

---
 arch/x86/kvm/lapic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/lapic.c +1 -1
index 3136e05..7882322 100644
@@ -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)
Signature · 1 line
1.8.3.1
maintainer Applied
#1 lore raw
Quoted 11 lines · Stephen Zhang
---
  arch/x86/kvm/lapic.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/lapic.c +0 -0
index 3136e05..7882322 100644

arch/x86/kvm/lapic.c static bool pv_eoi_get_pending(struct kvm_vcpu *vcpu) · line 680

Quoted 8 lines
arch/x86/kvm/lapic.c +1 -1
@@ -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