Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp821345rdb; Wed, 6 Dec 2023 00:19:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8C9lzYMTp9sdajsC8H1+joHYsf8iHZ/XCMbs6SVMgvC9dUoXg5eTtAD+eUCkEuLRF3z+V X-Received: by 2002:a05:6358:e49b:b0:170:698:3fe with SMTP id by27-20020a056358e49b00b00170069803femr848628rwb.9.1701850771379; Wed, 06 Dec 2023 00:19:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701850771; cv=none; d=google.com; s=arc-20160816; b=il7KYvdEHIxDNU+0ZK9at1nDOuo3FOJCOp96Uvub7d8ccR8BZBcmdGZYul6PY5J625 47aU9ClIMnVPwlfLSUWkXL5MGqEmBi7Hgedy0lAfBBnLqQIjdOb/0AsJpx0vrHP9vPQv oJ0MkXaLRS85t2GXj9nXn9gv+aKwH4jCinbebncbX2cwHpjgDH0hVdX6pkC5XlRLTVgY ZlC/sE1ro23MZNQnmex65LU52YtQd15fL6SYyTNPP5j6/PkOPxQFK1ebvD1KBpHTFHMu Y2VIfn2ljlVxm6n36cGOfWVvsNRIEvzbub/XMxYZ/dI2iOYbU+2R2b3varg6RVZTvfCm fsoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=wHM78g8XaU0jdlR6UWWo+2HFvXDbFGx2OuwFxj/8pC8=; fh=vx+KliqtQoSDMs3RSDgh8mmYy5K7qoE3iM/vnRgz36Y=; b=Rk+ogPaR5BaEB59jJu1tvSXbsHhv6cIyx9/AK1gvan67wie2NVLlIoV01DxGWODdZ+ DpE5xFe9nNWZNNSc2Lg4OOcBlf3FZLrgZQCqKdufWQUt0qZTU069L1GAdVhzODsjtGLW EtIKXbr5gZXIZhdt2j4ltpoCTEbwECO45b/MaLB68XUZLyFAraljfwEXWN42hzOVa+AD yzbr93UbZN3FwKrFJ62dvk9wngOiKhDSAkW0lqkrRqqhCbh0BAzXnH0wuza6U/I/bFt6 8CBYsR2Mq9IgwDYoP0nQ3GsorzFdxzlARrWPPPjBIZIXAc0RJLTrMtBrxf9krw+mA9Sm AJLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id u15-20020a056a00158f00b006ce7efda4f1si1311665pfk.98.2023.12.06.00.19.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 00:19:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 89D568168235; Wed, 6 Dec 2023 00:19:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377300AbjLFITL convert rfc822-to-8bit (ORCPT + 99 others); Wed, 6 Dec 2023 03:19:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377292AbjLFITA (ORCPT ); Wed, 6 Dec 2023 03:19:00 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20A9ED5A; Wed, 6 Dec 2023 00:18:09 -0800 (PST) Received: from kwepemm000007.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SlVYM2HN3z1Q6DC; Wed, 6 Dec 2023 16:14:15 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (7.191.163.240) by kwepemm000007.china.huawei.com (7.193.23.189) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 6 Dec 2023 16:18:01 +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; Wed, 6 Dec 2023 08:17:59 +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: AQHaJyt5vUQXGRK0CEWl1So2KZfV67CaaoMAgAAm7ICAACpz4IABLXlA Date: Wed, 6 Dec 2023 08:17:59 +0000 Message-ID: References: <20231205033015.10044-1-ankita@nvidia.com> <86fs0hatt3.wl-maz@kernel.org> <296657c5b09f46a1ac6e4d993fbc0875@huawei.com> In-Reply-To: <296657c5b09f46a1ac6e4d993fbc0875@huawei.com> 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 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 06 Dec 2023 00:19:28 -0800 (PST) > -----Original Message----- > From: Shameerali Kolothum Thodi > Sent: Tuesday, December 5, 2023 2:17 PM > 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 > > > > > -----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 to Yufeng, the test on both FWB and non-FWB platforms with a GPU dev assignment looks fine with this patch. Shameer