lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 3 Jul 2022 00:54:10 -0400 From: Deming Wang <wangdeming@...pur.com> To: <seanjc@...gle.com>, <pbonzini@...hat.com>, <tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>, <dave.hansen@...ux.intel.com>, <x86@...nel.org> CC: <hpa@...or.com>, <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Deming Wang <wangdeming@...pur.com> Subject: [PATCH] KVM: LAPIC: Separate the variable declaration and code logic The function apic_has_interrupt_for_ppr and the function kvm_apic_is_broadcast_dest should follow the same style as other codes. Signed-off-by: Deming Wang <wangdeming@...pur.com> --- arch/x86/kvm/lapic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index f03facc2ee3e..d8940486878d 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -739,12 +739,14 @@ static bool pv_eoi_test_and_clr_pending(struct kvm_vcpu *vcpu) static int apic_has_interrupt_for_ppr(struct kvm_lapic *apic, u32 ppr) { int highest_irr; + if (kvm_x86_ops.sync_pir_to_irr) highest_irr = static_call(kvm_x86_sync_pir_to_irr)(apic->vcpu); else highest_irr = apic_find_highest_irr(apic); if (highest_irr == -1 || (highest_irr & 0xF0) <= ppr) return -1; + return highest_irr; } @@ -932,6 +934,7 @@ static bool kvm_apic_is_broadcast_dest(struct kvm *kvm, struct kvm_lapic **src, return true; } else { bool x2apic_ipi = src && *src && apic_x2apic_mode(*src); + if (irq->dest_id == (x2apic_ipi ? X2APIC_BROADCAST : APIC_BROADCAST)) return true; -- 2.27.0
Powered by blists - more mailing lists