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 1733CC43334 for ; Wed, 8 Jun 2022 09:11:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 69DED10E3AE; Wed, 8 Jun 2022 09:11:19 +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 4A6F110E3A4 for ; Wed, 8 Jun 2022 09:11:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654679477; 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=0mce/AbWJS8N2abWnygb+NCcQbErCMoK/WZZka14SPg=; b=ZBpQfhIldPL1wv9SnXyc8D3G5+Mm1hPp3L8M7GbrpAvZjaK3ySEltNzzKmDuuugRdyPfnW Q/j3J11ofQIkN7rf11UWvYo8xDgLmv4gC1WMzj3yuEvm2HXt/stNu6rOToOZ3fNeGxM9Rd k/6ORZsCvwKFtKSHuItjyuD8PmM+0RA= 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-210-ecap_Jd4Puen-NXH4ANqQw-1; Wed, 08 Jun 2022 05:11:14 -0400 X-MC-Unique: ecap_Jd4Puen-NXH4ANqQw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8633685A583; Wed, 8 Jun 2022 09:11:13 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 49AFC40CF8E8; Wed, 8 Jun 2022 09:11:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B2E2B18003AA; Wed, 8 Jun 2022 11:11:11 +0200 (CEST) Date: Wed, 8 Jun 2022 11:11:11 +0200 From: Gerd Hoffmann To: Javier Martinez Canillas Subject: Re: [PATCH 0/2] Improve vfio-pci primary GPU assignment behavior Message-ID: <20220608091111.wx2dbboxg2ntuapw@sirius.home.kraxel.org> References: <165453797543.3592816.6381793341352595461.stgit@omen> <20220608074306.wyav3oerq5crdk6c@sirius.home.kraxel.org> 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.1 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: tzimmermann@suse.de, kvm@vger.kernel.org, airlied@linux.ie, linux-kernel@vger.kernel.org, Alex Williamson , dri-devel@lists.freedesktop.org, Laszlo Ersek Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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}. > > > > Yes, but the cover letter says: > > "Users often employ kernel command line arguments to disable conflicting > drivers or perform unbinding in userspace to avoid this" Thats helpful at times to deal with driver and/or hardware quirks. Example: Years ago drm drivers used to be horrible when it came to unbind, leaving oopses and panics left & right when you tried (luckily it works much better these days). [ leaving this here for completeness, snipping the remaining reply, noting that we are on the same page now ] thanks & take care, Gerd 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15C0BC43334 for ; Wed, 8 Jun 2022 09:45:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235172AbiFHJpI (ORCPT ); Wed, 8 Jun 2022 05:45:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235144AbiFHJoi (ORCPT ); Wed, 8 Jun 2022 05:44:38 -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 000481C471B for ; Wed, 8 Jun 2022 02:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654679478; 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=0mce/AbWJS8N2abWnygb+NCcQbErCMoK/WZZka14SPg=; b=X1f7zdlox/FYcdl8EQ+Cyih0dRzH6of+XatT2yEV0lLK6Ae/VB+1gdAHkgUsWT5+eERmGu Jyjtle57laWX/jB9fi6DPaPUwg3j2S+6LSDntQ3NBQF/eRJLcfB+APho0ezMcGTdGDXcI8 WcArHRBTcevpat+dF1kUioTAFYHKQx4= 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-210-ecap_Jd4Puen-NXH4ANqQw-1; Wed, 08 Jun 2022 05:11:14 -0400 X-MC-Unique: ecap_Jd4Puen-NXH4ANqQw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8633685A583; Wed, 8 Jun 2022 09:11:13 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 49AFC40CF8E8; Wed, 8 Jun 2022 09:11:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B2E2B18003AA; Wed, 8 Jun 2022 11:11:11 +0200 (CEST) Date: Wed, 8 Jun 2022 11:11:11 +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: <20220608091111.wx2dbboxg2ntuapw@sirius.home.kraxel.org> References: <165453797543.3592816.6381793341352595461.stgit@omen> <20220608074306.wyav3oerq5crdk6c@sirius.home.kraxel.org> 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.1 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}. > > > > Yes, but the cover letter says: > > "Users often employ kernel command line arguments to disable conflicting > drivers or perform unbinding in userspace to avoid this" Thats helpful at times to deal with driver and/or hardware quirks. Example: Years ago drm drivers used to be horrible when it came to unbind, leaving oopses and panics left & right when you tried (luckily it works much better these days). [ leaving this here for completeness, snipping the remaining reply, noting that we are on the same page now ] thanks & take care, Gerd