Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1613354rbb; Mon, 26 Feb 2024 15:49:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU2aFvoiAR5QeUNgVCcb3yVUaQL7djmBjrzHPvRzDmQl0bnxhUaJHt5idsLV7jDxiHsAf8YfWO32QIqdlYD2ouCzVJcerHcQ1EuEo9hBg== X-Google-Smtp-Source: AGHT+IGmwIWq8QcNRMDXWNKH3EWwmDihCgWwhRbM7OdDKYApJ9DqAUYycx0ykRHqU98Gk1vZO5rX X-Received: by 2002:a17:902:e844:b0:1dc:b308:c3b6 with SMTP id t4-20020a170902e84400b001dcb308c3b6mr2233747plg.1.1708991357416; Mon, 26 Feb 2024 15:49:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708991357; cv=pass; d=google.com; s=arc-20160816; b=w+HrsStoe67A4D3FCMH9+fWLN0Vmomo9yidTwbNZPpL45GwMNApAGjW+IQ/T9dkns1 UghsTV/bgY+O5s5opacvIa/OvXYqLPJh+BY3WxPfDFOogAsC6d9FEqub1Q1Sy0lUfJej iG+N0o4hKa1FtCj+Q3ifU+3ntoF7lWOuYH7GUZR1QMz5ZOByVbh0gl9eAaOXAJQr5TKK OMbkCFbzxOVlZRk9kbwflwY8jpQ4ufWD0HtRqqztPNVT7rCbrmRaEMEcmGC/67ZGkwNs oYc8Q+4Xl0hXNLI7ztR7R68AfMBdLC9dcED4xL7nRqOP9bPcePcRgiqBvRs/i/xLCZDL hfEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=EdH1du0G5wZD6cUdSfsT1MbgK9PvHKwZ7muuiMKD95w=; fh=R1c1pUilCrgiQxdu9CnqgHUJhKZUkTCNRi9p7G5lzQc=; b=zHD/bBF2jRWpu0MY364Ua7ouh5r0Ckhxe6GtDhBDaLYuu08HiHrsyZ8jXi5hbtnJFR HuI/OglCg1nrVlNVwy4SJ7GkbOkl3+bCgVpANW43kUoZCMpZQgAqOJQp5Wy0rjWeNNNP BEyxoahLFauPqeyfdeEu6mlimLQo+JpuYGEmH+38rxkBJwWX4rzQ2KAO1q0zueoTS/Mx OBss7uaPkYpSzMZx+nTO8xHoWKvzjIMX5CdT7bwA86vn+Ko5bMteT4QBS0EnSVBn6JBe YdkW0zVcmAuJHrzyeq5jN/9P9bbTdyjgJjwpcN6TwK6BjF0K72VuxU3ZxGIbvs60K6Iu b7iA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=NaKGaBHZ; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-82453-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82453-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id dr4-20020a056a020fc400b005d645323583si4418050pgb.755.2024.02.26.15.49.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 15:49:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82453-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=NaKGaBHZ; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-82453-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82453-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3AD80B23977 for ; Mon, 26 Feb 2024 23:47:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DBDAC1384A8; Mon, 26 Feb 2024 23:45:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="NaKGaBHZ" Received: from out-170.mta1.migadu.com (out-170.mta1.migadu.com [95.215.58.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1AF01384A4 for ; Mon, 26 Feb 2024 23:45:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708991158; cv=none; b=SxfYyhzNmsGK8HDPE0KO2IXykIWJYRc+Z9OJgPQIFV8T0//DTki1utbamou0s7CFcW1rm/7aFxmaYilbUveQH/GXMfyDpNKobiVVmdFZPWMNW7z/u+EXUyrnp7IwCHYHrs+WfniaF8O63K/fkJvMwPsxk43OO5/q0neBZ5hCmaI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708991158; c=relaxed/simple; bh=XiKSjMhN4uvH//I4mBDWEe5PcL0ksfxy4L615WOR3f0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bGI+KfxEYQC067yh5dcpI1NNZCJKI918dyRuHtIw8Re7XpsNpMMM+D8qiqE1Ilxg5xxkxByoM2jWyNrasvR995qjzo5VFjD551+P7B2U/9pPa5OiRkNU7ef4uPNQIpIL0Doa2HZxRsYpij3HpBx96wJRC4IP3mJEbqW5D0ESc40= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=NaKGaBHZ; arc=none smtp.client-ip=95.215.58.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1708991153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EdH1du0G5wZD6cUdSfsT1MbgK9PvHKwZ7muuiMKD95w=; b=NaKGaBHZCLVlpYSRjVgXamnaISV5l68zDvg3ykwj2P7sG5JFqwTKKJPKbQUQAAvHNExRkq /KACdnHBqpI3skPgVo2vn3IxvfvqSLRY2PcRImxTBSdVM5ZudrJdUs2cdWAxg3HoxWp7zD Q0H7mX3cq0nHnXgBMFatJXL1ou1tDF8= From: Oliver Upton To: wangjinchao@xfusion.com, shahuang@redhat.com, catalin.marinas@arm.com, ryan.roberts@arm.com, stefanha@redhat.com, yi.l.liu@intel.com, david@redhat.com, Jason Gunthorpe , lpieralisi@kernel.org, gshan@redhat.com, brauner@kernel.org, rananta@google.com, alex.williamson@redhat.com, suzuki.poulose@arm.com, kevin.tian@intel.com, surenb@google.com, ricarkol@google.com, linus.walleij@linaro.org, james.morse@arm.com, ankita@nvidia.com, ardb@kernel.org, will@kernel.org, akpm@linux-foundation.org, maz@kernel.org, bhe@redhat.com, reinette.chatre@intel.com, yuzenghui@huawei.com, andreyknvl@gmail.com, linux-mm@kvack.org, mark.rutland@arm.com Cc: Oliver Upton , danw@nvidia.com, acurrid@nvidia.com, apopple@nvidia.com, mochs@nvidia.com, linux-kernel@vger.kernel.org, aniketa@nvidia.com, cjia@nvidia.com, kvm@vger.kernel.org, jhubbard@nvidia.com, kvmarm@lists.linux.dev, zhiw@nvidia.com, kwankhede@nvidia.com, vsethi@nvidia.com, linux-arm-kernel@lists.infradead.org, targupta@nvidia.com Subject: Re: [PATCH v9 0/4] KVM: arm64: Allow the VM to select DEVICE_* and NORMAL_NC for IO memory Date: Mon, 26 Feb 2024 23:45:30 +0000 Message-ID: <170899100569.1405597.5047894183843333522.b4-ty@linux.dev> In-Reply-To: <20240224150546.368-1-ankita@nvidia.com> References: <20240224150546.368-1-ankita@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On Sat, 24 Feb 2024 20:35:42 +0530, ankita@nvidia.com wrote: > From: Ankit Agrawal > > Currently, KVM for ARM64 maps at stage 2 memory that is considered device > with DEVICE_nGnRE memory attributes; this setting overrides (per > 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. > > [...] High time to get this cooking in -next. Looks like there aren't any conflicts w/ VFIO, but if that changes I've pushed a topic branch to: https://git.kernel.org/pub/scm/linux/kernel/git/oupton/linux.git/log/?h=kvm-arm64/vfio-normal-nc Applied to kvmarm/next, thanks! [1/4] KVM: arm64: Introduce new flag for non-cacheable IO memory https://git.kernel.org/kvmarm/kvmarm/c/c034ec84e879 [2/4] mm: Introduce new flag to indicate wc safe https://git.kernel.org/kvmarm/kvmarm/c/5c656fcdd6c6 [3/4] KVM: arm64: Set io memory s2 pte as normalnc for vfio pci device https://git.kernel.org/kvmarm/kvmarm/c/8c47ce3e1d2c [4/4] vfio: Convey kvm that the vfio-pci device is wc safe https://git.kernel.org/kvmarm/kvmarm/c/a39d3a966a09 -- Best, Oliver