[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RESEND PATCH v6] xen-pciback: allow compiling on other archs than x86


  • To: Oleksandr Andrushchenko <andr2000@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
  • From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • Date: Fri, 29 Oct 2021 08:22:22 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rTdmQBOgP+ixEXDhCA/I7hkC9GIUeJRNyJC2+9Pu824=; b=E3drG/qtGQF6lXILloziGFNWrVmpB1Xy/P0Ft/vgT7ygdd13uJwJD8T+MaIHAVe27N21ptdMbS6zP9eusDEC4slNSVsgivnzHzbQrjuREVFnJJY2+3AWVC6YpGIU4VzFhnznKChrZ1aRDSaR4Jz/MkRjjBnpEBJpV8KuoBzPHPhtgSNchsxBTotuF0++J5TpAuHcH43Cq6vZxKyc1Ss6B3I0PXMj6V2XGLPX8/Bbdc7aE9n/ZOVNe2yYoZr1dFGsF4H4RziMbBjVttIU7CBcX9UY4LQZeB4Bt4XRCsryzLgAdCxq5d68x5wMCPX57i8pkzjNWFuaYMHXhQ70kcNTOA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MCACU/KQ2bZYUSXNhn/oGlSg10g8fs0w/QbQimtjzvpyrQxLIF5z/bvXCp1Ula3KmE6162iW8qon/iuZj8riGtezY5+zvu3edx1P0K3RLhh9b4p3jEWtc2sWtkd+Gp5BDrug//r6G70lignDPbzuitkLRR9swIGWwAWJ7xUUSVL8zVyN8FHXsTYn2+BhACwkLW9AC17LOHCvtVM757pojKpuZ53tzB3MnKPiAn54uI6RJqPwwhOSAQt7wracZHjY6TaRCEcwbKVanqScFD8OfIm9z114587Df6DpnK+wBd7owO+TlZb9vwP0UZI3islv3xMjfBDaXEoajpmfj+kdlQ==
  • Authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=oracle.com;
  • Cc: jgross@xxxxxxxx, julien@xxxxxxx, sstabellini@xxxxxxxxxx, jbeulich@xxxxxxxx, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, Anastasiia Lukianenko <anastasiia_lukianenko@xxxxxxxx>
  • Delivery-date: Fri, 29 Oct 2021 12:22:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 10/28/21 10:36 AM, Oleksandr Andrushchenko wrote:
From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>

Xen-pciback driver was designed to be built for x86 only. But it
can also be used by other architectures, e.g. Arm.

Currently PCI backend implements multiple functionalities at a time,
such as:
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.

For that add new configuration options CONFIG_XEN_PCI_STUB and
CONFIG_XEN_PCIDEV_STUB, so the driver can be limited in its
functionality, e.g. no support for para-virtualised scenario.
x86 platform will continue using CONFIG_XEN_PCIDEV_BACKEND for the
fully featured backend driver.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@xxxxxxxx>
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Reviewed-by: Juergen Gross <jgross@xxxxxxxx>



Applied to for-linus-5.16


-boris




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.