Skip to content

Commit 59b18a1

Browse files
reet-KAGA-KOKO
authored andcommitted
x86/msi: Fix msi message data shadow struct
The x86 MSI message data is 32 bits in total and is either in compatibility or remappable format, see Intel Virtualization Technology for Directed I/O, section 5.1.2. Fixes: 6285aa5 ("x86/msi: Provide msi message shadow structs") Co-developed-by: Adrian-Ken Rueegsegger <ken@codelabs.ch> Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch> Signed-off-by: Reto Buerki <reet@codelabs.ch> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220407110647.67372-1-reet@codelabs.ch
1 parent 334865b commit 59b18a1

File tree

1 file changed

+11
-8
lines changed
  • arch/x86/include/asm

1 file changed

+11
-8
lines changed

arch/x86/include/asm/msi.h

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec,
1212
/* Structs and defines for the X86 specific MSI message format */
1313

1414
typedef struct x86_msi_data {
15-
u32 vector : 8,
16-
delivery_mode : 3,
17-
dest_mode_logical : 1,
18-
reserved : 2,
19-
active_low : 1,
20-
is_level : 1;
21-
22-
u32 dmar_subhandle;
15+
union {
16+
struct {
17+
u32 vector : 8,
18+
delivery_mode : 3,
19+
dest_mode_logical : 1,
20+
reserved : 2,
21+
active_low : 1,
22+
is_level : 1;
23+
};
24+
u32 dmar_subhandle;
25+
};
2326
} __attribute__ ((packed)) arch_msi_msg_data_t;
2427
#define arch_msi_msg_data x86_msi_data
2528

0 commit comments

Comments
 (0)