xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [RFC 00/19] xe/arm: Add support for non-pci passthrough
@ 2014-06-16 16:17 Julien Grall
  2014-06-16 16:17 ` [RFC 01/19] xen/arm: guest_physmap_remove_page: Print a warning if we fail to unmap the page Julien Grall
                   ` (18 more replies)
  0 siblings, 19 replies; 122+ messages in thread
From: Julien Grall @ 2014-06-16 16:17 UTC (permalink / raw)
  To: xen-devel; +Cc: stefano.stabellini, Julien Grall, tim, ian.campbell

Hello all,

This is the first attempt to add support for device tree passthrough (i.e
non-pci passthrough) on ARM.

The user will have to specify the list of device node to passthrough via
the new options "dtdev" in the xl configuration file. Only device protected
by an IOMMU can be passthrough to the guest. This is because the device
can use DMA and will be use the wrong address space.
I'm thinking to add an option "force" when the user knows that this device
doesn't use DMA. This might be useful to passthrough serial device.

This has been tested on midway by assigning the secondary network to a guest.
As this is an early stage of device passthrough, DOM0 has not been modified.
Therefore to avoid DOM0 using the network card, a properties status="disabled"
has been added in the device tree. I can send my device tree if necessary.

TODO list:
    - Deassign device from dom0 before passthrough
    - Specific device properties in the DT

There is also some TODO in different patches (see the /* TODO: */).

The series is based on stefano's interrupts series [1] and Arianna's memory
mapping series [2]. A working tree can be found here:

git://xenbits.xen.org/people/julieng/xen-unstable.git branch passthrough-v1

Sincerely yours,

[1] http://lists.xen.org/archives/html/xen-devel/2014-06/msg01224.html
[2] http://lists.xenproject.org/archives/html/xen-devel/2014-05/msg03050.html

Julien Grall (19):
  xen/arm: guest_physmap_remove_page: Print a warning if we fail to
    unmap the page
  xen: guestcopy: Provide an helper to copy string from guest
  xen/arm: follow-up to allow DOM0 manage IRQ and MMIO
  xen/arm: route_irq_to_guest: Check validity of the IRQ
  xen/arm: Release IRQ routed to a domain when it's destroying
  xen/arm: Implement hypercall PHYSDEVOP_map_pirq
  xen/dts: Use unsigned int for MMIO and IRQ index
  xen/dts: Provide an helper to get a DT node from a path provided by a
    guest
  xen/dts: Add hypercalls to retrieve device node information
  xen/passthrough: Introduce iommu_buildup
  xen/passthrough: Call arch_iommu_domain_destroy before calling
    iommu_teardown
  xen/passthrough: iommu_deassign_device_dt: By default reassign device
    to nobody
  xen/iommu: arm: Wire iommu DOMCTL for ARM
  xen/passthrough: dt: Add new domctl XEN_DOMCTL_assign_dt_device
  xen/arm: Reserve region in guest memory for device passthrough
  libxl/arm: Introduce DT_IRQ_TYPE_*
  libxl/arm: Rename set_interrupt_ppi to set_interrupt and handle SPIs
  libxl: Add support for non-PCI passthrough
  xl: Add new option dtdev

 docs/man/xl.cfg.pod.5                 |    5 ++
 tools/libxc/xc_domain.c               |   29 ++++++
 tools/libxc/xc_physdev.c              |  129 ++++++++++++++++++++++++++
 tools/libxc/xenctrl.h                 |   40 +++++++++
 tools/libxl/Makefile                  |    2 +-
 tools/libxl/libxl_arch.h              |    4 +-
 tools/libxl/libxl_arm.c               |  142 +++++++++++++++++++++++++++--
 tools/libxl/libxl_create.c            |   11 +++
 tools/libxl/libxl_dom.c               |   22 ++++-
 tools/libxl/libxl_dtdev.c             |  159 +++++++++++++++++++++++++++++++++
 tools/libxl/libxl_internal.h          |   31 +++++++
 tools/libxl/libxl_types.idl           |    5 ++
 tools/libxl/libxl_x86.c               |    4 +-
 tools/libxl/xl_cmdimpl.c              |   21 ++++-
 xen/arch/arm/domain_build.c           |   66 +++++++++-----
 xen/arch/arm/gic.c                    |   12 +++
 xen/arch/arm/irq.c                    |   40 ++++++++-
 xen/arch/arm/p2m.c                    |   14 ++-
 xen/arch/arm/physdev.c                |   93 ++++++++++++++++++-
 xen/arch/arm/vgic.c                   |   15 +++-
 xen/arch/x86/domctl.c                 |    2 +-
 xen/common/Makefile                   |    1 +
 xen/common/device_tree.c              |  141 +++++++++++++++++++++++++++--
 xen/common/domctl.c                   |    4 +
 xen/common/guestcopy.c                |   28 ++++++
 xen/drivers/passthrough/arm/iommu.c   |    6 ++
 xen/drivers/passthrough/arm/smmu.c    |    7 +-
 xen/drivers/passthrough/device_tree.c |   60 +++++++++++--
 xen/drivers/passthrough/iommu.c       |   36 +++++++-
 xen/drivers/passthrough/pci.c         |   12 +--
 xen/include/asm-arm/gic.h             |    5 ++
 xen/include/asm-arm/irq.h             |    6 ++
 xen/include/public/arch-arm.h         |    4 +
 xen/include/public/domctl.h           |   10 +++
 xen/include/public/physdev.h          |   40 +++++++++
 xen/include/xen/device_tree.h         |   27 +++++-
 xen/include/xen/guest_access.h        |    5 ++
 xen/include/xen/iommu.h               |    5 ++
 xen/xsm/flask/flask_op.c              |   29 +-----
 39 files changed, 1166 insertions(+), 106 deletions(-)
 create mode 100644 tools/libxl/libxl_dtdev.c
 create mode 100644 xen/common/guestcopy.c

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 122+ messages in thread

