[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/pv: Inline domain_set_alloc_bitsize() into it's single caller


  • To: Grygorii Strashko <grygorii_strashko@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 9 Dec 2025 19:29:15 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=T6/d3t8RbuO+YWintdj/kQr3VZIhHoXgOWe4+2QqjY4=; b=aeu0ScvvBNYE6a8PVGHzFY6+pQA17Jaq5d2DrwvdkjsTVsRo1PfXDXJauz81AiOIXWTq2wTlezZ59JwcrD//inBJvXcMscqMj0qRJvodM5Xu8KeT4Xriw8lmbMRDwu9S/BwoKsy07Vnf74V21u7bqJdoYBw0opLMOPvbzEXOAZwqF5/E8hemw5Ntxo+OG1XlxbQ0oq8JQrda7ji0Bo1nqeGoEkdvAah76wGLoEPkmNAFyPlldNCOfwMplFhSPmGMTbOgg3ycD9llOZ7kwugM92CPf+dAh/CL92PEBE3L348I/Lngt6XGXfLZySfCnOPwLhSCILzXSbQjfVvxZTohuQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ia2nvS0bC+S6zfMNZjLUq1/tz2VqbEa9D44v3b5hC/PHxCZOvNm+u81NmnOTFfbNrTqOPLmdc/BXIrO8trkJ2DCFTulUijCId1PO3M2cqvtpZdKcijlaNLfvHUncqaezvbvHMVqp8nByP6RRKRj49c7aoWmvsYfcHSss5YfAfdDesTfUq+7beSYtpedwRPcC0Nqog1eWltSFr/Gu/5OUOU/oGyZ3NelXhuqzhJncU/OPowu1NW1rgS8M8NO2NA47pwsG1dWKjLClvtmKt7lmKYBLD0+wM7aQtdHrQUOArKL9kd4gTwdBELxg62tG+XBQJwt9f83iZgZAhUi2v68uHA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: andrew.cooper3@xxxxxxxxxx, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 09 Dec 2025 19:29:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 <grygorii_strashko@xxxxxxxx>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> ---
>> CC: Jan Beulich <JBeulich@xxxxxxxx>
>> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>> CC: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
>>
>> 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 <grygorii_strashko@xxxxxxxx>

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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.