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 X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0C2AC43462 for ; Tue, 4 May 2021 15:33:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 76B7F610FA for ; Tue, 4 May 2021 15:33:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231237AbhEDPe3 (ORCPT ); Tue, 4 May 2021 11:34:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30203 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbhEDPe2 (ORCPT ); Tue, 4 May 2021 11:34:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620142412; 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; bh=HLdHIElXsh+Br5DFDsP1+YjonXAJx6g75JUakM7EhX0=; b=W7/bSoaEHRa2sJJsJaigph9G50tS8iwXHGXNMMpGRAvx5RyjkDyGx4crbI5ceD53cIScDv liNs6G5shs9tAupqA507dUwvV3vC+8jQTPVvUm8++MfP3VMD3NpnQVYFK03osmOE+aAdcm CnRvO6gCkVVktK08sAXf1dCCgXvRbWs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-586-oGqKZBKrOxqxLaLvFcQSeQ-1; Tue, 04 May 2021 11:33:28 -0400 X-MC-Unique: oGqKZBKrOxqxLaLvFcQSeQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C45CF1922039; Tue, 4 May 2021 15:33:26 +0000 (UTC) Received: from redhat.com (ovpn-113-225.phx2.redhat.com [10.3.113.225]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13D425C230; Tue, 4 May 2021 15:33:25 +0000 (UTC) Date: Tue, 4 May 2021 09:33:24 -0600 From: Alex Williamson To: Greg Kurz Cc: Greg Kroah-Hartman , Christoph Hellwig , Michael Ellerman , Jason Gunthorpe , , David Airlie , , , "Paul Mackerras" , Daniel Vetter , , , , Subject: Re: remove the nvlink2 pci_vfio subdriver v2 Message-ID: <20210504093324.4f0cafc7@redhat.com> In-Reply-To: <20210504161131.2ed74d7b@bahia.lan> References: <20210326061311.1497642-1-hch@lst.de> <20210504142236.76994047@bahia.lan> <20210504152034.18e41ec3@bahia.lan> <20210504161131.2ed74d7b@bahia.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 4 May 2021 16:11:31 +0200 Greg Kurz wrote: > On Tue, 4 May 2021 15:30:15 +0200 > Greg Kroah-Hartman wrote: > > > On Tue, May 04, 2021 at 03:20:34PM +0200, Greg Kurz wrote: > > > On Tue, 4 May 2021 14:59:07 +0200 > > > Greg Kroah-Hartman wrote: > > > > > > > On Tue, May 04, 2021 at 02:22:36PM +0200, Greg Kurz wrote: > > > > > On Fri, 26 Mar 2021 07:13:09 +0100 > > > > > Christoph Hellwig wrote: > > > > > > > > > > > Hi all, > > > > > > > > > > > > the nvlink2 vfio subdriver is a weird beast. It supports a hardware > > > > > > feature without any open source component - what would normally be > > > > > > the normal open source userspace that we require for kernel drivers, > > > > > > although in this particular case user space could of course be a > > > > > > kernel driver in a VM. It also happens to be a complete mess that > > > > > > does not properly bind to PCI IDs, is hacked into the vfio_pci driver > > > > > > and also pulles in over 1000 lines of code always build into powerpc > > > > > > kernels that have Power NV support enabled. Because of all these > > > > > > issues and the lack of breaking userspace when it is removed I think > > > > > > the best idea is to simply kill. > > > > > > > > > > > > Changes since v1: > > > > > > - document the removed subtypes as reserved > > > > > > - add the ACK from Greg > > > > > > > > > > > > Diffstat: > > > > > > arch/powerpc/platforms/powernv/npu-dma.c | 705 --------------------------- > > > > > > b/arch/powerpc/include/asm/opal.h | 3 > > > > > > b/arch/powerpc/include/asm/pci-bridge.h | 1 > > > > > > b/arch/powerpc/include/asm/pci.h | 7 > > > > > > b/arch/powerpc/platforms/powernv/Makefile | 2 > > > > > > b/arch/powerpc/platforms/powernv/opal-call.c | 2 > > > > > > b/arch/powerpc/platforms/powernv/pci-ioda.c | 185 ------- > > > > > > b/arch/powerpc/platforms/powernv/pci.c | 11 > > > > > > b/arch/powerpc/platforms/powernv/pci.h | 17 > > > > > > b/arch/powerpc/platforms/pseries/pci.c | 23 > > > > > > b/drivers/vfio/pci/Kconfig | 6 > > > > > > b/drivers/vfio/pci/Makefile | 1 > > > > > > b/drivers/vfio/pci/vfio_pci.c | 18 > > > > > > b/drivers/vfio/pci/vfio_pci_private.h | 14 > > > > > > b/include/uapi/linux/vfio.h | 38 - > > > > > > > > > > > > > > > Hi Christoph, > > > > > > > > > > FYI, these uapi changes break build of QEMU. > > > > > > > > What uapi changes? > > > > > > > > > > All macros and structure definitions that are being removed > > > from include/uapi/linux/vfio.h by patch 1. > > > > > > > What exactly breaks? > > > > > > > > > > These macros and types are used by the current QEMU code base. > > > Next time the QEMU source tree updates its copy of the kernel > > > headers, the compilation of affected code will fail. > > > > So does QEMU use this api that is being removed, or does it just have > > some odd build artifacts of the uapi things? > > > > These are region subtypes definition and associated capabilities. > QEMU basically gets information on VFIO regions from the kernel > driver and for those regions with a nvlink2 subtype, it tries > to extract some more nvlink2 related info. Urgh, let's put the uapi header back in place with a deprecation notice. Userspace should never have a dependency on the existence of a given region, but clearly will have code to parse the data structure describing that region. I'll post a patch. Thanks, Alex 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 X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C48E0C433ED for ; Tue, 4 May 2021 15:34:12 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C6120610FA for ; Tue, 4 May 2021 15:34:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6120610FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FZP5X3yPlz30Gj for ; Wed, 5 May 2021 01:34:08 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=L7sp14P3; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=L7sp14P3; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=alex.williamson@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=L7sp14P3; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=L7sp14P3; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FZP4z3mJ0z2xYk for ; Wed, 5 May 2021 01:33:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620142411; 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; bh=HLdHIElXsh+Br5DFDsP1+YjonXAJx6g75JUakM7EhX0=; b=L7sp14P3Ja5xwEFUVLYLsX2NGR06TKzmsEbTOiAfIdKi3b9dqjYrubdwY1/rjUK/AKVzir 1UvSWWHlp+1etZd72bfdiqpG6AakaFlSVvILIihlklXDXng1taUpjHAqbc1ZGnwiH7iZiv 2Ju3qEZUL2+Bwf6OEpVcyAWjZn1LeCE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620142411; 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; bh=HLdHIElXsh+Br5DFDsP1+YjonXAJx6g75JUakM7EhX0=; b=L7sp14P3Ja5xwEFUVLYLsX2NGR06TKzmsEbTOiAfIdKi3b9dqjYrubdwY1/rjUK/AKVzir 1UvSWWHlp+1etZd72bfdiqpG6AakaFlSVvILIihlklXDXng1taUpjHAqbc1ZGnwiH7iZiv 2Ju3qEZUL2+Bwf6OEpVcyAWjZn1LeCE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-586-oGqKZBKrOxqxLaLvFcQSeQ-1; Tue, 04 May 2021 11:33:28 -0400 X-MC-Unique: oGqKZBKrOxqxLaLvFcQSeQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C45CF1922039; Tue, 4 May 2021 15:33:26 +0000 (UTC) Received: from redhat.com (ovpn-113-225.phx2.redhat.com [10.3.113.225]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13D425C230; Tue, 4 May 2021 15:33:25 +0000 (UTC) Date: Tue, 4 May 2021 09:33:24 -0600 From: Alex Williamson To: Greg Kurz Subject: Re: remove the nvlink2 pci_vfio subdriver v2 Message-ID: <20210504093324.4f0cafc7@redhat.com> In-Reply-To: <20210504161131.2ed74d7b@bahia.lan> References: <20210326061311.1497642-1-hch@lst.de> <20210504142236.76994047@bahia.lan> <20210504152034.18e41ec3@bahia.lan> <20210504161131.2ed74d7b@bahia.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , kvm@vger.kernel.org, David Airlie , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, qemu-devel@nongnu.org, Paul Mackerras , Jason Gunthorpe , qemu-ppc@nongnu.org, linux-api@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Christoph Hellwig Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, 4 May 2021 16:11:31 +0200 Greg Kurz wrote: > On Tue, 4 May 2021 15:30:15 +0200 > Greg Kroah-Hartman wrote: > > > On Tue, May 04, 2021 at 03:20:34PM +0200, Greg Kurz wrote: > > > On Tue, 4 May 2021 14:59:07 +0200 > > > Greg Kroah-Hartman wrote: > > > > > > > On Tue, May 04, 2021 at 02:22:36PM +0200, Greg Kurz wrote: > > > > > On Fri, 26 Mar 2021 07:13:09 +0100 > > > > > Christoph Hellwig wrote: > > > > > > > > > > > Hi all, > > > > > > > > > > > > the nvlink2 vfio subdriver is a weird beast. It supports a hardware > > > > > > feature without any open source component - what would normally be > > > > > > the normal open source userspace that we require for kernel drivers, > > > > > > although in this particular case user space could of course be a > > > > > > kernel driver in a VM. It also happens to be a complete mess that > > > > > > does not properly bind to PCI IDs, is hacked into the vfio_pci driver > > > > > > and also pulles in over 1000 lines of code always build into powerpc > > > > > > kernels that have Power NV support enabled. Because of all these > > > > > > issues and the lack of breaking userspace when it is removed I think > > > > > > the best idea is to simply kill. > > > > > > > > > > > > Changes since v1: > > > > > > - document the removed subtypes as reserved > > > > > > - add the ACK from Greg > > > > > > > > > > > > Diffstat: > > > > > > arch/powerpc/platforms/powernv/npu-dma.c | 705 --------------------------- > > > > > > b/arch/powerpc/include/asm/opal.h | 3 > > > > > > b/arch/powerpc/include/asm/pci-bridge.h | 1 > > > > > > b/arch/powerpc/include/asm/pci.h | 7 > > > > > > b/arch/powerpc/platforms/powernv/Makefile | 2 > > > > > > b/arch/powerpc/platforms/powernv/opal-call.c | 2 > > > > > > b/arch/powerpc/platforms/powernv/pci-ioda.c | 185 ------- > > > > > > b/arch/powerpc/platforms/powernv/pci.c | 11 > > > > > > b/arch/powerpc/platforms/powernv/pci.h | 17 > > > > > > b/arch/powerpc/platforms/pseries/pci.c | 23 > > > > > > b/drivers/vfio/pci/Kconfig | 6 > > > > > > b/drivers/vfio/pci/Makefile | 1 > > > > > > b/drivers/vfio/pci/vfio_pci.c | 18 > > > > > > b/drivers/vfio/pci/vfio_pci_private.h | 14 > > > > > > b/include/uapi/linux/vfio.h | 38 - > > > > > > > > > > > > > > > Hi Christoph, > > > > > > > > > > FYI, these uapi changes break build of QEMU. > > > > > > > > What uapi changes? > > > > > > > > > > All macros and structure definitions that are being removed > > > from include/uapi/linux/vfio.h by patch 1. > > > > > > > What exactly breaks? > > > > > > > > > > These macros and types are used by the current QEMU code base. > > > Next time the QEMU source tree updates its copy of the kernel > > > headers, the compilation of affected code will fail. > > > > So does QEMU use this api that is being removed, or does it just have > > some odd build artifacts of the uapi things? > > > > These are region subtypes definition and associated capabilities. > QEMU basically gets information on VFIO regions from the kernel > driver and for those regions with a nvlink2 subtype, it tries > to extract some more nvlink2 related info. Urgh, let's put the uapi header back in place with a deprecation notice. Userspace should never have a dependency on the existence of a given region, but clearly will have code to parse the data structure describing that region. I'll post a patch. Thanks, Alex 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 X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3DEFC433ED for ; Tue, 4 May 2021 15:36:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EF58C610FA for ; Tue, 4 May 2021 15:36:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF58C610FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldx5z-0000Iy-Sf for qemu-devel@archiver.kernel.org; Tue, 04 May 2021 11:36:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldx3I-00070M-2Z for qemu-devel@nongnu.org; Tue, 04 May 2021 11:33:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:20551) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldx3F-0003U3-Is for qemu-devel@nongnu.org; Tue, 04 May 2021 11:33:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620142412; 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; bh=HLdHIElXsh+Br5DFDsP1+YjonXAJx6g75JUakM7EhX0=; b=W7/bSoaEHRa2sJJsJaigph9G50tS8iwXHGXNMMpGRAvx5RyjkDyGx4crbI5ceD53cIScDv liNs6G5shs9tAupqA507dUwvV3vC+8jQTPVvUm8++MfP3VMD3NpnQVYFK03osmOE+aAdcm CnRvO6gCkVVktK08sAXf1dCCgXvRbWs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-586-oGqKZBKrOxqxLaLvFcQSeQ-1; Tue, 04 May 2021 11:33:28 -0400 X-MC-Unique: oGqKZBKrOxqxLaLvFcQSeQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C45CF1922039; Tue, 4 May 2021 15:33:26 +0000 (UTC) Received: from redhat.com (ovpn-113-225.phx2.redhat.com [10.3.113.225]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13D425C230; Tue, 4 May 2021 15:33:25 +0000 (UTC) Date: Tue, 4 May 2021 09:33:24 -0600 From: Alex Williamson To: Greg Kurz Subject: Re: remove the nvlink2 pci_vfio subdriver v2 Message-ID: <20210504093324.4f0cafc7@redhat.com> In-Reply-To: <20210504161131.2ed74d7b@bahia.lan> References: <20210326061311.1497642-1-hch@lst.de> <20210504142236.76994047@bahia.lan> <20210504152034.18e41ec3@bahia.lan> <20210504161131.2ed74d7b@bahia.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Received-SPF: pass client-ip=170.10.133.124; envelope-from=alex.williamson@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.697, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , kvm@vger.kernel.org, David Airlie , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, qemu-devel@nongnu.org, Paul Mackerras , Jason Gunthorpe , Michael Ellerman , qemu-ppc@nongnu.org, linux-api@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Christoph Hellwig Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Tue, 4 May 2021 16:11:31 +0200 Greg Kurz wrote: > On Tue, 4 May 2021 15:30:15 +0200 > Greg Kroah-Hartman wrote: > > > On Tue, May 04, 2021 at 03:20:34PM +0200, Greg Kurz wrote: > > > On Tue, 4 May 2021 14:59:07 +0200 > > > Greg Kroah-Hartman wrote: > > > > > > > On Tue, May 04, 2021 at 02:22:36PM +0200, Greg Kurz wrote: > > > > > On Fri, 26 Mar 2021 07:13:09 +0100 > > > > > Christoph Hellwig wrote: > > > > > > > > > > > Hi all, > > > > > > > > > > > > the nvlink2 vfio subdriver is a weird beast. It supports a hardware > > > > > > feature without any open source component - what would normally be > > > > > > the normal open source userspace that we require for kernel drivers, > > > > > > although in this particular case user space could of course be a > > > > > > kernel driver in a VM. It also happens to be a complete mess that > > > > > > does not properly bind to PCI IDs, is hacked into the vfio_pci driver > > > > > > and also pulles in over 1000 lines of code always build into powerpc > > > > > > kernels that have Power NV support enabled. Because of all these > > > > > > issues and the lack of breaking userspace when it is removed I think > > > > > > the best idea is to simply kill. > > > > > > > > > > > > Changes since v1: > > > > > > - document the removed subtypes as reserved > > > > > > - add the ACK from Greg > > > > > > > > > > > > Diffstat: > > > > > > arch/powerpc/platforms/powernv/npu-dma.c | 705 --------------------------- > > > > > > b/arch/powerpc/include/asm/opal.h | 3 > > > > > > b/arch/powerpc/include/asm/pci-bridge.h | 1 > > > > > > b/arch/powerpc/include/asm/pci.h | 7 > > > > > > b/arch/powerpc/platforms/powernv/Makefile | 2 > > > > > > b/arch/powerpc/platforms/powernv/opal-call.c | 2 > > > > > > b/arch/powerpc/platforms/powernv/pci-ioda.c | 185 ------- > > > > > > b/arch/powerpc/platforms/powernv/pci.c | 11 > > > > > > b/arch/powerpc/platforms/powernv/pci.h | 17 > > > > > > b/arch/powerpc/platforms/pseries/pci.c | 23 > > > > > > b/drivers/vfio/pci/Kconfig | 6 > > > > > > b/drivers/vfio/pci/Makefile | 1 > > > > > > b/drivers/vfio/pci/vfio_pci.c | 18 > > > > > > b/drivers/vfio/pci/vfio_pci_private.h | 14 > > > > > > b/include/uapi/linux/vfio.h | 38 - > > > > > > > > > > > > > > > Hi Christoph, > > > > > > > > > > FYI, these uapi changes break build of QEMU. > > > > > > > > What uapi changes? > > > > > > > > > > All macros and structure definitions that are being removed > > > from include/uapi/linux/vfio.h by patch 1. > > > > > > > What exactly breaks? > > > > > > > > > > These macros and types are used by the current QEMU code base. > > > Next time the QEMU source tree updates its copy of the kernel > > > headers, the compilation of affected code will fail. > > > > So does QEMU use this api that is being removed, or does it just have > > some odd build artifacts of the uapi things? > > > > These are region subtypes definition and associated capabilities. > QEMU basically gets information on VFIO regions from the kernel > driver and for those regions with a nvlink2 subtype, it tries > to extract some more nvlink2 related info. Urgh, let's put the uapi header back in place with a deprecation notice. Userspace should never have a dependency on the existence of a given region, but clearly will have code to parse the data structure describing that region. I'll post a patch. Thanks, Alex 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 X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16383C433B4 for ; Tue, 4 May 2021 15:33:34 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A6FDC6115B for ; Tue, 4 May 2021 15:33:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6FDC6115B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 001E189FF7; Tue, 4 May 2021 15:33:32 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1685989FF7 for ; Tue, 4 May 2021 15:33:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620142411; 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; bh=HLdHIElXsh+Br5DFDsP1+YjonXAJx6g75JUakM7EhX0=; b=L7sp14P3Ja5xwEFUVLYLsX2NGR06TKzmsEbTOiAfIdKi3b9dqjYrubdwY1/rjUK/AKVzir 1UvSWWHlp+1etZd72bfdiqpG6AakaFlSVvILIihlklXDXng1taUpjHAqbc1ZGnwiH7iZiv 2Ju3qEZUL2+Bwf6OEpVcyAWjZn1LeCE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-586-oGqKZBKrOxqxLaLvFcQSeQ-1; Tue, 04 May 2021 11:33:28 -0400 X-MC-Unique: oGqKZBKrOxqxLaLvFcQSeQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C45CF1922039; Tue, 4 May 2021 15:33:26 +0000 (UTC) Received: from redhat.com (ovpn-113-225.phx2.redhat.com [10.3.113.225]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13D425C230; Tue, 4 May 2021 15:33:25 +0000 (UTC) Date: Tue, 4 May 2021 09:33:24 -0600 From: Alex Williamson To: Greg Kurz Subject: Re: remove the nvlink2 pci_vfio subdriver v2 Message-ID: <20210504093324.4f0cafc7@redhat.com> In-Reply-To: <20210504161131.2ed74d7b@bahia.lan> References: <20210326061311.1497642-1-hch@lst.de> <20210504142236.76994047@bahia.lan> <20210504152034.18e41ec3@bahia.lan> <20210504161131.2ed74d7b@bahia.lan> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, David Airlie , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, qemu-devel@nongnu.org, Paul Mackerras , Jason Gunthorpe , Michael Ellerman , qemu-ppc@nongnu.org, linux-api@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Christoph Hellwig Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, 4 May 2021 16:11:31 +0200 Greg Kurz wrote: > On Tue, 4 May 2021 15:30:15 +0200 > Greg Kroah-Hartman wrote: > > > On Tue, May 04, 2021 at 03:20:34PM +0200, Greg Kurz wrote: > > > On Tue, 4 May 2021 14:59:07 +0200 > > > Greg Kroah-Hartman wrote: > > > > > > > On Tue, May 04, 2021 at 02:22:36PM +0200, Greg Kurz wrote: > > > > > On Fri, 26 Mar 2021 07:13:09 +0100 > > > > > Christoph Hellwig wrote: > > > > > > > > > > > Hi all, > > > > > > > > > > > > the nvlink2 vfio subdriver is a weird beast. It supports a hardware > > > > > > feature without any open source component - what would normally be > > > > > > the normal open source userspace that we require for kernel drivers, > > > > > > although in this particular case user space could of course be a > > > > > > kernel driver in a VM. It also happens to be a complete mess that > > > > > > does not properly bind to PCI IDs, is hacked into the vfio_pci driver > > > > > > and also pulles in over 1000 lines of code always build into powerpc > > > > > > kernels that have Power NV support enabled. Because of all these > > > > > > issues and the lack of breaking userspace when it is removed I think > > > > > > the best idea is to simply kill. > > > > > > > > > > > > Changes since v1: > > > > > > - document the removed subtypes as reserved > > > > > > - add the ACK from Greg > > > > > > > > > > > > Diffstat: > > > > > > arch/powerpc/platforms/powernv/npu-dma.c | 705 --------------------------- > > > > > > b/arch/powerpc/include/asm/opal.h | 3 > > > > > > b/arch/powerpc/include/asm/pci-bridge.h | 1 > > > > > > b/arch/powerpc/include/asm/pci.h | 7 > > > > > > b/arch/powerpc/platforms/powernv/Makefile | 2 > > > > > > b/arch/powerpc/platforms/powernv/opal-call.c | 2 > > > > > > b/arch/powerpc/platforms/powernv/pci-ioda.c | 185 ------- > > > > > > b/arch/powerpc/platforms/powernv/pci.c | 11 > > > > > > b/arch/powerpc/platforms/powernv/pci.h | 17 > > > > > > b/arch/powerpc/platforms/pseries/pci.c | 23 > > > > > > b/drivers/vfio/pci/Kconfig | 6 > > > > > > b/drivers/vfio/pci/Makefile | 1 > > > > > > b/drivers/vfio/pci/vfio_pci.c | 18 > > > > > > b/drivers/vfio/pci/vfio_pci_private.h | 14 > > > > > > b/include/uapi/linux/vfio.h | 38 - > > > > > > > > > > > > > > > Hi Christoph, > > > > > > > > > > FYI, these uapi changes break build of QEMU. > > > > > > > > What uapi changes? > > > > > > > > > > All macros and structure definitions that are being removed > > > from include/uapi/linux/vfio.h by patch 1. > > > > > > > What exactly breaks? > > > > > > > > > > These macros and types are used by the current QEMU code base. > > > Next time the QEMU source tree updates its copy of the kernel > > > headers, the compilation of affected code will fail. > > > > So does QEMU use this api that is being removed, or does it just have > > some odd build artifacts of the uapi things? > > > > These are region subtypes definition and associated capabilities. > QEMU basically gets information on VFIO regions from the kernel > driver and for those regions with a nvlink2 subtype, it tries > to extract some more nvlink2 related info. Urgh, let's put the uapi header back in place with a deprecation notice. Userspace should never have a dependency on the existence of a given region, but clearly will have code to parse the data structure describing that region. I'll post a patch. Thanks, Alex _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel