From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 72C71C77B6C for ; Thu, 13 Apr 2023 02:57:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8421E10EA18; Thu, 13 Apr 2023 02:57:11 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id B6FC910EA16; Thu, 13 Apr 2023 02:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681354628; x=1712890628; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=vouxstjkJCifRXPlmMsOqYNaXcEnSGJneThzVXWyy8I=; b=EPLd87kmXkosPUC+NpBUZR//07J7bRPCMnFBVFx9MTYjj3tDNEyXa+pU rSLIH7/lCTI4fcML/W7FbOg5uptUwvqz+ud1lAcAurKgOUjEx4NVGyy5c MOjYg4EOwergCNrT26wdJ8QfEjdRzleFdkKSAmWlogd59RzQzqa9OCPiu jG2UYxSPbAzBtAw93/BndvwOBgx0N7dNeWcrfgu1GEooNys3rdoM1W+wk wBwasLLjzQ7SK1mTWI5wZhTJh7bJ0oGeLOCRt9hIFX9DJ1DkjBhACgLaL jWsrobqTPsge5eGYTque8xQaE/IGkEz31i82H2jflrd3Cm1Q0OZasx0MU g==; X-IronPort-AV: E=McAfee;i="6600,9927,10678"; a="328185632" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="328185632" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 19:57:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10678"; a="863550182" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="863550182" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga005.jf.intel.com with ESMTP; 12 Apr 2023 19:57:07 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 12 Apr 2023 19:57:06 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Wed, 12 Apr 2023 19:57:06 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Wed, 12 Apr 2023 19:57:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DC7O+uyaU+f7Aszo3qy+gsSiZ+l8JOCwGk40V/Gj3JF2A7HRS9/qSDjECaugnImleDu5uhmKMKCCAxmCO6JpGn29IGCz8JRVmJuOqS/WsGhd444Qr4zm0lgtl9oF/hairdBE0Dm0Z+CZJOTtiaohAzLMteSZyrC3bZkHspc0JYIZ0aCkbt2eEJnfB+CO4z/0qiPninRESSQ8aTSwiqwmSBRItEEUa5GOie+qOs/+M1bBo5Y5it6jyCRyDC1mh0aaTWxRLUbwvMJH8aQY0FWvGmhm9/jsjRlLfKN96GTHA3oYKGm6BGabzRVJP9es2btVVZMAWZ01gAt/79PFkN1XqA== 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=u6SIAn2rNSJzTR/gG+aEINd2N6uefvK9cYmxA7TwQAQ=; b=biG1GHhuyWgLiJbWymrnXdIv58XRndKFFIkEuZ3oEGxZybTCuerVBRmyFJS6xGAWXPXNasK2tA8EsOnB+klJgQbrzB+BYz1K5fAQcfv8Hi2B4sLdw/9yhENqvCXA8Ad6neNh6tIfGwTiT5S1dnVeDiMyeavfQd00Af9FSxSDg5bE/v/GAVvuM+nLJ5HKy0bQ7AAjKB6afgJ6dI5i94hOOa8fJIc4keb6B+F0xSqpV1CYCI8q22qUWG5A185rpbrGT7ls1+dCocyw/6FCXipgpu0dvR8oCL1LD77BfEyLoP88+e1u+uYyxNEzkoiuwrad3r5pxIl2JZROtw4SkzkP/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BN9PR11MB5276.namprd11.prod.outlook.com (2603:10b6:408:135::18) by SJ2PR11MB7548.namprd11.prod.outlook.com (2603:10b6:a03:4cd::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30; Thu, 13 Apr 2023 02:57:04 +0000 Received: from BN9PR11MB5276.namprd11.prod.outlook.com ([fe80::73e9:b405:2cae:9174]) by BN9PR11MB5276.namprd11.prod.outlook.com ([fe80::73e9:b405:2cae:9174%7]) with mapi id 15.20.6298.030; Thu, 13 Apr 2023 02:57:04 +0000 From: "Tian, Kevin" To: Jason Gunthorpe Thread-Topic: [PATCH v3 12/12] vfio/pci: Report dev_id in VFIO_DEVICE_GET_PCI_HOT_RESET_INFO Thread-Index: AQHZZKiCXow33Wzeq0K314B/OZqu968cqG8AgAAdbYCAACdegIAAAyuAgAAEPICAAAjLgIAAGeKAgAAG7oCAAAf9gIAAO30AgACyrQCAAIPEgIAHkI0AgAApuICAABWEgIAAGNKAgAA3aoCAACJEAIAAeYpwgACDPgCAAMYh0A== Date: Thu, 13 Apr 2023 02:57:04 +0000 Message-ID: References: <20230406115347.7af28448.alex.williamson@redhat.com> <20230411095417.240bac39.alex.williamson@redhat.com> <20230411111117.0766ad52.alex.williamson@redhat.com> <20230411155827.3489400a.alex.williamson@redhat.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN9PR11MB5276:EE_|SJ2PR11MB7548:EE_ x-ms-office365-filtering-correlation-id: cbbd32c7-e271-4780-6952-08db3bcac313 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CkDyF91wRkOFFGPBctSDgSYkvbLha/bxEec47sGY5v69Oa8W+1+68o5WVf0GiL2ORl/4V9KF+mNwZjuLQnQhaR5xpKLxP0AaOkZMyfBW+q1IQjQtsN6lTHg9ZfQxwiho7ZEtcEWVEV2muRuHJRSGxt/MpR8AUZclzP5Jb0VswEBf0P3XU5MoPvZ9hFLtGoUFQxDMjEL2f1m9v10An/O2+4wn/ljtpkSz4NHU8ur70MY8w2rhyhx72l/cPZ3OAig62HV+5EPZ8Q9HKiMMINSJ9zD3k9QetBWRx6C4lStidoIvrGT3nPwUDgpVV4HjLk0+/G7B0FdeChvl/TzxaU9HGz6AcDBEhkHYRbWRTm24DhR79pueRvzlYXfL5fHu1AqaClu1phA/mHzVAfUJtHIKk6h38UQUAb/CIhWLuHti1FeY3ztvZyApUSpIN5kkT45Jnk6HBUZYcSNZP7fQxzKavmRxtVnyVSfPk5E501eiF5Zcb1u3qgzXtlzXyCnRYAOUSv9xHwLPnDHQ2H0qNKehWWKdfPaY5pwjnHGP709NUxa/wRDfOPxcMSHH5nmiZNA/f9qkG66qUq3T9ASJEFgmFP1lfGS+GrIIhIHyTLQMZt+JvUsi02AlL3xnI4qJe39y x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR11MB5276.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(366004)(136003)(396003)(376002)(39860400002)(346002)(451199021)(316002)(38100700002)(6916009)(4326008)(64756008)(66446008)(66556008)(66946007)(76116006)(66476007)(82960400001)(5660300002)(41300700001)(52536014)(7696005)(71200400001)(86362001)(54906003)(6506007)(26005)(186003)(9686003)(38070700005)(2906002)(7416002)(8676002)(8936002)(55016003)(478600001)(33656002)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xQoTdfwXbLhCj2wctG/kRqPSskGJyY2au6AOwB4FwJ2bLd9TfTC1UcG244O7?= =?us-ascii?Q?Z5NXB4ct7m9iTO6OEcVTbntI/ZI2DeAhRhm0+d928RtSvFevMmKNKbFxY8Oc?= =?us-ascii?Q?YbH3e1xItQLKNnJ7hHJNjRdj4BdCe2FTFiRKGGHnmoB+b/59qN/NFxKkmbFS?= =?us-ascii?Q?lfjWxAiFK4TrqKPd/XH9C82+yNSGDVIwLGuk7+fDf2CBnXyJGsDrU1DQNeJ9?= =?us-ascii?Q?ucGWTHUdKpUoKwj+JQ3claqhcmzJd9QJs+rZjkYYNqqAjBjXHWS1CTqcC4ZM?= =?us-ascii?Q?nfT+Y+DyxUmc+A9z0l7irEMO1p/E+XUFRt4ApyBurI5o0OOOgdGTKVmdKk4j?= =?us-ascii?Q?wanNtO3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7fN3PiW7yXponu?= =?us-ascii?Q?UgsnAfJmhzFbS5BJb8eOpNpqqQ05VTdrbgRf8HN7TD90AW2tfNgRHjGpPUEs?= =?us-ascii?Q?qcLj37qBeTYA13UM781E/aNXXW5M0oBVAwvknSbSETFCdK/tVL7zJfELArJ0?= =?us-ascii?Q?KNXqc+lvePc/kryfLnOlf63vy8sZPWTds2pQ8KJnLyVZuwkptHrHQec9m9lY?= =?us-ascii?Q?PSXqpu26pEwWv9kCN2Nz356c9Z5Q3OHkNKm7W2+53BZqTo0yML4IQg+ZM2wt?= =?us-ascii?Q?+aQHuDGyNIHb/nGO5lYiUnOO+3JZ11ETboNmmbAIBN8VOuqw1qXp14Rr8pdq?= =?us-ascii?Q?Y+555TmErLrE3la2CkY5NxC3opb5AClgSv69UDAW?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5276.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbbd32c7-e271-4780-6952-08db3bcac313 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2023 02:57:04.5088 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: oxhBOOstsBOi213SqgNcGMuaruSQLm/IDDo8BWXxuS/zikCXKwSFxCn/7Xn+h6oGOqogmiNieY9a8W98y2WoQw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7548 X-OriginatorOrg: intel.com Subject: Re: [Intel-gfx] [PATCH v3 12/12] vfio/pci: Report dev_id in VFIO_DEVICE_GET_PCI_HOT_RESET_INFO X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "kvm@vger.kernel.org" , "jasowang@redhat.com" , "Hao, Xudong" , "Duan, Zhenzhong" , "peterx@redhat.com" , "Xu, Terrence" , "chao.p.peng@linux.intel.com" , "linux-s390@vger.kernel.org" , "Liu, Yi L" , "mjrosato@linux.ibm.com" , "lulu@redhat.com" , "Jiang, Yanting" , "joro@8bytes.org" , "nicolinc@nvidia.com" , "Zhao, Yan Y" , "intel-gfx@lists.freedesktop.org" , "eric.auger@redhat.com" , "intel-gvt-dev@lists.freedesktop.org" , "yi.y.sun@linux.intel.com" , "cohuck@redhat.com" , "shameerali.kolothum.thodi@huawei.com" , "suravee.suthikulpanit@amd.com" , "robin.murphy@arm.com" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" > From: Jason Gunthorpe > Sent: Wednesday, April 12, 2023 11:06 PM >=20 > On Wed, Apr 12, 2023 at 07:27:43AM +0000, Tian, Kevin wrote: > > > From: Jason Gunthorpe > > > Sent: Wednesday, April 12, 2023 8:01 AM > > > > > > I see this problem as a few basic requirements from a qemu-like > > > application: > > > > > > 1) Does the configuration I was given support reset right now? > > > 2) Will the configuration I was given support reset for the duration > > > of my execution? > > > 3) What groups of the devices I already have open does the reset > > > effect? > > > 4) For debugging, report to the user the full list of devices in the > > > reset group, in a way that relates back to sysfs. > > > 5) Away to trigger a reset on a group of devices > > > > > > #1/#2 is the API I suggested here. Ask the kernel if the current > > > configuration works, and ask it to keep it working. > > > > > > #3 is either INFO and a CAP for BDF or INFO2 reporting dev_id > > > > > > #4 is either INFO and print the BDFs or INFO2 reporting the struct > > > vfio_device IDR # (eg /sys/class/vfio/vfioXXX/). > > > > mdev doesn't have BDF. Of course it doesn't support hot_reset either. >=20 > It should support a reset.. Maybe idxd doesn't, but it should be part > of the SIOV model. Our SIOV devices would need it for instance. yes, supporting VFIO_DEVICE_RESET is assumed. That is required by the siov spec. Then no need to support hot_reset. >=20 > > but it's presented to userspace as a pci device. Is it weird for a pci > > device which doesn't provide a BDF cap? >=20 > It is weird for a PCI device, but it is not weird for a VFIO > device. Leaking the physical labels out of the uAPI is not clean, > IMHO. yes. Reporting pasid is also incorrect since it's invisible to user. >=20 > > from this point the vfio_device IDR# sounds more generic. >=20 > Yes, I was thinking about this for the SIOV model. >=20 > Jason