Commit 2fb6acf3 authored by David Woodhouse's avatar David Woodhouse Committed by Thomas Gleixner
Browse files

iommu/amd: Fix union of bitfields in intcapxt support



All the bitfields in here are overlaid on top of each other since
they're a union. Change the second u64 to be in a struct so it does
the intended thing.

Fixes: b5c3786e ("iommu/amd: Use msi_msg shadow structs")
Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201111144322.1659970-2-dwmw2@infradead.org
parent aec8da04
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -1967,6 +1967,7 @@ static int iommu_setup_msi(struct amd_iommu *iommu)

union intcapxt {
	u64	capxt;
	struct {
		u64	reserved_0		:  2,
			dest_mode_logical	:  1,
			reserved_1		:  5,
@@ -1974,6 +1975,7 @@ union intcapxt {
			vector			:  8,
			reserved_2		: 16,
			destid_24_31		:  8;
	};
} __attribute__ ((packed));

/*