On 01/07/2025 11:53 am, Andrew Cooper wrote:
> diff --git a/xen/include/xen/lib/x86/cpu-policy.h
> b/xen/include/xen/lib/x86/cpu-policy.h
> index f43e1a3b21e9..aeaa16bbc732 100644
> --- a/xen/include/xen/lib/x86/cpu-policy.h
> +++ b/xen/include/xen/lib/x86/cpu-policy.h
> @@ -325,7 +325,10 @@ struct cpu_policy
> uint32_t e21a;
> struct { DECL_BITFIELD(e21a); };
> };
> - uint32_t /* b */:32, /* c */:32, /* d */:32;
> + uint32_t ucode_size:12, /* Units of 16 bytes */
> + rap_size:8, /* Units of 8 entries */
> + :12;
Having tried this out on a real CPU, it's not correct.
The APM and Genona PPR say that ucode_size is 12 bits wide, with the
rest of the register reserved.
However, the Turin PPR says it's 16 bits wide, with rap_size being 8
bits starting at bit 16. The raw value is 0x00080382, which matches the
PPR.
Therefore I'm going to turn this into a plain uint16_t and uint8_t as
there's no need for bitfields any more. (Which I suspect might be why
the 12->16 change was made.)
~Andrew