Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1069792rdb; Fri, 9 Feb 2024 09:19:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXCGDCQpHk1UCpE22GoM4G1aoyljmLMx6UtY2UsnNxrIy/w1XCW1nqCcXFj000JXgh7bKMawjEsSAeb0Nr8qOlwDmgfkkgEdzPvFXK3Yw== X-Google-Smtp-Source: AGHT+IHoaeluHH1bjzn6ecrCKNOnaiaeLelcZKEz5REZmxPq8Re5vcsq6pWQKIZZoFGU9KqwOAk4 X-Received: by 2002:ac8:570d:0:b0:42a:62a0:260 with SMTP id 13-20020ac8570d000000b0042a62a00260mr2531058qtw.58.1707499162903; Fri, 09 Feb 2024 09:19:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWJRjXINOLoQVl8UkQh1LZrcamgfMvFTdKFL8Zu3Vqdz0uqirwjns72jdmNvxLEhRnPUtHqt1IRDzk/ghSw6jp1G7Fw34QMnE+NlAxf8w== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v18-20020a05622a131200b0042c4aa6aa46si2400920qtk.186.2024.02.09.09.19.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 09:19:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59717-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=ZhoHGRbi; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-59717-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59717-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9683F1C2260A for ; Fri, 9 Feb 2024 17:19:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A4AE7C0AB; Fri, 9 Feb 2024 17:19:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="ZhoHGRbi" Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) (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 CFCBE7603E; Fri, 9 Feb 2024 17:19:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.41 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707499150; cv=fail; b=mlitoatWBasWoLz8AbB4ajR+XnTzoni51Pzn56guVP5zuCzHL5Bjk21IvXyUgaJFk2TNnoFZF+EXMRSju+GIPIO7hrP0pApar2JlSpGYDhS7G8SHSUkzeU7s+d8LTM8XC2zcLAYJMQrOPt8m7LyoEZDZ1/J1eMsxNhIP9uguU5U= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707499150; c=relaxed/simple; bh=Y0bTLoiYZv1wCbTQ0nIYW7NvxTjwYhRbe6sCe2qJx+M=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=E5EhERoEmi6p8LWbZ3m/c2IaDzBeqytHf0A6eqdxwk7xXQWs/m+/N7UCOwDcQJuTSgiRRfFvTIgiMmwMe2rkt2PFa3DYiZm+pL6ZBJw70D6uwfuhYACn85MS+/cFsUQ2NS25QpjJ7AdownhNNJ8kH2mAZ/VYZNfjpmigBG2Wlfk= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=ZhoHGRbi; arc=fail smtp.client-ip=40.107.236.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h7j5BXq0BOIPpzrOAPGQuqo5rVQzLpuY5LOK/frKWyEelEOKilj4HR3oQDciNWkJNSZj50CVOynSYOweGCk/stmj0SU6/fgxce3YLb9+PBJXUIqmMH+oCUUd0Erob7s9mha/QN8RWrk8K+UVPrbs+dXbNTV/j056lW34x7mvcu0fnJwO3hhVpnUy3lcv/Dp/dt9wjavv3kq4RCWVY470kMWCwPjaYvKCodCvJ013hUzs3q7pSQgEYYohegQp90nqPP2ylLX54KWfu8k353qd4brsNdMlPhym9gPm7jt8h5a1UqPgoYng7RKzWvELCrNxTMK7ElfjEFoVYT1zZsPe9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SSenxutTBV5MrDfXDKXXpAiEXcZzCXbjBtSHKKxT56A=; b=j91h01pBAzTt49y7UIZKSjGzUvapnTXO2K54F2oDwQktfeHehUm32w+YDHLyjb7v7+WplwpEUx1wKoHXMbiKmrElb14CCullvatxDRAMG9L+dvd7qLhb0qng3KTk8oN+EA0ueXJKYKzpKWFL0RfL2yCvWSilkH+Obg1NWz7XjI1DyKO/QRYMIE0pSIVEMg2s6EUWHqYuX2S8lY11saxjzOKcDEih43T2EO7MY9UTQyRIH8OYXwE0s7nr0oazaonG8zjK92BeijXFcsxcvyHSiD19AZbCwraY1z1fa8+hampAZLhT0duv02qAtxfW21++khVYeenNxfA9p6MMfeH5Rg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SSenxutTBV5MrDfXDKXXpAiEXcZzCXbjBtSHKKxT56A=; b=ZhoHGRbiIbgOfbicZ+Gei7XmGC8D8GO6pFh9z8/eS6us7yxcSq0dd5a2VV/Ersgr+TzpufU0WFy6OpZTGswt2OUrBS3mfBFMCllBi2q17WdLK9Ko7/pXAKbAlnstChyIin3vV1b02s8WEnClc4Gi1hyEQ4kCNWRZS61iSgh1waplYdEJIIh84uFFYT4PTMoSxr2wrrdyLCZUZGAwFARPtRCpBoorR7aJYt8mU7M6r811oN276N0lNeGHYzPULoRQmABqIMZ2jsQWNikDb7lYx3NF2r7ZzT9yciafYmHj7E0HzML+New29ATVLJnQz/v36AyG9soKhiO5xDsfU3C0GQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by CH0PR12MB5331.namprd12.prod.outlook.com (2603:10b6:610:d6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.10; Fri, 9 Feb 2024 17:19:05 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::96dd:1160:6472:9873]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::96dd:1160:6472:9873%6]) with mapi id 15.20.7270.012; Fri, 9 Feb 2024 17:19:05 +0000 Date: Fri, 9 Feb 2024 13:19:03 -0400 From: Jason Gunthorpe To: Alex Williamson Cc: Ankit Agrawal , "Tian, Kevin" , Yishai Hadas , "mst@redhat.com" , "shameerali.kolothum.thodi@huawei.com" , "clg@redhat.com" , "oleksandr@natalenko.name" , "K V P, Satyanarayana" , "eric.auger@redhat.com" , "brett.creeley@amd.com" , "horms@kernel.org" , Rahul Rameshbabu , Aniket Agashe , Neo Jia , Kirti Wankhede , "Tarun Gupta (SW-GPU)" , Vikram Sethi , Andy Currid , Alistair Popple , John Hubbard , Dan Williams , "Anuj Aggarwal (SW-GPU)" , Matt Ochs , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "virtualization@lists.linux-foundation.org" Subject: Re: [PATCH v17 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper Message-ID: <20240209171903.GQ10476@nvidia.com> References: <20240205230123.18981-1-ankita@nvidia.com> <20240205230123.18981-4-ankita@nvidia.com> <20240209085531.73f25a98.alex.williamson@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240209085531.73f25a98.alex.williamson@redhat.com> X-ClientProxiedBy: DM6PR10CA0013.namprd10.prod.outlook.com (2603:10b6:5:60::26) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|CH0PR12MB5331:EE_ X-MS-Office365-Filtering-Correlation-Id: 07436d66-d670-4953-d83f-08dc299337a5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zkwlKR9iPnN4Tz3jNY+mfq5eTjuy6znrCuYutlKdog6Jk9slxqwWkaXsL7xOTbOTwwRycJFWmrGajpwbZTYGRIQGBXE+u52IxlN5sdE6H8WRVydqzF7f3mCt74HhM69JUTX3jfALi5y1lcHEYioTxM3bNaa1hYaoglfAcUSVL7C5abUx38abbFWc4r4J6H8MFn30gqmX+414eH7eXmeuCpUmjIPLDyMXN7CsHms5x2i3IXP/nrzND6m828AceuzeE8V1lFv9TUtMnqX1BRHKEWrXhB5EdgEANvUn5pVX42RM3IdkRCYPpZhAYUDvlw4zxEKHf35FqGeBoA5xG4tclaxRhe0TVekyK33WaF4QV5brsM4hAl1zxxpYtu9gCtlu+AjiGQodvTMJKdVQv4mhhlbo3K/rHRnlpH9mE+1GVKkvQ5KNP/3Ifilj9slmwbdmQCfR8oRh94lcR5Z2bAdbtYr2PSMjqx0N1MCXqmsocfOuaqf4zTp440V7/92qf22X+RYInYyy4JF7pIJIKpptHoHB5S89xvgvFAY4r3OgaD4oYKdtMK5u9aFJBWP6RGa2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(136003)(39860400002)(366004)(396003)(346002)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(41300700001)(478600001)(6486002)(6506007)(2616005)(36756003)(6512007)(66476007)(7416002)(66556008)(5660300002)(26005)(1076003)(2906002)(33656002)(66946007)(4744005)(83380400001)(6916009)(8936002)(54906003)(316002)(8676002)(4326008)(38100700002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?nzzoFfUJf5OuSkYef1L/foYzZ8QCRRzDn53mDnhrOg9AFg+3mZvTZCYE1W6O?= =?us-ascii?Q?s4Zt38IYILoSlG0vOy/HRxjbmOParNS6rUnz/V4D1vRB5OVhM+jsNKm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QZSo19MnhZihZAiPLBVl0WNOcyUvJPEzrou?= =?us-ascii?Q?ut3acVPTA8AalXdKlQWkfuxIflnriPEkF28rwRkxtyTPTEbkpkr97GxX0Cbk?= =?us-ascii?Q?LBg9t6MJ9pSGIjXN8X4Ln6xRjgnJlS08f4QNWrWLS7zZak4bcNoQB91e3Qvw?= =?us-ascii?Q?S4EYqdktecEBv6RuzZGDl74Y566i8qViQY5UURwjMpTXj8feGq0qwEpMqGmJ?= =?us-ascii?Q?MHfDdn4C4mATkevFnzyiQZxPZ80tj0vLldKsr3ZdkGMbkYVZ6aHKFRpvXncX?= =?us-ascii?Q?P2JXDm8/wU8jeGKhKc7tlShwyNEEL0M4UG06W/+XBjBnve1pRIxkaXJRRYlm?= =?us-ascii?Q?f1jHyJTcXydc6+NxKwAcWrh49/+4Qrhd0ojTvHx5AeSA4eVn4WnEAfCEPQ8K?= =?us-ascii?Q?wZxLblhntC7m+7WyMjii1NStSZcYt7U46vYmROgQaHGl3d39xFKuFK+fYAqS?= =?us-ascii?Q?EKOjhx4ymRYO9n5x3aXOgF7t/ALs7kZjAV8+gXFftMmZ32rcl/Zl9vHZc+KM?= =?us-ascii?Q?0wTjgXrlkusKKVCH6zgeJYiGwS2vbUcMAtJ8GZsIXeDrEwrnGnTHe11z63fz?= =?us-ascii?Q?pZ3K7WN6GY57+itFzv92FHR/If1F7H6G7EBUaPak?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 07436d66-d670-4953-d83f-08dc299337a5 X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2024 17:19:05.1551 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0jklR9EDdA6rQoZvlvwEiWZ67QTeUEXzN3V1NVLNXx1sa2b0xAWeiheyT+3Z/oHD X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5331 On Fri, Feb 09, 2024 at 08:55:31AM -0700, Alex Williamson wrote: > I think Kevin's point is also relative to this latter scenario, in the > L1 instance of the nvgrace-gpu driver the mmap of the usemem BAR is > cachable, but in the L2 instance of the driver where we only use the > vfio-pci-core ops nothing maintains that cachable mapping. Is that a > problem? An uncached mapping on top of a cachable mapping is often > prone to problems. On these CPUs the ARM architecture won't permit it, the L0 level blocks uncachable using FWB and page table attributes. The VM, no matter what it does, cannot make the cachable memory uncachable. Jason