* [PATCH] KVM: x86: Simplify kvm_apic_hw_enabled
@ 2022-12-06 9:20 Hao Peng
0 siblings, 0 replies; 2+ messages in thread
From: Hao Peng @ 2022-12-06 9:20 UTC (permalink / raw)
To: pbonzini; +Cc: kvm, Sean Christopherson, linux-kernel
From: Peng Hao <flyingpeng@tencent.com>
kvm_apic_hw_enabled() only needs to return bool, there is no place
to use the return value of MSR_IA32_APICBASE_ENABLE.
Signed-off-by: Peng Hao <flyingpeng@tencent.com>
---
arch/x86/kvm/lapic.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h
index 28e3769066e2..58c3242fcc7a 100644
--- a/arch/x86/kvm/lapic.h
+++ b/arch/x86/kvm/lapic.h
@@ -188,11 +188,11 @@ static inline bool lapic_in_kernel(struct kvm_vcpu *vcpu)
extern struct static_key_false_deferred apic_hw_disabled;
-static inline int kvm_apic_hw_enabled(struct kvm_lapic *apic)
+static inline bool kvm_apic_hw_enabled(struct kvm_lapic *apic)
{
if (static_branch_unlikely(&apic_hw_disabled.key))
return apic->vcpu->arch.apic_base & MSR_IA32_APICBASE_ENABLE;
- return MSR_IA32_APICBASE_ENABLE;
+ return true;
}
extern struct static_key_false_deferred apic_sw_disabled;
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: x86: Simplify kvm_apic_hw_enabled
[not found] <CAPm50aJ=BLXNWT11+j36Dd6d7nz2JmOBk4u7o._5FNPQ0N61ODu1g@mail.gmail.com>
@ 2022-12-23 17:09 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2022-12-23 17:09 UTC (permalink / raw)
To: Hao Peng; +Cc: pbonzini, kvm, Sean Christopherson, linux-kernel
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-23 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06 9:20 [PATCH] KVM: x86: Simplify kvm_apic_hw_enabled Hao Peng
[not found] <CAPm50aJ=BLXNWT11+j36Dd6d7nz2JmOBk4u7o._5FNPQ0N61ODu1g@mail.gmail.com>
2022-12-23 17:09 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).