Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: b5c3786ee370 ("iommu/amd: Use msi_msg shadow structs")
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201111144322.1659970-2-dwmw2@infradead.org

authored by

David Woodhouse and committed by
Thomas Gleixner
2fb6acf3 aec8da04

+9 -7
+9 -7
drivers/iommu/amd/init.c
··· 1967 1967 1968 1968 union intcapxt { 1969 1969 u64 capxt; 1970 - u64 reserved_0 : 2, 1971 - dest_mode_logical : 1, 1972 - reserved_1 : 5, 1973 - destid_0_23 : 24, 1974 - vector : 8, 1975 - reserved_2 : 16, 1976 - destid_24_31 : 8; 1970 + struct { 1971 + u64 reserved_0 : 2, 1972 + dest_mode_logical : 1, 1973 + reserved_1 : 5, 1974 + destid_0_23 : 24, 1975 + vector : 8, 1976 + reserved_2 : 16, 1977 + destid_24_31 : 8; 1978 + }; 1977 1979 } __attribute__ ((packed)); 1978 1980 1979 1981 /*