Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2302847iof; Wed, 8 Jun 2022 01:56:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwE8AOL7/yeU48hdoI3TSuatfWDBurdUz1MXG9Y4gHkl0EdNNHL5FXwiVNxKOEJ6fZkQ+L2 X-Received: by 2002:aa7:88c6:0:b0:51c:6e36:fad7 with SMTP id k6-20020aa788c6000000b0051c6e36fad7mr1057082pff.2.1654678607548; Wed, 08 Jun 2022 01:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654678607; cv=none; d=google.com; s=arc-20160816; b=aMBEVXA3Fra0FtWySfinV9FtoSUAwFi2RXN6tAhkM17Z9o/Vv8rdoSFgpEchlFpqPY KjjjWBTRD6ZtoURrHgMZX3HJQiKTqEVqbwmZ2qs34EgahQCsDvd5zHzLp2aKphQgoeaW glEadTAlQ+tnKcZ6dw45FG/kwYe2S4YjUzl7WUsBHZZBQtF6pqXpqxqoTI//J+6aKXqq wV1Mfm8B570sMD40fDyupR79wvd8JcUrkbCXSDSrKjBdY5SyCIOD1R+qCLidjYYVTCiB O8wjVjR1jlEQdkeKGDWSrMIwpr7LPklEGLBXRNqCZjP+BfeGROC1Hp2xlf5XOf9ULrOk Zp9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AH2f+hvLt6o5Ulhr8X9RVVcxLh1vpT+51fFKDTk13/I=; b=pdfb8WbolVdtZWpy3OcWCl9UV6C4ub0/jnGrpw7IaBbOvyU4hSQE1D90+X586Ep4Qr uTqjjDRCsOR5KgjRKg7/0iTXhvL/hEnmfUnHqJrDrcYnP7zB1/iLBVowb/i3wcNUcuiS gve4KMxwlbEcOoY3fv/6zj3qpI0gYqGoXxO1EYXp94UKt2PHxcDkGhJhVmObpQEwr20M MnWSjbxcmQJKIo5maBmV57y470ur3cjchFHhEcbC4n15RbyH8YeOL85JkrutToSXuBNE zMuxNtv48DLD+LqAJVs4WDVe6WImz5Gxk9nPXPJDWTzVFgRzpnKZI4HQeMbu9EnzU97M P7KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bQd96KR3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x35-20020a056a0018a300b004fa8832da6dsi18714131pfh.76.2022.06.08.01.56.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 01:56:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bQd96KR3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4D9BF2342B1; Wed, 8 Jun 2022 01:19:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230106AbiFHIP4 (ORCPT + 99 others); Wed, 8 Jun 2022 04:15:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229808AbiFHIO0 (ORCPT ); Wed, 8 Jun 2022 04:14:26 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A6B4C321620 for ; Wed, 8 Jun 2022 00:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654674193; 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: in-reply-to:in-reply-to:references:references; bh=AH2f+hvLt6o5Ulhr8X9RVVcxLh1vpT+51fFKDTk13/I=; b=bQd96KR3W8BQctJ9hvlIrIwbeQtKe88spiPlAJop/2zPMxpaQtF3tQMuiYBXW8sfd+hDMO FQs630KNn+UIOEdTCzdc13YazOzfJVVEMOMPnRp8GlcDzTuswe6qGYMhps8j089dPspO64 FEXXh18eg3ZXiK2wu+bdDG6cIKu6Atk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-298-1GjcdoIZO0eu-TsxarhuMw-1; Wed, 08 Jun 2022 03:43:09 -0400 X-MC-Unique: 1GjcdoIZO0eu-TsxarhuMw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 00FB1800971; Wed, 8 Jun 2022 07:43:09 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A2D67400F3FF; Wed, 8 Jun 2022 07:43:08 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C8C3E18003AA; Wed, 8 Jun 2022 09:43:06 +0200 (CEST) Date: Wed, 8 Jun 2022 09:43:06 +0200 From: Gerd Hoffmann To: Javier Martinez Canillas Cc: Alex Williamson , maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@linux.ie, daniel@ffwll.ch, kvm@vger.kernel.org, Laszlo Ersek , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] Improve vfio-pci primary GPU assignment behavior Message-ID: <20220608074306.wyav3oerq5crdk6c@sirius.home.kraxel.org> References: <165453797543.3592816.6381793341352595461.stgit@omen> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > But also, this issue isn't something that only affects graphic devices, > right? AFAIU from [1] and [2], the same issue happens if a PCI device > has to be bound to vfio-pci but already was bound to a host driver. Nope. There is a standard procedure to bind and unbind pci drivers via sysfs, using /sys/bus/pci/drivers/$name/{bind,unbind}. > The fact that DRM happens to have some infrastructure to remove devices > that conflict with an aperture is just a coincidence. No. It's a consequence of firmware framebuffers not being linked to the pci device actually backing them, so some other way is needed to find and solve conflicts. > The series [0] mentioned above, adds a sysfb_disable() that disables the > Generic System Framebuffer logic that is what registers the framebuffer > devices that are bound to these generic video drivers. On disable, the > devices registered by sysfb are also unregistered. As Alex already mentioned this might not have the desired effect on systems with multiple GPUs (I think even without considering vfio-pci). > That is, do you want to remove the {vesa,efi,simple}fb and simpledrm > drivers or is there a need to also remove real fbdev and DRM drivers? Boot framebuffers are the problem because they are neither visible nor manageable in /sys/bus/pci. For real fbdev/drm drivers the standard pci unbind can be used. take care, Gerd