Re: [PATCH v6 08/11] misc: amd-sbi: Add support for CPUID protocol
From: Arnd Bergmann
Date: Mon Mar 24 2025 - 11:31:53 EST
On Mon, Mar 24, 2025, at 15:58, Akshay Gupta wrote:
> struct apml_message {
> /*
> * [0]...[3] mailbox 32bit input
> + * cpuid,
> + * [4][5] cpuid: thread
> + * [6] cpuid: ext function & read eax/ebx or ecx/edx
> + * [7:0] -> bits [7:4] -> ext function &
> + * bit [0] read eax/ebx or ecx/edx
> * [7] read/write functionality
> */
> union {
> + __u64 cpu_msr_in;
> __u32 mb_in[2];
> __u8 reg_in[8];
> } data_in;
This changes the alignment of the structure and makes
it incompatible between 32-bit and 64-bit userspace
when there is an odd number of 32-bit words in it.
Arnd