Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3789272pxy; Tue, 4 May 2021 09:55:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwcMClH47oz/BRTym+DgFk80sq/8n3bWT3v+ysDLhXFG7CbP6r++94uCAycMFqsLIoUpl1 X-Received: by 2002:a17:906:270a:: with SMTP id z10mr22246080ejc.204.1620147328434; Tue, 04 May 2021 09:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620147328; cv=none; d=google.com; s=arc-20160816; b=fxsjZSZJFWQSLB8m/DenDKC2m3ebRXgjQ+SZB5ha6y99Oxf6yGUMRbaRNZh7SUSG9X WG4Klau1QVQ7ysgionYJgdWMu5vPXloGPDH8pYT6rMWXr08Kcp9Si0k7xCsAGDGBe9tH aF2W2hRZZ1Y6iyU4nS+GkcCP2Btu5vYi7fPyFQ+Iwl+m2r0ZtBNQdcNyyG2WF8iHTjWQ UyH0dxx8Butt5m4+IKwQF5vuzTTi9L3aAE9BfQaMgrFCLJ91cvUf2rt2BX6bMp7Mv+jo FrnARSuAC6zcm4zCZWEvB3VazpXHPwsWZCs26xXpQtPDjZul7nrIGPtjwXC/GGUUzIDj z9lA== 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 :dkim-signature; bh=HLdHIElXsh+Br5DFDsP1+YjonXAJx6g75JUakM7EhX0=; b=OzB4pgqFblCkCUcNQo4gdKzf7dmS523xuIE23sjeHDgI0Pk8sMZY6thfuYZRFdwxRn I914uCoRGx82WVLrWBd8M+fVup5mq3qP2cA1kp2StPWyS4cNvjXEb8NamnmKxqGUTV6l 7D7cnzoM0kjU6ol8d2CF2hSNHbZ39NtoDmkF+uk6cyJ2tGaQpbm2S0J4QUkO1yYskAnr HFCAtJlnFzAlzqgMUlJiTPCWdlOeFSs4qzfrXy+OwDHYHs9Nc/mo29hQjkLH1wUjYrao 6K5eyitAI77WD1TERWXK554NbhEFwOHiQhWrdhlQzPoHh1LLCeNONXP9pQIV7F4XZRHV Ef/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="W7/bSoaE"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oq21si2865598ejb.276.2021.05.04.09.55.04; Tue, 04 May 2021 09:55:28 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="W7/bSoaE"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231182AbhEDPe3 (ORCPT + 99 others); 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