[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a1d3b2dd-e4d0-4733-85a0-7d9f83c396a7@zytor.com>
Date: Sat, 29 Jun 2024 11:32:10 -0700
From: Xin Li <xin@...or.com>
To: Jacob Pan <jacob.jun.pan@...ux.intel.com>, X86 Kernel <x86@...nel.org>,
Sean Christopherson <seanjc@...gle.com>,
LKML
<linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Dave Hansen <dave.hansen@...el.com>, "H. Peter Anvin" <hpa@...or.com>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Xin Li <xin3.li@...el.com>, linux-perf-users@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>
Cc: Paolo Bonzini <pbonzini@...hat.com>, Tony Luck <tony.luck@...el.com>,
Andy Lutomirski <luto@...nel.org>, acme@...nel.org,
kan.liang@...ux.intel.com, Andi Kleen <andi.kleen@...el.com>,
"Mehta, Sohil" <sohil.mehta@...el.com>
Subject: Re: [PATCH v3 02/11] x86/irq: Define NMI source vectors
On 6/28/2024 1:18 PM, Jacob Pan wrote:
> When NMI-source reporting is supported, each logical processor maintains
> a 16-bit NMI-source bitmap. It is up to the system software to assign NMI
> sources for their matching vector (bit position) in the bitmap.
>
> Notice that NMI source vector is in a different namespace than the IDT
> vectors. Though they share the same programming interface/field in the
> NMI originator.
>
> This initial allocation of the NMI sources are limited to local NMIs in
> that there is no external device NMI usage yet.
>
> Signed-off-by: Jacob Pan <jacob.jun.pan@...ux.intel.com>
> ---
> arch/x86/include/asm/irq_vectors.h | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h
> index 13aea8fc3d45..e4cd33bc4fef 100644
> --- a/arch/x86/include/asm/irq_vectors.h
> +++ b/arch/x86/include/asm/irq_vectors.h
> @@ -105,6 +105,34 @@
>
> #define NR_VECTORS 256
>
> +/*
> + * The NMI senders specify the NMI source vector as an 8bit integer in their
s/The NMI senders/NMI senders/
> + * vector field with NMI delivery mode. A local APIC receiving an NMI will
> + * set the corresponding bit in a 16bit bitmask, which is accumulated until
> + * the NMI is delivered.
> + * When a sender didn't specify an NMI source vector the source vector will
> + * be 0, which will result in bit 0 of the bitmask being set. For out of
> + * bounds vectors >= 16 bit 0 will also be set.
> + * When bit 0 is set, system software must invoke all registered NMI handlers
> + * as if NMI source feature is not enabled.
Add empty lines in the above paragraph.
> + *
> + * Vector 2 is reserved for matching IDT NMI vector where it may be hardcoded
> + * by some external devices.
> + *
> + * The NMI source vectors are sorted by descending priority with the exceptions
> + * of 0 and 2.
> + */
> +#define NMI_SOURCE_VEC_UNKNOWN 0
> +#define NMI_SOURCE_VEC_IPI_REBOOT 1 /* Crash reboot */
> +#define NMI_SOURCE_VEC_IDT_NMI 2 /* Match IDT NMI vector 2 */
> +#define NMI_SOURCE_VEC_IPI_SMP_STOP 3 /* Panic stop CPU */
> +#define NMI_SOURCE_VEC_IPI_BT 4 /* CPU backtrace */
> +#define NMI_SOURCE_VEC_PMI 5 /* PerfMon counters */
> +#define NMI_SOURCE_VEC_IPI_KGDB 6 /* KGDB */
> +#define NMI_SOURCE_VEC_IPI_MCE 7 /* MCE injection */
> +#define NMI_SOURCE_VEC_IPI_TEST 8 /* For remote and local IPIs */
> +#define NR_NMI_SOURCE_VECTORS 9
Fix alignment.
> +
> #ifdef CONFIG_X86_LOCAL_APIC
> #define FIRST_SYSTEM_VECTOR POSTED_MSI_NOTIFICATION_VECTOR
> #else
Powered by blists - more mailing lists