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

Re: [PATCH v2] xen: Replace arch_mfn_in_directmap() with arch_mfns_in_directmap()


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 26 Jan 2022 17:25:56 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=luucFCMsAoI9aYqg1BjC3cocxqtbGm9oOWTDcbdrRcA=; b=oIL/icJ6k9gBFYkgGF3/BL+htdkQbtPjqBSht0QontMz6EHVC+tD6xjl/SOTNIbBFOXfm5sOlVDnx/1I9b6EF77BXt2vBlwEaNqa/Pn4dag1q4Yi/mJsYKJD5jIIe/lQCmc2vDodlOTvP3H57mRuCZm5G350EzbePIF4351LYM4VBiKgT5SxDUWfPy9ZQPNVv2vQqrS7U50Pl9306Sr73argKMOmwlbX8uyrHH+zvHf27e0G7VjuyZhSIfOOSSkHAalvFVHszPhRF7N95VGr78ou8EiztR+OXB5YLx1mQgk2cOg63nCoprT0jZ3ngvPPrxxHCzTpTA8wJlOvuJQoGA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J2i90S3uRWhcrWNcsiR/71uYY5lfh3fToeil/RzMrZcUYDAwPS3JUM8g/bmXGquwqLn3gLARU/4HyxG3lLrGogupGn2ERn+ydLdNWnAZvzlWfI7DzIPG1n5Rggdp/333LG9VwDCxQ6NvlAs8Nl8qFN8AJwYvonc6ioAtPMcqouWc/oRKAlknGaV2AqUbB8Bzz+nLBoBCbLQlLqduRzZRbY3nLgEBJHL0npY/D0pjvyvfCmr/aW+7TBkIhfchwd3ExnX6GaJjTQEpWNhnq4VnOzB7QonefOgLdK5kII+t1b2P8ypKhl1YGDX1wcgTBCBGgbDpctBMiD8DKb3Xn2LYnQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 26 Jan 2022 16:26:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26.01.2022 16:59, Julien Grall wrote:
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> The name of arch_mfn_in_directmap() suggests that it will check against
> that the passed MFN should be in the directmap.
> 
> However, the current callers are passing the next MFN and the
> implementation will return true for up to one MFN past the directmap.
> 
> It would be more meaningful to test the exact MFN rather than the
> next one.
> 
> That said, the current expectation is the memory will be direct-mapped
> from 0 up to a given MFN. This may not be a valid assumption on all
> the architectures.
> 
> For instance, on Arm32 only the xenheap that will be direct-mapped.
> This may not be allocated a the beginning of the RAM.
> 
> So take the opportunity to rework the parameters and pass the
> number of pages we want to check. This also requires to rename
> the helper to better match the implementation.
> 
> Note that the implementation of the helper on arm32 is left as-is
> for now.
> 
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>




 


Rackspace

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