[RFC PATCH 1/9] x86/sev: Define extended #HV doorbell page structure
From: Melody Wang
Date: Tue Nov 10 2026 - 03:37:58 EST
Alternate Injection extends the #HV doorbell page with additional
information about interrupts or events related to interrupt processing
for VMPL1-3.
Define the extended #HV doorbell page according to the spec.
Signed-off-by: Melody Wang <huibo.wang@xxxxxxx>
---
arch/x86/include/asm/svm.h | 60 +++++++++++++++++++++++++++++++++++---
1 file changed, 56 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h
index 32a35ee10bce..c658eba189dc 100644
--- a/arch/x86/include/asm/svm.h
+++ b/arch/x86/include/asm/svm.h
@@ -259,8 +259,43 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
* is shared between the guest and hypervisor to communicate exception and
* interrupt events.
*/
+struct ext_irq_desc {
+ /* first 16-bit word */
+ union {
+ struct {
+ u16 si_vector: 8,
+ nmi: 1,
+ mce: 1,
+ trigger_mode: 1,
+ reserved6: 3,
+ multi_interrupts: 1,
+ reserved7: 1;
+ };
+
+ u16 ext_word0;
+ };
+
+ /* Second 16-bit word */
+ union {
+ struct {
+ u16 reserved8: 15,
+ interrupt_vector: 1;
+ };
+
+ u16 ext_word1;
+ };
+
+ /*
+ * Set the corresponding vmpl?_irq bit in the bitmap after setting
+ * multiple bits here.
+ */
+ u16 interrupt_bit_vector[14];
+
+ u8 reserved9[32];
+} __packed;
+
struct hvdb_events {
- /* First 64 bytes of HV doorbell page defined in GHCB specification */
+ /* first 16-bit word PendingEvent */
union {
struct {
/* Non-maskable event indicators */
@@ -274,10 +309,27 @@ struct hvdb_events {
u16 pending_events;
};
- u8 no_eoi_required;
+ /* Second 16-bit word InjectionInfo */
+ union {
+ struct {
+ u16 no_eoi_required: 1,
+ reserved3: 7,
+ vmpl1_irq: 1,
+ vmpl2_irq: 1,
+ vmpl3_irq: 1,
+ reserved4: 5;
+ };
+
+ u16 second_word;
+ };
+
+ /* IRQ info associated with the SVSM itself */
+ u8 svsm_irq_info[64 - 4];
- u8 reserved3[61];
-};
+ /* VMPL[1-3] extended IRQ descriptions */
+ struct ext_irq_desc irqs[3];
+
+} __packed;
struct hvdb {
struct hvdb_events events;
--
2.43.0