Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4557076pxb; Mon, 27 Sep 2021 21:22:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJDuW/LufKdqbqZr3IaQXYTzvFjdDC9XAUmFndAP/4as4FpaMUPtD6aG8XUudzouHBzFkS X-Received: by 2002:a17:906:7804:: with SMTP id u4mr4496998ejm.462.1632802934303; Mon, 27 Sep 2021 21:22:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632802934; cv=none; d=google.com; s=arc-20160816; b=irhCDu/GfZfcg7m1DWMax4B4PPj8HPJ8NgfXR9gupsclT3qmYVeTFQh6MSMwi+oCsw req+CRARDF2M1B7GJEyF/xQ5AcmPDOn8T0ZFQjumpKIPnE09YK5nCAauX6v2GIRrnomi PeeOndLnL7gJBOXqtpw7NqV4ILVO60DbMjEPBeuldZtdmSSPUBrNJj7UHmll7tko7Amw SXok8LyinqRp2lMTL7BAbR3iLeoLucSuqHsuB3TePG4MqriX5+7yc8b65FpT8FCWt96m YwKEEw369r2z4DoKTvClPo0YN8pYwqlyfV1EGfSDgZkWPEzsAizk00eolf6ZKL0Hu4lD qS8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=3V5SFPPHFYTr9I4/DO1kQYURUsX5DMHq+4OHb5v5Dlw=; b=NkCf+ZXP//7p32A/m/6pgUtkTK0gwt3jCR75mv1zW4VudSfcu4pMfF4btoMOGxPw6C ljogXi3eduUPXtu6m0S8/yJxwpJEq1mQugVuyDIGR81eR16j4Tnpcp3QxIfYYeBHnWun DO0ErPkCCFOfMeJdcHUBJ6AZ0/1J++E+Gc1O3cyRHZP1Qh0bZ5WS/2XVbFzA7f889HQz r0VwvDowRIHjfZzYY3lWkcojSX8y8VjWKZm6QI/W0yuSbd6WwzHbS0YV8BWO2uQRQd0b KSk+RKbC0w7aRT7NO7j3F0L1O2DhePPdRpIJS6B4JlUWp/qUjshObzN+xcr9WznV2U1/ ujWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZieJGm77; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z12si5032284ejl.355.2021.09.27.21.21.50; Mon, 27 Sep 2021 21:22:14 -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=@kernel.org header.s=k20201202 header.b=ZieJGm77; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230177AbhI1ETt (ORCPT + 99 others); Tue, 28 Sep 2021 00:19:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:41118 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbhI1ETo (ORCPT ); Tue, 28 Sep 2021 00:19:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A102A60FE3; Tue, 28 Sep 2021 04:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632802685; bh=yBitKBKAgLE4ulPlX3HMhKhMpQBqvjuOFFQmaCDT27E=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=ZieJGm77q2ZvHLTHIlXZGwAVukchy3yejCqF3WMo5XFGGCxGIjbRnWBMwIjGSoDIE 7zBgCCSaROEieFZC9PMVVbFQSpoipWxxMwyX5lJ4LYCwNCkfX5sfi/OFMFkD7oWfB0 uYrF9N8Y+5cJGORwctit8HXbG2ZI8/2CqbDhdcCAErrajFtNsCYjG+m09O1hpTYcns 2dpzZDWH43Qyy8AgPSbCFhitvn32pN0nS5NNZgQgFRs5jV2n24s8uhCmcWz30TKix6 eCYu42ghyYZ2ja47EwCMs8jGg/d1fbsW+zHYazxzpBOYIKkIGDP6nbk2qpVq3ClN7e smWR0a5Wa25Hw== Date: Mon, 27 Sep 2021 21:18:05 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-T480s To: Juergen Gross cc: Oleksandr Andrushchenko , Jan Beulich , Oleksandr Andrushchenko , "boris.ostrovsky@oracle.com" , "julien@xen.org" , "sstabellini@kernel.org" , "xen-devel@lists.xenproject.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v4 1/2] xen-pciback: prepare for the split for stub and PV In-Reply-To: <1cf5fbf3-6453-e258-3940-8b5bb96117b6@suse.com> Message-ID: References: <20210927065822.350973-1-andr2000@gmail.com> <1cf5fbf3-6453-e258-3940-8b5bb96117b6@suse.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Sep 2021, Juergen Gross wrote: > On 27.09.21 09:35, Oleksandr Andrushchenko wrote: > > > > On 27.09.21 10:26, Jan Beulich wrote: > > > On 27.09.2021 08:58, Oleksandr Andrushchenko wrote: > > > > From: Oleksandr Andrushchenko > > > > > > > > Currently PCI backend implements multiple functionalities at a time. > > > > To name a few: > > > > 1. It is used as a database for assignable PCI devices, e.g. xl > > > > pci-assignable-{add|remove|list} manipulates that list. So, > > > > whenever > > > > the toolstack needs to know which PCI devices can be passed through > > > > it reads that from the relevant sysfs entries of the pciback. > > > > 2. It is used to hold the unbound PCI devices list, e.g. when passing > > > > through a PCI device it needs to be unbound from the relevant > > > > device > > > > driver and bound to pciback (strictly speaking it is not required > > > > that the device is bound to pciback, but pciback is again used as a > > > > database of the passed through PCI devices, so we can re-bind the > > > > devices back to their original drivers when guest domain shuts > > > > down) > > > > 3. Device reset for the devices being passed through > > > > 4. Para-virtualised use-cases support > > > > > > > > The para-virtualised part of the driver is not always needed as some > > > > architectures, e.g. Arm or x86 PVH Dom0, are not using backend-frontend > > > > model for PCI device passthrough. For such use-cases make the very > > > > first step in splitting the xen-pciback driver into two parts: Xen > > > > PCI stub and PCI PV backend drivers. > > > > > > > > Signed-off-by: Oleksandr Andrushchenko > > > > > > > > > > > > --- > > > > Changes since v3: > > > > - Move CONFIG_XEN_PCIDEV_STUB to the second patch > > > I'm afraid this wasn't fully done: > > > > > > > --- a/drivers/xen/xen-pciback/Makefile > > > > +++ b/drivers/xen/xen-pciback/Makefile > > > > @@ -1,5 +1,6 @@ > > > > # SPDX-License-Identifier: GPL-2.0 > > > > obj-$(CONFIG_XEN_PCIDEV_BACKEND) += xen-pciback.o > > > > +obj-$(CONFIG_XEN_PCIDEV_STUB) += xen-pciback.o > > > While benign when added here, this addition still doesn't seem to > > > belong here. > > > > My bad. So, it seems without CONFIG_XEN_PCIDEV_STUB the change seems > > > > to be non-functional. With CONFIG_XEN_PCIDEV_STUB we fail to build on 32-bit > > > > architectures... > > > > What would be the preference here? Stefano suggested that we still define > > > > CONFIG_XEN_PCIDEV_STUB, but in disabled state, e.g. we add tristate to it > > > > in the second patch > > > > Another option is just to squash the two patches. > > Squashing would be fine for me. It is fine for me to squash the two patches. But in any case, wouldn't it be better to modify that specific change to: diff --git a/drivers/xen/xen-pciback/Makefile b/drivers/xen/xen-pciback/Makefile index e2cb376444a6..e23c758b85ae 100644 --- a/drivers/xen/xen-pciback/Makefile +++ b/drivers/xen/xen-pciback/Makefile @@ -1,6 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_XEN_PCIDEV_BACKEND) += xen-pciback.o -obj-$(CONFIG_XEN_PCIDEV_STUB) += xen-pciback.o +obj-$(CONFIG_XEN_PCI_STUB) += xen-pciback.o xen-pciback-y := pci_stub.o pciback_ops.o xenbus.o xen-pciback-y += conf_space.o conf_space_header.o \ instead?