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

Re: [PATCH] xen: replace xen_remap() with memremap()


  • To: Juergen Gross <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx
  • From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • Date: Tue, 31 May 2022 13:27:24 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.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=139RGQp/kOZy2vDpFFv/rH65u5e5cCcUG4ouCJbTr+M=; b=VYSkO0nAkOQTfu2OVKAI2q/yG57z56G0p8saUC6Mdpdwhk3sRI5uxdZB53ZvISzwxGNqNOg40jncH60l9fnQ0FnKpWxZqBEuCuW5ONkZ/zcrF0xwtrREQzRWYkDIIzcfiHJ1BdUXbcfmzAUH/5LZGtKd5YP86l1BzM3M7HjuO+6h3oqRyWxzVNSTyetwICCBDJY5Oam69f9StGs0jQlr9Zcz29JKSavdg3xDjIfPjY3TEjAGL9V/i01VpnMbvuFqWdEF73CTqZzioGy+hj00HHQCf7h0O/rJeolULLURelXh5LukxN4GDHW/J8hoKDEE/ywDeiZ1QyIDqUXPrip/eA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QOjjvf0MlL1HQOK6+rNbXDFVcq1FPfJwVMpcsFBsUPmcWLy4svFpAP+ZnLfsrV6PyxfjqwN9LMpx5RQGlNm75N6qVObmf2VnwoahuXYKOX3ABqe3Vi27z0p1DInN+rgBqh++eQqMyDiXYEfCYKkM4WpJ3LOso9id7EECq0ccOZ9sVCkOfi262mFHbg0gRNvJgBHp6AgbTqNX7UiEM8IiGdlgPkj5EAMfkk7/7nfOb8dikgi4+6Z2FTywyZEMoXE1YE2iFWM+8rHdBI0dpahXUBdXKF4V1lAd8fdetVhISMjRnCe3/EkEmMQloBnl/rHHR8sdLdgRBANeEQobuTzVEw==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Jiri Slaby <jirislaby@xxxxxxxxxx>, kernel test robot <lkp@xxxxxxxxx>
  • Delivery-date: Tue, 31 May 2022 17:28:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 5/30/22 4:26 AM, Juergen Gross wrote:
xen_remap() is used to establish mappings for frames not under direct
control of the kernel: for Xenstore and console ring pages, and for
grant pages of non-PV guests.

Today xen_remap() is defined to use ioremap() on x86 (doing uncached
mappings), and ioremap_cache() on Arm (doing cached mappings).

Uncached mappings for those use cases are bad for performance, so they
should be avoided if possible. As all use cases of xen_remap() don't
require uncached mappings (the mapped area is always physical RAM),
a mapping using the standard WB cache mode is fine.

As sparse is flagging some of the xen_remap() use cases to be not
appropriate for iomem(), as the result is not annotated with the
__iomem modifier, eliminate xen_remap() completely and replace all
use cases with memremap() specifying the MEMREMAP_WB caching mode.

xen_unmap() can be replaced with memunmap().

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>



Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>




 


Rackspace

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