2024-04-23 17:38:50

by Jacob Pan

[permalink] [raw]
Subject: [PATCH v3 05/12] x86/irq: Reserve a per CPU IDT vector for posted MSIs

When posted MSI is enabled, all device MSIs are multiplexed into a single
notification vector. MSI handlers will be de-multiplexed at run-time by
system software without IDT delivery.

Signed-off-by: Jacob Pan <[email protected]>

---
v2:
- Add missing CONFIG_ in #ifdef
- Extend changes to x86 tools
---
arch/x86/include/asm/irq_vectors.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h
index d18bfb238f66..13aea8fc3d45 100644
--- a/arch/x86/include/asm/irq_vectors.h
+++ b/arch/x86/include/asm/irq_vectors.h
@@ -97,10 +97,16 @@

#define LOCAL_TIMER_VECTOR 0xec

+/*
+ * Posted interrupt notification vector for all device MSIs delivered to
+ * the host kernel.
+ */
+#define POSTED_MSI_NOTIFICATION_VECTOR 0xeb
+
#define NR_VECTORS 256

#ifdef CONFIG_X86_LOCAL_APIC
-#define FIRST_SYSTEM_VECTOR LOCAL_TIMER_VECTOR
+#define FIRST_SYSTEM_VECTOR POSTED_MSI_NOTIFICATION_VECTOR
#else
#define FIRST_SYSTEM_VECTOR NR_VECTORS
#endif
--
2.25.1



Subject: [tip: x86/irq] x86/irq: Reserve a per CPU IDT vector for posted MSIs

The following commit has been merged into the x86/irq branch of tip:

Commit-ID: f5a3562ec9dd29e61735ccf098d8ba05cf6c7c72
Gitweb: https://git.kernel.org/tip/f5a3562ec9dd29e61735ccf098d8ba05cf6c7c72
Author: Jacob Pan <[email protected]>
AuthorDate: Tue, 23 Apr 2024 10:41:07 -07:00
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Tue, 30 Apr 2024 00:54:42 +02:00

x86/irq: Reserve a per CPU IDT vector for posted MSIs

When posted MSI is enabled, all device MSIs are multiplexed into a single
notification vector. MSI handlers will be de-multiplexed at run-time by
system software without IDT delivery.

Signed-off-by: Jacob Pan <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]


---
arch/x86/include/asm/irq_vectors.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h
index d18bfb2..13aea8f 100644
--- a/arch/x86/include/asm/irq_vectors.h
+++ b/arch/x86/include/asm/irq_vectors.h
@@ -97,10 +97,16 @@

#define LOCAL_TIMER_VECTOR 0xec

+/*
+ * Posted interrupt notification vector for all device MSIs delivered to
+ * the host kernel.
+ */
+#define POSTED_MSI_NOTIFICATION_VECTOR 0xeb
+
#define NR_VECTORS 256

#ifdef CONFIG_X86_LOCAL_APIC
-#define FIRST_SYSTEM_VECTOR LOCAL_TIMER_VECTOR
+#define FIRST_SYSTEM_VECTOR POSTED_MSI_NOTIFICATION_VECTOR
#else
#define FIRST_SYSTEM_VECTOR NR_VECTORS
#endif