Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1197856rda; Mon, 23 Oct 2023 05:48:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG1hTiuZ53mufyv5sWkhzDsNH9EQTY6SqqOlf35vLYDzVjFeK3tWfXBbvUhdgHlvYMm867C X-Received: by 2002:a05:6358:700d:b0:168:e7a8:e02f with SMTP id 13-20020a056358700d00b00168e7a8e02fmr957757rwo.21.1698065324923; Mon, 23 Oct 2023 05:48:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698065324; cv=pass; d=google.com; s=arc-20160816; b=ylN81g8Vl84gLITnk7ZpNNYSLaSg7uPa0Vc4pPUoVACUbDZhEUzoj+TK/uMvA9xJUb lJ1jiIyZF+GTn7Fv94kODQKpz+IyrZbOfgzbSqCtP9JetiKA+thYH/xExGuzZa8LNVNI TZHPf1K6kIRs/SVYMiGHUDGkPLHH2+uItjXR+I8p1qyeM8f5dwt9ywh2HXerUGMhoZzX lemG0Jsad71KshowWBbS1oIgYgyDHY6Ob3u2qW+QYtsinJiJJomhgdfuTvrs6g9vd2Iz T0iSupeGw6IIKnjWizrCo55u/ig5Y447hlNLu/yHimwaIKxK6+mq6B9MJwinYKN32I0E uP7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=/nzWLnsO7Qu+VSMOBGaKUNElFHXwRkUc1ciIwl62B78=; fh=yHFmLAQOBXyttbDwyhSFbzelyeYpN5volvS0NHCZmCI=; b=udm3z5BG+AlgTQX8/9+YmlpKYqlSFPslem3PXCX/Lln2FdRiW5M0fNMc5fO4EGedN4 bkzpH1oqo6tE4eQ1BTowiwm0DBfWtve+fi4l+VUhXP43vlfJzlxad71yeIdveDgAFq+J H/K+wS0Vof1sUw2Dis5ZVlotjVf7gA405q84goo0U+DbFnNWHa7hPbXoqK2ptklHF9zM o1jwRFDEgNyVYQqBCAKmsoHXOvYfZ38j1gHIlnHkUDeM6lRSIVgGVofcoSY+s2zptkdV Ht8K4hl7DIm65oOtXoH3fR1pi9jrfQJ6vqjB1asDIryY3QhoNIivv0365Qsmf716WC6r I1rQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=kD+ukr9S; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l64-20020a638843000000b0056534e3aeeasi6198003pgd.474.2023.10.23.05.48.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 05:48:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=kD+ukr9S; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id CBBBF8046BEE; Mon, 23 Oct 2023 05:48:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230071AbjJWMs3 (ORCPT + 99 others); Mon, 23 Oct 2023 08:48:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229613AbjJWMs1 (ORCPT ); Mon, 23 Oct 2023 08:48:27 -0400 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2066.outbound.protection.outlook.com [40.107.102.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F300A4; Mon, 23 Oct 2023 05:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gvJDNAoiFaOQfAElohcOh48yPTod3aL49L3wz7nwkGYl7I9fsgWRirZdMo7vcwlxExFL/tiYVWCrHKT2rWxF6/4kbgZ3QDYjxuPzLd6VBvTgEHfhMoSmGefp0/ojM+TlZ2eBAMAcQ1BNOwIod0qaqp+w4pUQ8kg3tOtNXyx6+GYrd9ZjJI/v3M8TVbjVEtY7DqQHggAC8pffBKq8/XivZb9d72Syoh0q9x7kz6fMezlWrOnHBxkUxxOQw8S/RzM3E05ekKDK9mfEY7ANHZuwNqsLTYMDE45Vw1dCznpc9BaDjtnMYXfBzY7UaeX2AmCQP6e3YCksUEs0qTL89fmHpg== 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=/nzWLnsO7Qu+VSMOBGaKUNElFHXwRkUc1ciIwl62B78=; b=Zshvstt4vCQ7CA/6+RJSRrkLcCEuJ52lgUO4FSNgPuAAZ+0EbCReIwD5FANFy2XzVtqKERJYWtgPKZlxgpGGezzsxitzuQOQv4r32nGx/vXZTJspjj7cKKjUlyuiIba4YF4TNOYP02HjtiJLMy0JKXST4abEGG6bcVdKBcOiOZ+kQKJOdj61WpXauVXoVmDWkrbi+6/Y4zgu8XMl9uJMUW7nzBH5mYx2Ih4xn5DAdWYJemX15c8peYVmuV9p5HjUmu1H2WNC7FTaG08f+38vOnQQ2NbQvjle7E9c2OFQTzhHwNp7KxTOxppo4bv97D3uo9McAJtHOU8SeuY/S2J1Vg== 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=/nzWLnsO7Qu+VSMOBGaKUNElFHXwRkUc1ciIwl62B78=; b=kD+ukr9S0L28apvc1ZWGo0OE/SLEu/MtKIKiYELy/Jeac0dQtUCgpQG5no20s0s8skt0eM+ZsZdxncOmPHyZlanPuCjBX2M3OWDv6UezquOaryKm0Ys7PhxRUG0ouG8qfb0Mr7nI9ScGwq0p5VjOHrQ0Ge6yyRBVRGvhJfZ+E1JBSSn/oF4sd25V0d7pURvKm2vWPAjfXodhICT5zJX+N+hM56a5XzXopXGlPe+ELQwdxxSrnUz8MJfJJCIRJDXPfyh4QsEPAXO9MErr7RwpxqGZQJV8idPp2xcLq20FZm9jmO+0wg+piLDuL4ju5HovmFC7jylLF0HxDHhoc7v1gw== Received: from BY5PR12MB3763.namprd12.prod.outlook.com (2603:10b6:a03:1a8::24) by MN0PR12MB5955.namprd12.prod.outlook.com (2603:10b6:208:37e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.31; Mon, 23 Oct 2023 12:48:22 +0000 Received: from BY5PR12MB3763.namprd12.prod.outlook.com ([fe80::84:dd27:ba92:6b15]) by BY5PR12MB3763.namprd12.prod.outlook.com ([fe80::84:dd27:ba92:6b15%4]) with mapi id 15.20.6907.030; Mon, 23 Oct 2023 12:48:22 +0000 From: Ankit Agrawal To: Alex Williamson CC: Jason Gunthorpe , Yishai Hadas , "shameerali.kolothum.thodi@huawei.com" , "kevin.tian@intel.com" , Aniket Agashe , Neo Jia , Kirti Wankhede , "Tarun Gupta (SW-GPU)" , Vikram Sethi , Andy Currid , Alistair Popple , John Hubbard , Dan Williams , "Anuj Aggarwal (SW-GPU)" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v12 1/1] vfio/nvgpu: Add vfio pci variant module for grace hopper Thread-Topic: [PATCH v12 1/1] vfio/nvgpu: Add vfio pci variant module for grace hopper Thread-Index: AQHZ/4T6dPreO49caEWsaHN/ceuQqrBOmsSAgAi/5YQ= Date: Mon, 23 Oct 2023 12:48:22 +0000 Message-ID: References: <20231015163047.20391-1-ankita@nvidia.com> <20231017165437.69a84f0c.alex.williamson@redhat.com> In-Reply-To: <20231017165437.69a84f0c.alex.williamson@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BY5PR12MB3763:EE_|MN0PR12MB5955:EE_ x-ms-office365-filtering-correlation-id: 9a78ad40-1a9c-42fe-17a9-08dbd3c6571b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 23bNNaQfBgoRnL2Z12NaqFSAotY/+gjo8HHvEjUqpqQYP4Etf+6WWMU2CgIqtKjm+WgIx72xy6YviQyRBvPKOzFHF4IcPYrviSq5IqBsQ3616m0oVcUCbytNq0mMb6KAcb20fXasdDOg0/B0Gr3jwbKI5r6Hlx60+kDZHJ2ix6QyfBFF0X6kZMmQ5AEMpPxbTYokyfWWlq1chgFozUOYhZ04Y8Hu1ugr4B+JZob1b5olzvk0789EtWJl+LgDWxriYWSHjP/uroGTysPsyeCN2v4UIZMUcURHII2pDy+1XMOgkkf1UIvhmYEzyjz3qJKz4fibsd5lOHTWixg+Ia1w6lZyt3DnRGd4b9WCwxiRaPwbYZeUvdBQYmMTBWUckkbUspX+GZ72WXMepWrRVHnuMohR3sTI0my7sY8bEy+MLrPX5amVcDxZPcy57Z4j2liB7nwWJ+E/Fejaak07oP10E7g9ksnaqOXxeRVUoro0rETyN4yH/VQfBHTZ0h1u2k846xnywdcApdXev8ndEV3ZKw6y+/rL95k2lfpPY+wcBV/N+LNGYa/ZwFtPmS2siVTidv3dturCdQwIBcf7rw87VGzFRzYFXMODkj4lod1ZKbZPSQ/wenfuv0tsYUFD/YIE x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR12MB3763.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(346002)(136003)(39860400002)(376002)(230922051799003)(1800799009)(186009)(451199024)(64100799003)(55016003)(4744005)(2906002)(38100700002)(76116006)(66446008)(316002)(64756008)(66556008)(54906003)(66476007)(122000001)(66946007)(6916009)(7696005)(6506007)(91956017)(71200400001)(478600001)(9686003)(41300700001)(52536014)(86362001)(5660300002)(4326008)(33656002)(8936002)(8676002)(38070700009)(26005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?ghPH+k+kNEb+IaY7SzU/g5stGPtmczaZcPKIoe/nSbeV3+PAHLUIH0b79Q?= =?iso-8859-1?Q?H56mpWDsE80rHMw7nMvoifDnLkBe6fTgoX7QbkIQGrepIfna3vonfh9qjl?= =?iso-8859-1?Q?Lg96rsBRkAod4Wm1S7m5sNipCwtXHimrDJUPmUDDILsUVNZZO8R5E+oYSG?= =?iso-8859-1?Q?ni5g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jmnRwGQeGuxShn?= =?iso-8859-1?Q?udUBggNXK92yAQP/yX5H7OUZQvJQe5jlCErmK/4MPVDh683mgk505UV88f?= =?iso-8859-1?Q?xw/FPBPyNRFgU7I+E3leR7pmxfcdw28dbqB8O9XcCxKrT0jR4H3Wc+G9Hj?= =?iso-8859-1?Q?NZrE6qGTcnVlbUl1WjWfIYcNIq2KL17LulwGZZYrMC7a9JoaqFJhqTIAIx?= =?iso-8859-1?Q?WMhrUm85pTUlM9lZUFJIz+eCQpcl3vTU/4qyV6iEOpm84JYEmlU4pwRgMp?= =?iso-8859-1?Q?vXq5Dh8Uni0VbDYL1AETGoyL6VKjm/TPE1FM+hRhSetLYF86aQhePzBjNu?= =?iso-8859-1?Q?qwRTEvKybwfJbsokxzCfLE+APUEBNTO5YaIs37HPy1HK8aymvUp1jGmnDF?= =?iso-8859-1?Q?RPHk18FwSczZrAIgsGExzmV6ZcQRZvBzqqpFxziQeANbL3IIp04liNTlKd?= =?iso-8859-1?Q?USG0PlWnPtwB8Ivdxp4ZaF1nUD5zYfObohcBXmQA+GtAVdReubjjztvUD2?= =?iso-8859-1?Q?zxCUJ2OIlVlRuFo3WJ4FKACqX0S/HjSObnHwMU9haplEoklKz7DjOsjHYz?= =?iso-8859-1?Q?UsnMX+s6DBMo0=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB3763.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a78ad40-1a9c-42fe-17a9-08dbd3c6571b X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2023 12:48:22.1173 (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: GksjS7Op4R6Weo5XaR5SKBx9Fxh8Zd5i9I8BOcEFeqG0UUjbFbbW32lwDpSFdmya60ts6Tjq7j/O7F9mLdvViw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5955 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 23 Oct 2023 05:48:42 -0700 (PDT) > After looking at Yishai's virtio-vfio-pci driver where BAR0 is emulated= =0A= > as an IO Port BAR, it occurs to me that there's no config space=0A= > emulation of BAR2 (or BAR3) here.=A0 Doesn't this mean that QEMU register= s=0A= > the BAR as 32-bit, non-prefetchable?=A0 ie. VFIOBAR.type & .mem64 are=0A= > wrong?=0A= =0A= Maybe I didn't understand the question, but the PCI config space read/write= =0A= would still be handled by vfio_pci_core_read/write() which returns the=0A= appropriate flags. I have checked that the device BARs are 64b and=0A= prefetchable in the VM.=0A= =0A= > We also need to decide how strictly variant drivers need to emulate=0A= > vfio_pci_config_rw with respect to BAR sizing, where the core code=0A= > provides emulation of sizing and Yishai's virtio driver only emulates=0A= > the IO port indicator bit.=0A= =0A= Sorry, it isn't clear to me how would resizable BAR is applicable in this= =0A= variant driver as the BAR represents the device memory. Should we be=0A= exposing such feature as unsupported for this variant driver?=