From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5950C433B4 for ; Wed, 5 May 2021 18:02:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 87DE96139A for ; Wed, 5 May 2021 18:02:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235298AbhEESDn (ORCPT ); Wed, 5 May 2021 14:03:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:42232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235665AbhEESDc (ORCPT ); Wed, 5 May 2021 14:03:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BB46861176; Wed, 5 May 2021 18:02:33 +0000 (UTC) Date: Wed, 5 May 2021 19:02:31 +0100 From: Catalin Marinas To: Will Deacon Cc: Vikram Sethi , Alex Williamson , Mark Kettenis , Marc Zyngier , Shanker Donthineni , "christoffer.dall@arm.com" , "linux-arm-kernel@lists.infradead.org" , "kvmarm@lists.cs.columbia.edu" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , Jason Sequeira Subject: Re: [RFC 1/2] vfio/pci: keep the prefetchable attribute of a BAR region in VMA Message-ID: <20210505180228.GA3874@arm.com> References: <878s4zokll.wl-maz@kernel.org> <87eeeqvm1d.wl-maz@kernel.org> <87bl9sunnw.wl-maz@kernel.org> <20210503084432.75e0126d@x1.home.shazbot.org> <20210504083005.GA12290@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210504083005.GA12290@willie-the-truck> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Tue, May 04, 2021 at 09:30:05AM +0100, Will Deacon wrote: > On Mon, May 03, 2021 at 10:03:59PM +0000, Vikram Sethi wrote: > > Will/Catalin, perhaps you could explain your thought process on why you chose > > Normal NC for ioremap_wc on the armv8 linux port instead of Device GRE or other > > Device Gxx. > > I think a combination of: compatibility with 32-bit Arm, the need to > support unaligned accesses and the potential for higher performance. IIRC the _wc suffix also matches the pgprot_writecombine() used by some drivers to map a video framebuffer into user space. Accesses to the framebuffer are not guaranteed to be aligned (memset/memcpy don't ensure alignment on arm64 and the user doesn't have a memset_io or memcpy_toio). > Furthermore, ioremap() already gives you a Device memory type, and we're > tight on MAIR space. We have MT_DEVICE_GRE currently reserved though no in-kernel user, we might as well remove it. -- Catalin