Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp910775rdb; Wed, 6 Dec 2023 03:39:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPpVNCrC5hpyMDYSK+Fd9VM9Sf+GhXGjSbQkF8eoPPpUrzJFLOGUt6OvbUR98nWD2PWSmY X-Received: by 2002:a05:6a00:84b:b0:6ce:2731:7a07 with SMTP id q11-20020a056a00084b00b006ce27317a07mr378105pfk.61.1701862766344; Wed, 06 Dec 2023 03:39:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701862766; cv=none; d=google.com; s=arc-20160816; b=PHK6ruCogA43wrtn4oefIBHDFDh0jkIjqQ5asIXu3k1VPWgJjGlP1qz7+M+zip5ZWX UqOK0BJsdoB0QamvkKGY/0l0iHPgKHw4lnsuVEYKsIEW7atdf4xsNbpNgeHxa2suL/TL NrabVIl2CnOsQQh5h07PcRDzlIIocO5fcjMihEPS3OQUJTcaYuSzzKTcz73mEzrEDEAJ W3WBynNjzYjheEN/dA/NgidqyTWwwb1YS0PW04eV29M66/p5TGcmyi/dHkF79tj2UOA7 7v0dUkRkTlVuT4Y7za6adQ0EuNygH+iu+vOcL44rlX+jbCEHtgI7MEoyQ1sL2E+xPGBW qDkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=jYRv2oDTmVk4rlCbpvXjsduVtG4J44wcnvA37NffCzY=; fh=/cBajnHSfe3tMChJUZtGEKoCbgnAeghXkorSjVGp2Ww=; b=F03e8Byu+FN81qQwRP45XUfZdRAV1oHU/3A3FjpZ0hiDCpArog4wvCun7lP5hOQ6ym ZpfFtHL27EFn34dMNF2+DtRvLzMbK4Ck5qvi9B4HGnjOYN90WkqaBqEhrsPN7gk2JREt v0tv+a6yDnGQgyYy5YY3eskSksEJQUX7nDc9YRbvkLkYzMaq1Zcvcxjt+vAa8Lf3pDio Sd+eaEWrlFC5AYaPEV4UVJ1kI/5V/jdrt2bGbrCjqB2PK2FD2iIFF0u8jycl7dbXNUq1 LbTwPj63e511j3Xtt3tCKVT1iesldsY3QRg/e0TwrvO4tBG6LZvXTNmq90hRmMj3+XXR R1NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JG5xMnLV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id h63-20020a636c42000000b005c624c6c8c0si11192530pgc.536.2023.12.06.03.39.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 03:39:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JG5xMnLV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 3B800826EB6D; Wed, 6 Dec 2023 03:39:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377628AbjLFLjF (ORCPT + 99 others); Wed, 6 Dec 2023 06:39:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377727AbjLFLjA (ORCPT ); Wed, 6 Dec 2023 06:39:00 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A19FB109 for ; Wed, 6 Dec 2023 03:39:06 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41B43C433C9; Wed, 6 Dec 2023 11:39:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701862746; bh=VACpM7Rme6S0irInDKWgO8xLCrPsqk274n5MkiWmcsw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JG5xMnLV5Sd+LjMbCFz5yXzqsLubGU2gW7YaIunlRH/fySYpyxfDxa4lZpjMcjveL lZ6d4XPF4vvtPie7R0QCZlbF5t7ZQslO2toupZKR4nEwTzwEb79AR+eInyZiUh/hKu 66NFewRMMsnzSXyIZYomW2tGpjJsuP4V4k3QyoHFSw2gkX9szLSP26C+qZ2t6XX+5t ALJMhmdcZLXgeNSn/snBfLrt1Ni3K3qJXpRyK44cXrI67dE8bkwv8PkEUD552kUDUt yw7rc7ZIr4DmbDAeXtQ+2hzYvgJ3uh9VrSgy80P39hgCEcY11xUJ1uTWgU2r/2I4Br vBqudpbAgwXTw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rAqF5-001rsK-Ld; Wed, 06 Dec 2023 11:39:03 +0000 Date: Wed, 06 Dec 2023 11:39:03 +0000 Message-ID: <868r67blwo.wl-maz@kernel.org> From: Marc Zyngier To: Catalin Marinas Cc: Jason Gunthorpe , ankita@nvidia.com, Shameerali Kolothum Thodi , oliver.upton@linux.dev, suzuki.poulose@arm.com, yuzenghui@huawei.com, 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 In-Reply-To: References: <20231205033015.10044-1-ankita@nvidia.com> <86fs0hatt3.wl-maz@kernel.org> <20231205130517.GD2692119@nvidia.com> <20231205164318.GG2692119@nvidia.com> <86bkb4bn2v.wl-maz@kernel.org> <86a5qobkt8.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: catalin.marinas@arm.com, jgg@nvidia.com, ankita@nvidia.com, shameerali.kolothum.thodi@huawei.com, oliver.upton@linux.dev, suzuki.poulose@arm.com, yuzenghui@huawei.com, 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 X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 morse.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 (morse.vger.email [0.0.0.0]); Wed, 06 Dec 2023 03:39:24 -0800 (PST) On Tue, 05 Dec 2023 18:40:42 +0000, Catalin Marinas wrote: > > On Tue, Dec 05, 2023 at 05:50:27PM +0000, Marc Zyngier wrote: > > On Tue, 05 Dec 2023 17:33:01 +0000, > > Catalin Marinas wrote: > > > Ideally we should do this for vfio only but we don't have an easy > > > way to convey this to KVM. > > > > But if we want to limit this to PCIe, we'll have to find out. The > > initial proposal (a long while ago) had a flag conveying some > > information, and I'd definitely feel more confident having something > > like that. > > We can add a VM_PCI_IO in the high vma flags to be set by > vfio_pci_core_mmap(), though it limits it to 64-bit architectures. KVM > knows this is PCI and relaxes things a bit. It's not generic though if > we need this later for something else. Either that, or something actually describing the attributes that VFIO wants. And I very much want it to be a buy-in behaviour, not something that automagically happens and changes the default behaviour for everyone based on some hand-wavy assertions. If that means a userspace change, fine by me. The VMM better know what is happening. M. -- Without deviation from the norm, progress is not possible.