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

Re: [PATCH 1/2] xen/arm: gnttab: use static inlines for gnttab_{release_}host_mapping*


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 6 May 2022 11:57:54 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=+Jcgw0lQ7VK7kWoEy2HNfbVhD4LlU/OJsjypeM2ORk8=; b=kaU30F2USUy7o8d9bSj9K+sZYIvTYfaXyFNE3aJ2TLQPeyhtqLhQvKPdrmMyU++nqxLtL/wOGKwxyrudnIuTHCrBifoUBdXST/FDWoTgAeIOXHa4kTf+KrBlDLDJZ8UganQHlfE+BEk9Q4fO5K8z/egxAEdQ1rIUQgeduTvknDcLNtZhvHZX1lYBlTaBkCD48B/06+DaR3bz/o69tMENrHCWfuvkLgiWP8925HpYad7Y8jFJGg1xAAfh1WYy6D7l53T7QTJRMDaamCX7NIZ2vfNOSihad8CLEX9R5ouwgEAggXGR6/9KWIb8LtaMNE+fm9C2ri9IjlQl00RGTgwzsw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bbEPlwQNO2WirrE15tdkFqADNgw8Ssx0mLnLEAU/CjdueeXSdj24Uih74HwvpxAO7AfB+pj0mzQU7FyYEFKHv1GILYv2vNeUihpTU/GyJDJRGxZ7FfkhXIOp4kJ38gykgvLLMxBGRUtgsJCsey0Xt7xqKd+A62kvzyDg1kCFj492cJ/B/4P1va3deWK8Cod1ZGiH7D9hAPgujS1RTwS2uqbBLEYjFAJ0TDeTAxOpbaRuQt2CORsT7vhofZ04IAgVGMOeNIxtexpS0x1FhwqT70SWmfw1Kio34+lKPaYx1qur5twl0VsRMwETBui90U+PbM2HhoXg7LbIPvYYOzGDHQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 06 May 2022 09:58:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 06.05.2022 09:27, Michal Orzel wrote:
> 
> 
> On 05.05.2022 13:13, Jan Beulich wrote:
>> On 05.05.2022 12:36, Michal Orzel wrote:
>>> --- a/xen/arch/arm/include/asm/grant_table.h
>>> +++ b/xen/arch/arm/include/asm/grant_table.h
>>> @@ -29,12 +29,21 @@ static inline void gnttab_mark_dirty(struct domain *d, 
>>> mfn_t mfn)
>>>  #endif
>>>  }
>>>  
>>> +static inline bool gnttab_host_mapping_get_page_type(bool ro, struct 
>>> domain *ld,
>>> +                                                     struct domain *rd)
>>> +{
>>> +    return false;
>>> +}
>>> +
>>> +static inline bool gnttab_release_host_mappings(struct domain *d)
>>> +{
>>> +    return true;
>>> +}
>>
>> Looking at x86 I think all three instances of struct domain * want to
>> be const struct domain *. Then
>> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
>>
> Thanks. I think we should mark all parameters as const meaning also const 
> bool ro.

Not really - I did suggest "pointer to const" which is different from the
parameter itself being const. We don't normally do the latter, and I'd
recommend we don't start, or else we'll end up with

static inline bool gnttab_host_mapping_get_page_type(const bool ro,
                                                     const struct domain *const 
ld,
                                                     const struct domain *const 
rd)
{ ...

Jan




 


Rackspace

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