On 09/12/2025 7:21 pm, Grygorii Strashko wrote:
> Hi Andrew,
>
> On 09.12.25 20:07, Andrew Cooper wrote:
>> Prior to commit 02e78311cdc6 ("x86/domctl: Make
>> XEN_DOMCTL_set_address_size
>> singleshot") (Xen 4.9, 2016), it was possible for domains to switch
>> to being
>> compat, and back again.  Since then however, becoming compat is a
>> singleton
>> action that can't be undone.
>>
>>  From the context it's clear to see the is_pv_32bit_domain() check is
>> redundant, and from the singleton nature being the only place setting
>> physaddr_bitsize, there's no need to check it for being 0.
>>
>> No functional change.
>>
>> Co-developed-by: Grygorii Strashko <[email protected]>
>> Signed-off-by: Andrew Cooper <[email protected]>
>> ---
>> CC: Jan Beulich <[email protected]>
>> CC: Roger Pau Monné <[email protected]>
>> CC: Grygorii Strashko <[email protected]>
>>
>> Split out of series to simplify things.
>>
>> bloat-o-meter reports:
>>
>>    add/remove: 0/1 grow/shrink: 1/0 up/down: 25/-96 (-71)
>>    Function                                     old     new   delta
>>    switch_compat                                447     472     +25
>>    domain_set_alloc_bitsize                      96       -     -96
>>
>> which will mostly be the LFENCEs embedded in is_pv_32bit_domain().
>
> Thank you for doing this.
> Not sure if it's needed, any way.
> Reviewed-by: Grygorii Strashko <[email protected]>

It does help.  Technically it lets me commit the patch right now, but
I'll leave it until at least tomorrow in case anyone else has comments.

~Andrew


Reply via email to