On 01/07/2025 1:11 pm, Jan Beulich wrote:
> On 01.07.2025 12:53, Andrew Cooper wrote:
>> When support was originally introduced, ebx, ecx and edx were reserved and
>> should have been zeroed in recalculate_misc() to avoid leaking into guests.
>>
>> Since then, fields have been added into ebx.  Guests can't load microcode, so
>> shouldn't see ucode_size, and while in principle we do want to support larger
>> RAP sizes in guests, virtualising this for guests depends on AMD procuding 
>> any
>> official documentation for ERAPS, which is long overdue and with no ETA.
>>
>> This patch will cause a difference in guests on Zen5 CPUs, but as the main
>> ERAPS feature is hidden, guests should be ignoring the rap_size field too.
>>
>> Fixes: e9b4fe263649 ("x86/cpuid: support LFENCE always serialising CPUID 
>> bit")
>> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
> Reviewed-by: Jan Beulich <jbeul...@suse.com>

Thanks.

> I notice I have similar omissions in the respective AVX10.2 and KL patches.

The handling is clearly fragile.  I reviewed e9b4fe263649 and failed to
spot it.

I think it will be better when we're not having Xen fix up behind the
back of an unwitting toolstack.  At least then we'll have all the logic
in libx86 and can unit test it properly with real policies.

Until then, I think we'll just have to stay vigilant.

~Andrew

Reply via email to