Commit b02c1f18 authored by Reto Buerki's avatar Reto Buerki Committed by PvsNarasimha
Browse files

x86/msi: Fix msi message data shadow struct

mainline inclusion
from mainline-v5.18-rc2
commit 59b18a1e
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAU6ZD

Reference: https://github.com/torvalds/linux/commit/59b18a1e65b7a2134814106d0860010e10babe18



--------------------------------

commit 59b18a1e upstream

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: 6285aa50 ("x86/msi: Provide msi message shadow structs")
Co-developed-by: default avatarAdrian-Ken Rueegsegger <ken@codelabs.ch>
Signed-off-by: default avatarAdrian-Ken Rueegsegger <ken@codelabs.ch>
Signed-off-by: default avatarReto Buerki <reet@codelabs.ch>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220407110647.67372-1-reet@codelabs.ch


Signed-off-by: default avatarPvsNarasimha <PVS.NarasimhaRao@amd.com>
parent 9cf3b271
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -12,14 +12,17 @@ int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec,
/* Structs and defines for the X86 specific MSI message format */

typedef struct x86_msi_data {
	union {
		struct {
			u32	vector			:  8,
				delivery_mode		:  3,
				dest_mode_logical	:  1,
				reserved		:  2,
				active_low		:  1,
				is_level		:  1;

		};
		u32	dmar_subhandle;
	};
} __attribute__ ((packed)) arch_msi_msg_data_t;
#define arch_msi_msg_data	x86_msi_data