Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2450249rdb; Mon, 12 Feb 2024 05:31:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRveN1OxMvff+LPNIQsrF9GaVkCO9r6cZGU/9TkQmIVmKYzr3njXJfvWvtZu9Jc+FUkE4F X-Received: by 2002:a2e:a0c3:0:b0:2d0:a7cc:dd2d with SMTP id f3-20020a2ea0c3000000b002d0a7ccdd2dmr4140328ljm.19.1707744693411; Mon, 12 Feb 2024 05:31:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707744693; cv=pass; d=google.com; s=arc-20160816; b=KQ/kDxILEeadff0wzqdTe4GDe4DVUn5b+OtpEEeB3q2bw5zXVzw43O9LcQZ7//wAxv YiCGTGLk5NqDQJJ7sc8kvacBldzgy+QHGuS64CyltzOnE1mdp2U0jzm7lo3M8psnuneg SfET6Wimt+cLSPeLnZzFRFjYRJAuvQW90q86nVUV5m4WJFBQhYB8+WJuw4Y6jiJ+KSbc YvAuIwA/tmoMHho5EoQxfZ3JNxEUHQo4fisRIWY4InSzU7bUoUO14c40hQv2JSKfoaKq ssGn9iYDtMeeFO8pMRpysNT2fwZ4aj/XUYwrbFXOJXGNP0wXGBRlMJsiUowCiqNdtM4k mlkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :references:cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=VzDYwK2iuJ4LmgQXwNgJ7Lf6QDDAqXO/glvGyId4yYE=; fh=G/aHDPYRkSKO08Ms7q40pdgkpnwpEeTHVktphESNJaM=; b=c08aBb7qQr/XJzc99CIaECRE6l4Fw9nTfNPXk5Ao5/Z9YJ2Ex9FXRDZFvOyMZB/Pom 0MNfWjwuVuhccGFG9YdxIintNiY77rSVB+HMkVNl1qfAKJEsidhFKgrLeffO4N/HztGD xmZXPehX9o8Q4cy5BWIzgyksslNwNliapV4FOZ3Sx5/5la+yy2Y8WXwiEJizc9lzLwkM Xq+jMpO4+RX/eu785JCjbduGozbF7knBkqnhTGo05XfsLpfESnqSzjdksWzCEyQRfSnn XsmIHIHcmJpL0RAhYLqlmf0KLLEMKyg0NuYXIfL1A1tXXQM1m7oNQZsHFHVtOqWUg3yx EcSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NwIEI30M; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-61668-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61668-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=2; AJvYcCUzhbtF4bjn+oM/e8aMn6gz1M/n/kUc91GRx0C1bRfroRAYn4MADZU27hCVTpTeee6ujgjiUysySgW4myOScGfF8/uCaEM9L8dBCSZc3g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id cq9-20020a056402220900b0055fdba526d7si2823309edb.276.2024.02.12.05.31.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 05:31:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61668-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NwIEI30M; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-61668-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61668-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id D4DE61F24364 for ; Mon, 12 Feb 2024 13:31:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 431E63D0CF; Mon, 12 Feb 2024 13:16:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NwIEI30M" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 831CC3D0AF for ; Mon, 12 Feb 2024 13:16:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707743799; cv=none; b=rvLhWfBTS19t1D0uPUQVdGdNSG9WuwMkUQQ0dmuBOFNcR7j7/9uYrMVU/4tvDq4Jw4rAFqL0bbNznJ6eTM8K9fvnf6/8+ByN9bmcUCqTIIG7j4MAiHEFr4jk8z16t1ZJozKTYmK2BOYp7pt+AEs1HLsGytqGpbJYtXIC6OjR7gQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707743799; c=relaxed/simple; bh=mOmu6bKnnbQ/T3Bsy4O7zqo47TuFJtZ6E9Rx8rVgL9c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FddphBzE+8TaQGick7PtKanN9qOf5M59wvprDIpG1mmzwWTNizYxsjOhChhI5TMm9/ub5yjzu7gNC/DYoa2odHo7ECO/ZKn+/2uodjpKh2Q5mou/R/c53Vx6Q3MV2JDe9ruHY3UePeovDpY2C+Msbdu1M8eqsqUiZXtBH1WRMac= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NwIEI30M; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707743796; 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:autocrypt:autocrypt; bh=VzDYwK2iuJ4LmgQXwNgJ7Lf6QDDAqXO/glvGyId4yYE=; b=NwIEI30MQsMEltYFUqhGP9OPlNwXq5LXQd/9QO7I61i/NZ6gsEBrd9xRjvTqesVMw1Lk1o ZEzW+uxmxNE9wD39uO82hs3wgIKDWbBrDxoiIYYwfzRkiuOwQuJqv26D9KEHTZYfXwzVDP Yw+x57seNKEQetMGUc0FW2kLcYfBfaQ= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-617-Ma7Pzr4lPKu4yAyvaJL30A-1; Mon, 12 Feb 2024 08:16:35 -0500 X-MC-Unique: Ma7Pzr4lPKu4yAyvaJL30A-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-337a9795c5cso2080385f8f.2 for ; Mon, 12 Feb 2024 05:16:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707743793; x=1708348593; h=content-transfer-encoding:in-reply-to:organization:autocrypt:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VzDYwK2iuJ4LmgQXwNgJ7Lf6QDDAqXO/glvGyId4yYE=; b=hlRhBOgYE6elfZnX/M8Pl3sNlX2vHIHcP+GxuBcz/MJ2u73MaaGYEFY31YcA1urKwY lkxFYmLlfYjGt+UvsELKrktk5QSG1jA5fsGnIBJjp1BuTr+/cYsf5ao7E+y0p6zI97XG Et7kdBVnzILmE1YXAeugulLWWsQdeEHyI6Rn/qXmQxJiWeO2HJAF0+ZOTg94RYAodQZq et1o/RZm4tAd3U5+kueZe53TfrYlmaf5n2IjjVrwXqQv7553m4YZJNa1LTks3Zz0aL4O h60M7CeyISQ4GtJlirE0+n95LiQGne38Ao3RFs3OQnLga/4XyYm6Oc+sfA5HqGnP9bIj iW8Q== X-Gm-Message-State: AOJu0Yx/U+swNw0AVJxiO0jnb+FjJO30fslPheHd4GLERVnmTjt2bTTt x9gjVbv89yUbB9MO4pVBh5Tw2kbOXnBUVAI/+KCpcAODpgh17ENf/cZfUAFt4yekG2GjMySNexk l+xN+VnFJVAyj/jInp+9MMs7ORMeaeabeVExn5Ll2JsM+eS3aM4JSXy7aQbL6og== X-Received: by 2002:adf:fe08:0:b0:33b:2fba:1ea8 with SMTP id n8-20020adffe08000000b0033b2fba1ea8mr4200533wrr.52.1707743793001; Mon, 12 Feb 2024 05:16:33 -0800 (PST) X-Received: by 2002:adf:fe08:0:b0:33b:2fba:1ea8 with SMTP id n8-20020adffe08000000b0033b2fba1ea8mr4200490wrr.52.1707743792624; Mon, 12 Feb 2024 05:16:32 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWLYLeSLE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quAE4HcNeXI/m52PP86nY4tfP9ZiBIuBgTrrC5I0IUd0qrTHMni5BZgN3GYBebK7jPMU/LevwcFebUWCC9Ojg3fDArD85Ac/nGAmwtMpGx3ZzbcBvKEiL4qtiU4aJA71DQjEc2lxKRZpU3b/MwNe9Y7BZbJ0HKUko4MJkQCYRhKUqm19tENATR8lFC+L3XvnaY9wKW+CrBf+D37PZhXUR/9TCyItDNLR Received: from ?IPV6:2003:cb:c730:2200:7229:83b1:524e:283a? (p200300cbc7302200722983b1524e283a.dip0.t-ipconnect.de. [2003:cb:c730:2200:7229:83b1:524e:283a]) by smtp.gmail.com with ESMTPSA id en8-20020a056000420800b0033b7d9c14desm3956966wrb.5.2024.02.12.05.16.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Feb 2024 05:16:32 -0800 (PST) Message-ID: <6ab142f0-bf66-4611-915d-938d58a277d3@redhat.com> Date: Mon, 12 Feb 2024 14:16:30 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 4/4] vfio: convey kvm that the vfio-pci device is wc safe Content-Language: en-US To: ankita@nvidia.com, jgg@nvidia.com, maz@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, reinette.chatre@intel.com, surenb@google.com, stefanha@redhat.com, brauner@kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, alex.williamson@redhat.com, kevin.tian@intel.com, yi.l.liu@intel.com, ardb@kernel.org, akpm@linux-foundation.org, andreyknvl@gmail.com, wangjinchao@xfusion.com, gshan@redhat.com, shahuang@redhat.com, ricarkol@google.com, linux-mm@kvack.org, lpieralisi@kernel.org, rananta@google.com, ryan.roberts@arm.com, linus.walleij@linaro.org, bhe@redhat.com Cc: 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, kvmarm@lists.linux.dev, mochs@nvidia.com, zhiw@nvidia.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20240211174705.31992-1-ankita@nvidia.com> <20240211174705.31992-5-ankita@nvidia.com> From: David Hildenbrand Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9 PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW AgMBAh4BAheAAhkBFiEEG9nKrXNcTD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2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: <20240211174705.31992-5-ankita@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11.02.24 18:47, ankita@nvidia.com wrote: > From: Ankit Agrawal > > The code to map the MMIO in S2 as NormalNC is enabled when conveyed > that the device is WC safe using a new flag VM_ALLOW_ANY_UNCACHED. > > Make vfio-pci set the VM_ALLOW_ANY_UNCACHED flag. > > This could be extended to other devices in the future once that > is deemed safe. Maybe add some more details how one could make a decision whether it would be safe (either here or in patch #2). > > Suggested-by: Catalin Marinas > Acked-by: Jason Gunthorpe > Acked-by: Catalin Marinas > Signed-off-by: Ankit Agrawal > --- > drivers/vfio/pci/vfio_pci_core.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c > index 1cbc990d42e0..eba2146202f9 100644 > --- a/drivers/vfio/pci/vfio_pci_core.c > +++ b/drivers/vfio/pci/vfio_pci_core.c > @@ -1862,8 +1862,12 @@ int vfio_pci_core_mmap(struct vfio_device *core_vdev, struct vm_area_struct *vma > /* > * See remap_pfn_range(), called from vfio_pci_fault() but we can't > * change vm_flags within the fault handler. Set them now. > + * > + * Set an additional flag VM_ALLOW_ANY_UNCACHED to convey kvm that > + * the device is wc safe. > */ > - vm_flags_set(vma, VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP); > + vm_flags_set(vma, VM_ALLOW_ANY_UNCACHED | VM_IO | VM_PFNMAP | > + VM_DONTEXPAND | VM_DONTDUMP); > vma->vm_ops = &vfio_pci_mmap_ops; > > return 0; Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb