On 26.06.2025 17:45, Jan Beulich wrote:
> On 26.06.2025 17:31, Andrew Cooper wrote:
>> On 16/06/2025 1:59 pm, Jan Beulich wrote:
>>> +    if ( !raw_cpu_policy.feat.erms )
>>
>> This wants to be the host policy, not the raw policy.  That's why
>> `cpuid=no-erms` isn't working in the way you'd expect.
>>
>> cpuid=no-$foo means "Xen should behave as if $foo wasn't reported by
>> hardware", and that includes not giving it to guests by default.
> 
> Hmm, interesting. That's definitely not the meaning I give this. To me it
> means merely Xen shouldn't use the feature (with an impact on guests only
> when the feature in hardware is required to surface it to guests). I
> don't think we have the precise meaning of this option written down
> anywhere?

Then again I notice what you ask for is in line with uses of cpu_has_*
(where available) elsewhere (e.g. in your "x86/cpu-policy: Simplify logic
in guest_common_default_feature_adjustments()"), with
calculate_host_policy() simply copying boot_cpu_data.x86_capability into
the host policy. So yes, I guess I'll need to adjust.

Ftaod, this still leaves open what exact meaning "cpuid=no-..." ought to
have. While kind of an example in the opposite direction, consider e.g.
"cpuid=no-lm": This cannot sensibly have any effect on Xen itself. It
could plausibly mean to permit only 32-bit guests.

Jan

Reply via email to