All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Rahul Singh <rahul.singh@arm.com>
Cc: xen-devel@lists.xenproject.org, bertrand.marquis@arm.com,
	Andre.Przywara@arm.com, "Jan Beulich" <jbeulich@suse.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Ian Jackson" <iwj@xenproject.org>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Paul Durrant" <paul@xen.org>,
	"Daniel De Graaf" <dgdegra@tycho.nsa.gov>,
	"Daniel P. Smith" <dpsmith@apertussolutions.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Juergen Gross" <jgross@suse.com>,
	"Anthony PERARD" <anthony.perard@citrix.com>
Subject: Re: [PATCH v3 00/17] PCI devices passthrough on Arm
Date: Thu, 30 Sep 2021 18:31:32 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.21.2109301829580.3209@sstabellini-ThinkPad-T480s> (raw)
In-Reply-To: <cover.1632847120.git.rahul.singh@arm.com>

To make the series a bit easier to manage, given that they were fully
acked, I committed patches #1, #2, #6, #7, #8 from the series.


On Tue, 28 Sep 2021, Rahul Singh wrote:
> Hello All,
> 
> The purpose of this patch series is to add PCI passthrough support to Xen on
> Arm. PCI passthrough support on ARM is the collaboration work between EPAM and
> ARM. ARM submitted the partial RFC [1][2] last year to get early feedback. We
> tried to fix all the comments and added more features to this patch series.
> 
> Working POC with all the features can be found at [3]. Working POC is tested
> on x86 so that there will be no regression on x86. Design presentation can be
> found at [4]
> 
> PCI passthrough support is divided into different patches. This patch series
> includes following features: 
> 
> Preparatory work to implement the PCI passthrough support for the ARM:
> - Refactor MSI code.
> - Fixed compilation error when HAS_PCI enabled for ARM.
> 
> Discovering PCI Host Bridge in XEN:
> - PCI init to initialize the PCI driver.
> - PCI host bridge discovery in XEN and map the PCI ECAM configuration space to
>   the XEN memory.
> - PCI access functions.
> 
> Discovering PCI devices:
> - To support the PCI passthrough, XEN should be aware of the PCI
>   devices.
> - Hardware domain is in charge of doing the PCI enumeration and will discover
>   the PCI devices and then communicate to the XEN via a hypercall to add the
>   PCI devices in XEN.
> 
> Enable the existing x86 virtual PCI support for ARM:
> - Add VPCI trap handler for each of the PCI device added for config space
>   access.
> - Register the trap handler in XEN for each of the host bridge PCI ECAM config
>   space access.
> 
> Emulated PCI device tree node in libxl:
> - Create a virtual PCI device tree node in libxl to enable the guest OS to
>   discover the virtual PCI during guest boot.
> 
> This patch series does not inlcude the following features. Following features
> will be send for review in the next version of the patch series once initial
> patch series merged.
> 
> - VPCI support for DOMU guests (Non-identity mappings guest view of the BARs)
> - Virtual bus topology implementation
> - IOMMU related changes (generic, SMMUv2, SMMUv3)
> - MSI support for DOMU guests.
> - Virual ITS support for DOMU guests
> 
> [1] https://lists.xenproject.org/archives/html/xen-devel/2020-07/msg01184.html
> [2] https://lists.xenproject.org/archives/html/xen-devel/2020-07/threads.html#01184
> [3] https://gitlab.com/rahsingh/xen-integration/-/commits/pci-passthrough-upstream-all
> [4] https://static.sched.com/hosted_files/xen2021/e4/PCI_Device_Passthrough_On_Arm.pdf
> 
> Oleksandr Andrushchenko (1):
>   xen/arm: Add support for Xilinx ZynqMP PCI host controller
> 
> Rahul Singh (16):
>   xen/pci: Refactor MSI code that implements MSI functionality within
>     XEN
>   xen/arm: pci: Add stubs to allow selecting HAS_PCI
>   xen/arm: solve compilation error on ARM with ACPI && HAS_PCI
>   xen/arm: xc_domain_ioport_permission(..) not supported on ARM.
>   xen/arm: Add PHYSDEVOP_pci_device_* support for ARM
>   xen/device-tree: Add dt_property_read_variable_u32_array helper
>   xen/device-tree: Add dt_property_read_u32_array helper
>   xen/device-tree: Add dt_get_pci_domain_nr helper
>   xen/arm: Add support for PCI init to initialize the PCI driver.
>   xen/arm: Add cmdline boot option "pci-passthrough = <boolean>"
>   xen/arm: PCI host bridge discovery within XEN on ARM
>   xen/arm: Implement pci access functions
>   xen/arm: Enable the existing x86 virtual PCI support for ARM.
>   xen/arm: Transitional change to build HAS_VPCI on ARM.
>   arm/libxl: Emulated PCI device tree node in libxl
>   xen/arm: Add linux,pci-domain property for hwdom if not available.
> 
>  docs/misc/xen-command-line.pandoc   |   7 +
>  tools/include/libxl.h               |   6 +
>  tools/libs/ctrl/xc_domain.c         |   9 +
>  tools/libs/light/libxl_arm.c        | 105 ++++++++++
>  tools/libs/light/libxl_create.c     |   3 +
>  tools/libs/light/libxl_types.idl    |   1 +
>  tools/xl/xl_parse.c                 |   2 +
>  xen/arch/arm/Makefile               |   2 +
>  xen/arch/arm/domain.c               |   8 +-
>  xen/arch/arm/domain_build.c         |  19 ++
>  xen/arch/arm/pci/Makefile           |   6 +
>  xen/arch/arm/pci/ecam.c             |  61 ++++++
>  xen/arch/arm/pci/pci-access.c       | 140 ++++++++++++++
>  xen/arch/arm/pci/pci-host-common.c  | 287 ++++++++++++++++++++++++++++
>  xen/arch/arm/pci/pci-host-generic.c |  46 +++++
>  xen/arch/arm/pci/pci-host-zynqmp.c  |  63 ++++++
>  xen/arch/arm/pci/pci.c              |  98 ++++++++++
>  xen/arch/arm/physdev.c              |   5 +-
>  xen/arch/arm/vpci.c                 | 102 ++++++++++
>  xen/arch/arm/vpci.h                 |  36 ++++
>  xen/arch/x86/Kconfig                |   1 +
>  xen/arch/x86/domain.c               |   6 +
>  xen/arch/x86/physdev.c              |  50 +----
>  xen/arch/x86/x86_64/physdev.c       |   4 +-
>  xen/common/Makefile                 |   1 +
>  xen/common/device_tree.c            |  73 +++++++
>  xen/common/domain.c                 |   2 +-
>  xen/common/physdev.c                |  87 +++++++++
>  xen/drivers/passthrough/Makefile    |   1 +
>  xen/drivers/passthrough/arm/iommu.c |   9 +
>  xen/drivers/passthrough/msi.c       |  83 ++++++++
>  xen/drivers/passthrough/pci.c       |  69 +++----
>  xen/drivers/pci/Kconfig             |   4 +
>  xen/drivers/vpci/Makefile           |   3 +-
>  xen/drivers/vpci/header.c           |   2 +
>  xen/include/asm-arm/device.h        |   1 +
>  xen/include/asm-arm/domain.h        |   8 +-
>  xen/include/asm-arm/hypercall.h     |   2 -
>  xen/include/asm-arm/numa.h          |   5 +
>  xen/include/asm-arm/pci.h           | 116 ++++++++++-
>  xen/include/asm-x86/hypercall.h     |   9 +-
>  xen/include/asm-x86/pci.h           |  10 +-
>  xen/include/public/arch-arm.h       |  17 ++
>  xen/include/public/domctl.h         |   4 +-
>  xen/include/xen/device_tree.h       |  73 +++++++
>  xen/include/xen/hypercall.h         |   8 +
>  xen/include/xen/msi.h               |  43 +++++
>  xen/include/xen/pci.h               |   5 +-
>  xen/xsm/flask/hooks.c               |   8 +-
>  49 files changed, 1593 insertions(+), 117 deletions(-)
>  create mode 100644 xen/arch/arm/pci/Makefile
>  create mode 100644 xen/arch/arm/pci/ecam.c
>  create mode 100644 xen/arch/arm/pci/pci-access.c
>  create mode 100644 xen/arch/arm/pci/pci-host-common.c
>  create mode 100644 xen/arch/arm/pci/pci-host-generic.c
>  create mode 100644 xen/arch/arm/pci/pci-host-zynqmp.c
>  create mode 100644 xen/arch/arm/pci/pci.c
>  create mode 100644 xen/arch/arm/vpci.c
>  create mode 100644 xen/arch/arm/vpci.h
>  create mode 100644 xen/common/physdev.c
>  create mode 100644 xen/drivers/passthrough/msi.c
>  create mode 100644 xen/include/xen/msi.h
> 
> -- 
> 2.17.1
> 


      parent reply	other threads:[~2021-10-01  1:32 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 18:18 [PATCH v3 00/17] PCI devices passthrough on Arm Rahul Singh
2021-09-28 18:18 ` [PATCH v3 01/17] xen/pci: Refactor MSI code that implements MSI functionality within XEN Rahul Singh
2021-09-29  7:28   ` Bertrand Marquis
2021-09-29 16:56   ` Stefano Stabellini
2021-09-30 14:22     ` Jan Beulich
2021-09-28 18:18 ` [PATCH v3 02/17] xen/arm: pci: Add stubs to allow selecting HAS_PCI Rahul Singh
2021-09-29  7:28   ` Bertrand Marquis
2021-09-28 18:18 ` [PATCH v3 03/17] xen/arm: solve compilation error on ARM with ACPI && HAS_PCI Rahul Singh
2021-09-29  7:29   ` Bertrand Marquis
2021-09-29  8:24   ` Jan Beulich
2021-09-29  9:29     ` Rahul Singh
2021-09-28 18:18 ` [PATCH v3 04/17] xen/arm: xc_domain_ioport_permission(..) not supported on ARM Rahul Singh
2021-09-29  7:30   ` Bertrand Marquis
2021-09-28 18:18 ` [PATCH v3 05/17] xen/arm: Add PHYSDEVOP_pci_device_* support for ARM Rahul Singh
2021-09-29  6:05   ` Stefano Stabellini
2021-09-29  7:34   ` Bertrand Marquis
2021-09-30 14:51   ` Jan Beulich
2021-10-01 16:19     ` Rahul Singh
2021-09-28 18:18 ` [PATCH v3 06/17] xen/device-tree: Add dt_property_read_variable_u32_array helper Rahul Singh
2021-09-29  6:06   ` Stefano Stabellini
2021-09-29  7:34   ` Bertrand Marquis
2021-09-28 18:18 ` [PATCH v3 07/17] xen/device-tree: Add dt_property_read_u32_array helper Rahul Singh
2021-09-29  6:07   ` Stefano Stabellini
2021-09-29  7:35   ` Bertrand Marquis
2021-09-28 18:18 ` [PATCH v3 08/17] xen/device-tree: Add dt_get_pci_domain_nr helper Rahul Singh
2021-09-29  6:09   ` Stefano Stabellini
2021-09-29  7:35   ` Bertrand Marquis
2021-09-28 18:18 ` [PATCH v3 09/17] xen/arm: Add support for PCI init to initialize the PCI driver Rahul Singh
2021-09-29  6:10   ` Stefano Stabellini
2021-09-29  7:35   ` Bertrand Marquis
2021-09-28 18:18 ` [PATCH v3 10/17] xen/arm: Add cmdline boot option "pci-passthrough = <boolean>" Rahul Singh
2021-09-29  6:11   ` Stefano Stabellini
2021-09-29  7:36   ` Bertrand Marquis
2021-09-30 15:00   ` Jan Beulich
2021-10-01 10:55     ` Rahul Singh
2021-09-28 18:18 ` [PATCH v3 11/17] xen/arm: PCI host bridge discovery within XEN on ARM Rahul Singh
2021-09-29  8:31   ` Jan Beulich
2021-09-29  8:59     ` Rahul Singh
2021-09-29 16:40   ` Stefano Stabellini
2021-09-30  7:47     ` Jan Beulich
2021-09-28 18:18 ` [PATCH v3 12/17] xen/arm: Add support for Xilinx ZynqMP PCI host controller Rahul Singh
2021-09-29 13:38   ` Bertrand Marquis
2021-09-29 14:17     ` Oleksandr Andrushchenko
2021-09-29 16:41   ` Stefano Stabellini
2021-09-30  7:48     ` Jan Beulich
2021-09-30 10:42       ` Rahul Singh
2021-09-28 18:18 ` [PATCH v3 13/17] xen/arm: Implement pci access functions Rahul Singh
2021-09-29 13:35   ` Bertrand Marquis
2021-09-29 16:42   ` Stefano Stabellini
2021-09-28 18:18 ` [PATCH v3 14/17] xen/arm: Enable the existing x86 virtual PCI support for ARM Rahul Singh
2021-09-29 16:45   ` Stefano Stabellini
2021-09-30 15:19   ` Jan Beulich
2021-10-01 11:44     ` Rahul Singh
2021-10-01 12:40       ` Jan Beulich
2021-09-28 18:18 ` [PATCH v3 15/17] xen/arm: Transitional change to build HAS_VPCI on ARM Rahul Singh
2021-09-29 13:39   ` Bertrand Marquis
2021-09-29 16:46   ` Stefano Stabellini
2021-09-28 18:18 ` [PATCH v3 16/17] arm/libxl: Emulated PCI device tree node in libxl Rahul Singh
2021-09-29 13:42   ` Bertrand Marquis
2021-09-29 16:47   ` Stefano Stabellini
2021-09-28 18:18 ` [PATCH v3 17/17] xen/arm: Add linux,pci-domain property for hwdom if not available Rahul Singh
2021-09-29 13:42   ` Bertrand Marquis
2021-09-29 16:48   ` Stefano Stabellini
2021-10-01  1:31 ` Stefano Stabellini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2109301829580.3209@sstabellini-ThinkPad-T480s \
    --to=sstabellini@kernel.org \
    --cc=Andre.Przywara@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=dpsmith@apertussolutions.com \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=paul@xen.org \
    --cc=rahul.singh@arm.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.