From: "tip-bot2 for Vitaly Kuznetsov" <tip-bot2@linutronix.de> To: linux-tip-commits@vger.kernel.org Cc: Vitaly Kuznetsov <vkuznets@redhat.com>, Thomas Gleixner <tglx@linutronix.de>, x86 <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org> Subject: [tip: x86/entry] x86/idt: Keep spurious entries unset in system_vectors Date: Wed, 13 May 2020 19:16:19 -0000 [thread overview] Message-ID: <158939737963.390.665754907969971935.tip-bot2@tip-bot2> (raw) In-Reply-To: <20200428093824.1451532-4-vkuznets@redhat.com> The following commit has been merged into the x86/entry branch of tip: Commit-ID: 82ff351052bcc4bf49dc966960f563d25f54d22b Gitweb: https://git.kernel.org/tip/82ff351052bcc4bf49dc966960f563d25f54d22b Author: Vitaly Kuznetsov <vkuznets@redhat.com> AuthorDate: Tue, 28 Apr 2020 11:38:24 +02:00 Committer: Thomas Gleixner <tglx@linutronix.de> CommitterDate: Wed, 13 May 2020 21:13:55 +02:00 x86/idt: Keep spurious entries unset in system_vectors With commit dc20b2d52653 ("x86/idt: Move interrupt gate initialization to IDT code") non assigned system vectors are also marked as used in 'used_vectors' (now 'system_vectors') bitmap. This makes checks in arch_show_interrupts() whether a particular system vector is allocated to always pass and e.g. 'Hyper-V reenlightenment interrupts' entry always shows up in /proc/interrupts. Another side effect of having all unassigned system vectors marked as used is that irq_matrix_debug_show() will wrongly count them among 'System' vectors. As it is now ensured that alloc_intr_gate() is not called after init, it is possible to leave unused entries in 'system_vectors' unset to fix these issues. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200428093824.1451532-4-vkuznets@redhat.com --- arch/x86/kernel/idt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/idt.c b/arch/x86/kernel/idt.c index 0e92051..36fef90 100644 --- a/arch/x86/kernel/idt.c +++ b/arch/x86/kernel/idt.c @@ -321,7 +321,11 @@ void __init idt_setup_apic_and_irq_gates(void) #ifdef CONFIG_X86_LOCAL_APIC for_each_clear_bit_from(i, system_vectors, NR_VECTORS) { - set_bit(i, system_vectors); + /* + * Don't set the non assigned system vectors in the + * system_vectors bitmap. Otherwise they show up in + * /proc/interrupts. + */ entry = spurious_entries_start + 8 * (i - FIRST_SYSTEM_VECTOR); set_intr_gate(i, entry); }
next prev parent reply other threads:[~2020-05-13 19:16 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-28 9:38 [PATCH v2 0/3] x86/idt: Minor alloc_intr_gate() sanitization Vitaly Kuznetsov 2020-04-28 9:38 ` [PATCH v2 1/3] x86/xen: Split HVM vector callback setup and interrupt gate allocation Vitaly Kuznetsov 2020-05-13 19:16 ` [tip: x86/entry] " tip-bot2 for Vitaly Kuznetsov 2020-04-28 9:38 ` [PATCH v2 2/3] x86/idt: Annotate alloc_intr_gate() with __init Vitaly Kuznetsov 2020-05-13 19:16 ` [tip: x86/entry] " tip-bot2 for Vitaly Kuznetsov 2020-04-28 9:38 ` [PATCH v2 3/3] x86/idt: Keep spurious entries unset in system_vectors Vitaly Kuznetsov 2020-05-13 19:16 ` tip-bot2 for Vitaly Kuznetsov [this message] 2020-05-13 12:57 ` [PATCH v2 0/3] x86/idt: Minor alloc_intr_gate() sanitization Vitaly Kuznetsov 2020-05-13 19:02 ` Thomas Gleixner 2020-05-14 8:10 ` Vitaly Kuznetsov
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=158939737963.390.665754907969971935.tip-bot2@tip-bot2 \ --to=tip-bot2@linutronix.de \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-tip-commits@vger.kernel.org \ --cc=tglx@linutronix.de \ --cc=vkuznets@redhat.com \ --cc=x86@kernel.org \ --subject='Re: [tip: x86/entry] x86/idt: Keep spurious entries unset in system_vectors' \ /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
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.