From: Thomas Gleixner <tglx@linutronix.de>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: x86: Spurious vectors not handled robustly
Date: Mon, 24 Jun 2019 12:09:28 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1906241204430.32342@nanos.tec.linutronix.de> (raw)
In-Reply-To: <e525108f-3749-4e1d-1ac2-0d0a2655f15f@siemens.com>
Jan,
On Mon, 24 Jun 2019, Jan Kiszka wrote:
> probably since "x86: Avoid building unused IRQ entry stubs" (2414e021ac8d),
> the kernel can no longer tell spurious IRQs by the APIC apart from spuriously
> triggered unused vectors.
Err. It does.
> We've managed to trigger such a cause with the Jailhouse hypervisor
> (incorrectly injected MANAGED_IRQ_SHUTDOWN_VECTOR), and the result was
> not only a misreport of the vector number (0xff instead of 0xef - took me
> a while...), but also stalled interrupts of equal and lower priority
> because a spurious interrupt is not (and must not be) acknowledged.
That does not make sense.
__visible void __irq_entry smp_spurious_interrupt(struct pt_regs *regs)
{
u8 vector = ~regs->orig_ax;
u32 v;
entering_irq();
trace_spurious_apic_entry(vector);
/*
* Check if this really is a spurious interrupt and ACK it
* if it is a vectored one. Just in case...
*/
v = apic_read(APIC_ISR + ((vector & ~0x1f) >> 1));
if (v & (1 << (vector & 0x1f)))
ack_APIC_irq();
If it is a vectored one it _IS_ acked.
inc_irq_stat(irq_spurious_count);
/* see sw-dev-man vol 3, chapter 7.4.13.5 */
pr_info("spurious APIC interrupt through vector %02x on CPU#%d, "
"should never happen.\n", vector, smp_processor_id());
and the vector through which that comes is printed correctly, unless
regs->orig_ax is hosed.
Thanks,
tglx
next prev parent reply other threads:[~2019-06-24 10:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 10:00 x86: Spurious vectors not handled robustly Jan Kiszka
2019-06-24 10:09 ` Thomas Gleixner [this message]
2019-06-24 10:21 ` Jan Kiszka
2019-06-24 10:37 ` Thomas Gleixner
2019-06-24 13:46 ` Thomas Gleixner
2019-06-24 15:26 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.21.1906241204430.32342@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=bp@alien8.de \
--cc=jan.kiszka@siemens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).