Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3856509pxy; Tue, 4 May 2021 11:25:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyImD5uK8SwYP66nFZH5QInFe3U9gYL/DFFXKU4knIibgeYzoyvC6rc46dFHiO9HBpmQgwX X-Received: by 2002:a63:3204:: with SMTP id y4mr25035768pgy.3.1620152746779; Tue, 04 May 2021 11:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620152746; cv=none; d=google.com; s=arc-20160816; b=dvgqKzkb++J9wwmPl6nl72z7UkcomjQC25F1XwPQNr4ODtr4bHpLLgMxNMJQvNSZDY ikTCVcREiNnn6nfrB1qyo6cP4jhlGMHDeXmj6vjh/l7BaTmROcP90N/3yM07cgSl4ss5 NpabZBOtY1etoBO4cn0dVQT6uchlQoGe1k0ypNdinCK3Ne6t7wIgpy+VFORh1IA6E4U6 W/KbOw1krWOxOIDD6Cu+h//1/qabKaQTZ5kMCsNfqrkelUk6rdX1rVFHjiP4hTwvYCiw GFomiNIX8w0FEgkLGk9kRGDuevAXhE2Q3ZucCuUfOEKgRA+ZtZDZ4ZSkedCgzAW8SRFB 71Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=4Yu0ub1Ha09E7MmB5gEC//2Xjz5trh1PpUjPcv+ZMM0=; b=SBjuHWq59eZkG/NbEHTmKAYU5ev8xSXntU2+Aa8C9pH+RnDveIY6uVN7N4W1b6E1RX GlrhyiYDaXYUcIDkwQlMUyKDIUAFWq63BDnavi4S3rOnUUZgztQdIwli1JxTzqx1eK5Z zy5ltF4vlhxbpwab6wOCj3HSzGGdkn4E6sVGC/4ZgrBnUIunMoiS/getnGIURwGAtT9y jwjQ95OEzYNYJHzcEm8xb/vDoyp99JtyK2exgD9M6FAvuORzWSYcfik/F0KYVbeUg8RW b9B6rzz9rGAnwma6K1qrzk6pddsYIdgdyL2IuDTM+xBHdSbfT7dRrd2LBgCnELW8rcwB NB5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h22si18799040pfn.35.2021.05.04.11.25.30; Tue, 04 May 2021 11:25:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231638AbhEDQMu (ORCPT + 99 others); Tue, 4 May 2021 12:12:50 -0400 Received: from 1.mo51.mail-out.ovh.net ([178.32.121.110]:40135 "EHLO 1.mo51.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231446AbhEDQMu (ORCPT ); Tue, 4 May 2021 12:12:50 -0400 X-Greylist: delayed 4912 seconds by postgrey-1.27 at vger.kernel.org; Tue, 04 May 2021 12:12:49 EDT Received: from mxplan5.mail.ovh.net (unknown [10.109.146.107]) by mo51.mail-out.ovh.net (Postfix) with ESMTPS id 087F3298BF2; Tue, 4 May 2021 18:11:52 +0200 (CEST) Received: from kaod.org (37.59.142.106) by DAG8EX1.mxp5.local (172.16.2.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 4 May 2021 18:11:52 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-106R006dd1c6483-bda8-448c-a210-1caf189ab7ac, 233BADB9E061AA125F593C9F78707CF28220F307) smtp.auth=groug@kaod.org X-OVh-ClientIp: 78.197.208.248 Date: Tue, 4 May 2021 18:11:51 +0200 From: Greg Kurz To: Alex Williamson CC: , , , , , , , , Subject: Re: [PATCH] vfio/pci: Revert nvlink removal uAPI breakage Message-ID: <20210504181151.62b14551@bahia.lan> In-Reply-To: <162014341432.3807030.11054087109120670135.stgit@omen> References: <162014341432.3807030.11054087109120670135.stgit@omen> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [37.59.142.106] X-ClientProxiedBy: DAG4EX1.mxp5.local (172.16.2.31) To DAG8EX1.mxp5.local (172.16.2.71) X-Ovh-Tracer-GUID: 3e61a315-22a8-4afd-86cb-fce400e0fcce X-Ovh-Tracer-Id: 8234831918973819314 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduledrvdefiedguddttdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvuffkjghfofggtgfgihesthejredtredtvdenucfhrhhomhepifhrvghgucfmuhhriicuoehgrhhouhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepfedutdeijeejveehkeeileetgfelteekteehtedtieefffevhffflefftdefleejnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrddutdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepmhigphhlrghnhedrmhgrihhlrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehgrhhouhhgsehkrghougdrohhrghdprhgtphhtthhopehqvghmuhdqphhptgesnhhonhhgnhhurdhorhhg Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 04 May 2021 09:52:02 -0600 Alex Williamson wrote: > Revert the uAPI changes from the below commit with notice that these > regions and capabilities are no longer provided. > > Fixes: b392a1989170 ("vfio/pci: remove vfio_pci_nvlink2") > Reported-by: Greg Kurz > Signed-off-by: Alex Williamson > --- > > Greg (Kurz), please double check this resolves the issue. Thanks! > It does. Feel free to add: Reviewed-by: Greg Kurz and Tested-by: Greg Kurz Thanks for the quick fix. Cheers, -- Greg > include/uapi/linux/vfio.h | 46 +++++++++++++++++++++++++++++++++++++++++---- > 1 file changed, 42 insertions(+), 4 deletions(-) > > diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h > index 34b1f53a3901..ef33ea002b0b 100644 > --- a/include/uapi/linux/vfio.h > +++ b/include/uapi/linux/vfio.h > @@ -333,10 +333,21 @@ struct vfio_region_info_cap_type { > #define VFIO_REGION_SUBTYPE_INTEL_IGD_LPC_CFG (3) > > /* 10de vendor PCI sub-types */ > -/* subtype 1 was VFIO_REGION_SUBTYPE_NVIDIA_NVLINK2_RAM, don't use */ > +/* > + * NVIDIA GPU NVlink2 RAM is coherent RAM mapped onto the host address space. > + * > + * Deprecated, region no longer provided > + */ > +#define VFIO_REGION_SUBTYPE_NVIDIA_NVLINK2_RAM (1) > > /* 1014 vendor PCI sub-types */ > -/* subtype 1 was VFIO_REGION_SUBTYPE_IBM_NVLINK2_ATSD, don't use */ > +/* > + * IBM NPU NVlink2 ATSD (Address Translation Shootdown) register of NPU > + * to do TLB invalidation on a GPU. > + * > + * Deprecated, region no longer provided > + */ > +#define VFIO_REGION_SUBTYPE_IBM_NVLINK2_ATSD (1) > > /* sub-types for VFIO_REGION_TYPE_GFX */ > #define VFIO_REGION_SUBTYPE_GFX_EDID (1) > @@ -630,9 +641,36 @@ struct vfio_device_migration_info { > */ > #define VFIO_REGION_INFO_CAP_MSIX_MAPPABLE 3 > > -/* subtype 4 was VFIO_REGION_INFO_CAP_NVLINK2_SSATGT, don't use */ > +/* > + * Capability with compressed real address (aka SSA - small system address) > + * where GPU RAM is mapped on a system bus. Used by a GPU for DMA routing > + * and by the userspace to associate a NVLink bridge with a GPU. > + * > + * Deprecated, capability no longer provided > + */ > +#define VFIO_REGION_INFO_CAP_NVLINK2_SSATGT 4 > + > +struct vfio_region_info_cap_nvlink2_ssatgt { > + struct vfio_info_cap_header header; > + __u64 tgt; > +}; > > -/* subtype 5 was VFIO_REGION_INFO_CAP_NVLINK2_LNKSPD, don't use */ > +/* > + * Capability with an NVLink link speed. The value is read by > + * the NVlink2 bridge driver from the bridge's "ibm,nvlink-speed" > + * property in the device tree. The value is fixed in the hardware > + * and failing to provide the correct value results in the link > + * not working with no indication from the driver why. > + * > + * Deprecated, capability no longer provided > + */ > +#define VFIO_REGION_INFO_CAP_NVLINK2_LNKSPD 5 > + > +struct vfio_region_info_cap_nvlink2_lnkspd { > + struct vfio_info_cap_header header; > + __u32 link_speed; > + __u32 __pad; > +}; > > /** > * VFIO_DEVICE_GET_IRQ_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 9, > >