end of thread, other threads:[~2014-08-19 16:06 UTC | newest]

Thread overview: 122+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-16 16:17 [RFC 00/19] xe/arm: Add support for non-pci passthrough Julien Grall
2014-06-16 16:17 ` [RFC 01/19] xen/arm: guest_physmap_remove_page: Print a warning if we fail to unmap the page Julien Grall
2014-06-18 15:03   ` Stefano Stabellini
2014-07-03 10:52   ` Ian Campbell
2014-07-03 11:17     ` Julien Grall
2014-06-16 16:17 ` [RFC 02/19] xen: guestcopy: Provide an helper to copy string from guest Julien Grall
2014-06-17  8:01   ` Jan Beulich
2014-06-17  9:09     ` Julien Grall
2014-06-17  9:17       ` Jan Beulich
2014-06-17  9:23         ` Julien Grall
2014-06-17 22:43           ` Daniel De Graaf
2014-06-18 11:59             ` Jan Beulich
2014-06-18 12:22               ` Julien Grall
2014-06-18 12:49                 ` Jan Beulich
2014-06-18 12:53                   ` Julien Grall
2014-06-18 13:01                     ` Jan Beulich
2014-06-24 14:58                       ` Julien Grall
2014-06-16 16:17 ` [RFC 03/19] xen/arm: follow-up to allow DOM0 manage IRQ and MMIO Julien Grall
2014-06-18 20:21   ` Stefano Stabellini
2014-06-18 20:32     ` Julien Grall
2014-07-03 11:02       ` Ian Campbell
2014-07-03 11:23         ` Julien Grall
2014-07-03 12:12           ` Ian Campbell
2014-06-16 16:17 ` [RFC 04/19] xen/arm: route_irq_to_guest: Check validity of the IRQ Julien Grall
2014-06-18 18:52   ` Stefano Stabellini
2014-06-18 19:03     ` Julien Grall
2014-07-03 11:04   ` Ian Campbell
2014-07-03 11:47     ` Julien Grall
2014-06-16 16:17 ` [RFC 05/19] xen/arm: Release IRQ routed to a domain when it's destroying Julien Grall
2014-06-18 18:08   ` Stefano Stabellini
2014-06-18 18:26     ` Julien Grall
2014-06-18 18:48       ` Stefano Stabellini
2014-06-18 18:54         ` Julien Grall
2014-06-18 19:06           ` Stefano Stabellini
2014-06-18 19:09             ` Julien Grall
2014-06-16 16:17 ` [RFC 06/19] xen/arm: Implement hypercall PHYSDEVOP_map_pirq Julien Grall
2014-06-18 19:24   ` Stefano Stabellini
2014-06-19 11:39     ` Julien Grall
2014-06-19 12:29       ` Stefano Stabellini
2014-07-03 11:27         ` Ian Campbell
2014-07-03 12:02           ` Julien Grall
2014-07-03 12:53             ` Ian Campbell
2014-07-15 13:01               ` Julien Grall
2014-07-15 13:03                 ` Ian Campbell
2014-08-18 19:20                   ` Andrii Tseglytskyi
2014-08-18 21:55                     ` Julien Grall
2014-08-19  9:11                       ` Andrii Tseglytskyi
2014-08-19 14:24                         ` Julien Grall
2014-06-16 16:17 ` [RFC 07/19] xen/dts: Use unsigned int for MMIO and IRQ index Julien Grall
2014-06-18 18:54   ` Stefano Stabellini
2014-06-19 11:42     ` Julien Grall
2014-06-16 16:17 ` [RFC 08/19] xen/dts: Provide an helper to get a DT node from a path provided by a guest Julien Grall
2014-07-03 11:30   ` Ian Campbell
2014-07-03 11:49     ` Julien Grall
2014-07-03 12:13       ` Ian Campbell
2014-07-03 12:22         ` Julien Grall
2014-06-16 16:17 ` [RFC 09/19] xen/dts: Add hypercalls to retrieve device node information Julien Grall
2014-06-18 19:38   ` Stefano Stabellini
2014-06-19 11:58     ` Julien Grall
2014-06-19 12:21       ` Stefano Stabellini
2014-06-19 12:25         ` Julien Grall
2014-07-03 11:40           ` Ian Campbell
2014-06-24  8:46       ` Christoffer Dall
2014-07-03 11:34       ` Ian Campbell
2014-07-03 11:33   ` Ian Campbell
2014-07-03 11:51     ` Julien Grall
2014-07-03 12:13       ` Ian Campbell
2014-06-16 16:17 ` [RFC 10/19] xen/passthrough: Introduce iommu_buildup Julien Grall
2014-07-03 11:45   ` Ian Campbell
2014-07-03 11:55     ` Julien Grall
2014-06-16 16:17 ` [RFC 11/19] xen/passthrough: Call arch_iommu_domain_destroy before calling iommu_teardown Julien Grall
2014-06-17  8:07   ` Jan Beulich
2014-06-17  9:18     ` Julien Grall
2014-06-17  9:29       ` Jan Beulich
2014-06-17 12:38         ` Julien Grall
2014-06-17 13:04           ` Jan Beulich
2014-06-18 12:24             ` Julien Grall
2014-06-18 12:50               ` Jan Beulich
2014-06-16 16:17 ` [RFC 12/19] xen/passthrough: iommu_deassign_device_dt: By default reassign device to nobody Julien Grall
2014-06-18 19:28   ` Stefano Stabellini
2014-07-03 11:48   ` Ian Campbell
2014-07-03 12:07     ` Julien Grall
2014-07-03 12:53       ` Ian Campbell
2014-07-03 13:01         ` Julien Grall
2014-07-03 13:42           ` Ian Campbell
2014-07-03 13:51             ` Julien Grall
2014-07-03 14:04               ` Ian Campbell
2014-07-03 14:09                 ` Julien Grall
2014-06-16 16:18 ` [RFC 13/19] xen/iommu: arm: Wire iommu DOMCTL for ARM Julien Grall
2014-06-17  8:24   ` Jan Beulich
2014-06-17 13:05     ` Julien Grall
2014-06-16 16:18 ` [RFC 14/19] xen/passthrough: dt: Add new domctl XEN_DOMCTL_assign_dt_device Julien Grall
2014-06-17  8:34   ` Jan Beulich
2014-06-17 13:23     ` Julien Grall
2014-06-17 13:30       ` Jan Beulich
2014-06-17 13:48         ` Julien Grall
2014-06-17 13:55           ` Jan Beulich
2014-07-03 11:54             ` Ian Campbell
2014-06-16 16:18 ` [RFC 15/19] xen/arm: Reserve region in guest memory for device passthrough Julien Grall
2014-06-18 15:12   ` Stefano Stabellini
2014-06-18 15:23     ` Julien Grall
2014-06-18 15:26       ` Ian Campbell
2014-06-18 17:48         ` Stefano Stabellini
2014-06-18 17:54           ` Julien Grall
2014-06-18 18:14             ` Stefano Stabellini
2014-06-18 18:33               ` Julien Grall
2014-06-18 18:55                 ` Stefano Stabellini
2014-07-03 11:56                 ` Ian Campbell
2014-06-16 16:18 ` [RFC 16/19] libxl/arm: Introduce DT_IRQ_TYPE_* Julien Grall
2014-07-03 11:56   ` Ian Campbell
2014-06-16 16:18 ` [RFC 17/19] libxl/arm: Rename set_interrupt_ppi to set_interrupt and handle SPIs Julien Grall
2014-07-03 11:58   ` Ian Campbell
2014-07-03 12:04     ` Julien Grall
2014-07-03 14:04       ` Ian Campbell
2014-06-16 16:18 ` [RFC 18/19] libxl: Add support for non-PCI passthrough Julien Grall
2014-06-16 17:19   ` Wei Liu
2014-06-18 12:26     ` Julien Grall
2014-06-16 16:18 ` [RFC 19/19] xl: Add new option dtdev Julien Grall
2014-06-16 17:19   ` Wei Liu
2014-06-18 13:40     ` Julien Grall
2014-06-18 13:43       ` Wei Liu
2014-06-18 13:46         ` Julien Grall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).