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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1032FC4167B for ; Tue, 5 Dec 2023 14:17:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345862AbjLEOQx convert rfc822-to-8bit (ORCPT ); Tue, 5 Dec 2023 09:16:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345621AbjLEOQv (ORCPT ); Tue, 5 Dec 2023 09:16:51 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24CE619B; Tue, 5 Dec 2023 06:16:57 -0800 (PST) Received: from kwepemm600006.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Sl2dD5PsszWjCh; Tue, 5 Dec 2023 22:16:00 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (7.191.163.240) by kwepemm600006.china.huawei.com (7.193.23.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 5 Dec 2023 22:16:53 +0800 Received: from lhrpeml500005.china.huawei.com ([7.191.163.240]) by lhrpeml500005.china.huawei.com ([7.191.163.240]) with mapi id 15.01.2507.035; Tue, 5 Dec 2023 14:16:51 +0000 From: Shameerali Kolothum Thodi To: Catalin Marinas , Marc Zyngier CC: "ankita@nvidia.com" , "jgg@nvidia.com" , "oliver.upton@linux.dev" , "suzuki.poulose@arm.com" , yuzenghui , "will@kernel.org" , "ardb@kernel.org" , "akpm@linux-foundation.org" , "gshan@redhat.com" , "aniketa@nvidia.com" , "cjia@nvidia.com" , "kwankhede@nvidia.com" , "targupta@nvidia.com" , "vsethi@nvidia.com" , "acurrid@nvidia.com" , "apopple@nvidia.com" , "jhubbard@nvidia.com" , "danw@nvidia.com" , "mochs@nvidia.com" , "kvmarm@lists.linux.dev" , "kvm@vger.kernel.org" , "lpieralisi@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linyufeng (A)" Subject: RE: [PATCH v2 1/1] KVM: arm64: allow the VM to select DEVICE_* and NORMAL_NC for IO memory Thread-Topic: [PATCH v2 1/1] KVM: arm64: allow the VM to select DEVICE_* and NORMAL_NC for IO memory Thread-Index: AQHaJyt5vUQXGRK0CEWl1So2KZfV67CaaoMAgAAm7ICAACpz4A== Date: Tue, 5 Dec 2023 14:16:51 +0000 Message-ID: <296657c5b09f46a1ac6e4d993fbc0875@huawei.com> References: <20231205033015.10044-1-ankita@nvidia.com> <86fs0hatt3.wl-maz@kernel.org> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.227.28] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Catalin Marinas > Sent: Tuesday, December 5, 2023 11:41 AM > To: Marc Zyngier > Cc: ankita@nvidia.com; Shameerali Kolothum Thodi > ; jgg@nvidia.com; > oliver.upton@linux.dev; suzuki.poulose@arm.com; yuzenghui > ; will@kernel.org; ardb@kernel.org; akpm@linux- > foundation.org; gshan@redhat.com; aniketa@nvidia.com; cjia@nvidia.com; > kwankhede@nvidia.com; targupta@nvidia.com; vsethi@nvidia.com; > acurrid@nvidia.com; apopple@nvidia.com; jhubbard@nvidia.com; > danw@nvidia.com; mochs@nvidia.com; kvmarm@lists.linux.dev; > kvm@vger.kernel.org; lpieralisi@kernel.org; linux-kernel@vger.kernel.org; > linux-arm-kernel@lists.infradead.org > Subject: Re: [PATCH v2 1/1] KVM: arm64: allow the VM to select DEVICE_* > and NORMAL_NC for IO memory > > + Lorenzo, he really needs to be on this thread. > > On Tue, Dec 05, 2023 at 09:21:28AM +0000, Marc Zyngier wrote: > > On Tue, 05 Dec 2023 03:30:15 +0000, > > wrote: > > > From: Ankit Agrawal > > > > > > Currently, KVM for ARM64 maps at stage 2 memory that is considered > device > > > (i.e. it is not RAM) with DEVICE_nGnRE memory attributes; this setting > > > overrides (as per the ARM architecture [1]) any device MMIO mapping > > > present at stage 1, resulting in a set-up whereby a guest operating > > > system cannot determine device MMIO mapping memory attributes on > its > > > own but it is always overridden by the KVM stage 2 default. > [...] > > Despite the considerable increase in the commit message length, a > > number of questions are left unanswered: > > > > - Shameer reported a regression on non-FWB systems, breaking device > > assignment: > > > > > https://lore.kernel.org/all/af13ed63dc9a4f26a6c958ebfa77d78a@huawei.co > m/ > > This referred to the first patch in the old series which was trying to > make the Stage 2 cacheable based on the vma attributes. That patch has > been dropped for now. It would be good if Shameer confirms this was the > problem. > Yes, that was related to the first patch. We will soon test this on both FWB and non-FWB platforms and report back. Thanks, Shameer