Skip to content

kvm tools: pci: add PCI support for ARM targets

Will Deacon kvm 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17kvm tools: pci: register virtio pba structure as mmio region with kvmtools/kvm/virtio/pci.c+2 -20 replies
2/17kvm tools: pci: remove BAR 3 hangover from virtio pci msix codetools/kvm/virtio/pci.c+3 -70 replies
3/17kvm tools: net: don't propagate error codes from tx/rx operationstools/kvm/net/uip/core.c tools/kvm/virtio/net.c+17 -50 replies
4/17kvm tools: net: allow a mixture of pci and mmio virtio devicestools/kvm/virtio/net.c+17 -50 replies
5/17kvm tools: pci: register 24-bit configuration space below MMIO regiontools/kvm/arm/include/arm-common/kvm-arch.h tools/kvm/include/kvm/pci.h tools/kvm/pci.c +2 more+39 -100 replies
6/17kvm tools: pci: ensure BARs are naturally alignedtools/kvm/pci.c+5 -30 replies
7/17kvm tools: pci: add MMIO interface to virtio-pci devicestools/kvm/include/kvm/virtio-pci.h tools/kvm/virtio/pci.c+78 -370 replies
8/17kvm tools: irq: remove pin parameter from irq__register_devicetools/kvm/arm/irq.c tools/kvm/hw/pci-shmem.c tools/kvm/hw/vesa.c +5 more+15 -240 replies
9/17kvm tools: irq: replace the x86 irq rbtree with the PCI device treetools/kvm/include/kvm/irq.h tools/kvm/x86/irq.c tools/kvm/x86/mptable.c+15 -1430 replies
10/17kvm tools: irq: remove remaining parameters to irq__register_devicetools/kvm/arm/irq.c tools/kvm/hw/pci-shmem.c tools/kvm/hw/vesa.c +5 more+12 -330 replies
11/17kvm tools: irq: rename irq__register_device to irq__alloc_linetools/kvm/arm/irq.c tools/kvm/hw/pci-shmem.c tools/kvm/hw/vesa.c +6 more+10 -100 replies
12/17kvm tools: irq: make irq__alloc_line generictools/kvm/Makefile tools/kvm/arm/gic.c tools/kvm/arm/include/arm-common/kvm-arch.h +8 more+22 -720 replies
13/17kvm tools: irq: move irq line allocation into device registrationtools/kvm/devices.c tools/kvm/hw/pci-shmem.c tools/kvm/hw/vesa.c +5 more+39 -90 replies
14/17kvm tools: ARM: route guest PCI accesses to the emulation layertools/kvm/arm/include/arm-common/kvm-arch.h tools/kvm/arm/kvm-cpu.c tools/kvm/arm/kvm.c+10 -50 replies
15/17kvm tools: ARM: generate an fdt node for our PCI emulationtools/kvm/Makefile tools/kvm/arm/fdt.c tools/kvm/arm/include/arm-common/pci.h +2 more+173 -10 replies
16/17kvm tools: powerpc: make use of common of_pci.h header definitionstools/kvm/powerpc/spapr_pci.c+48 -660 replies
17/17kvm tools: ARM: allow default virtio transport to be passed on cmdlinetools/kvm/arm/include/arm-common/kvm-arch.h tools/kvm/arm/include/arm-common/kvm-config-arch.h tools/kvm/powerpc/include/kvm/kvm-arch.h +7 more+18 -130 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/17] kvm tools: pci: add PCI support for ARM targets

Hello,

This patch series adds PCI support for ARM targets to lkvm. Note that there are corresponding kernel patches in order for Linux to use the virtual PCI host controller, so the interface is still subject to change.

The main parts of this series are:

- Fixes to the MSI-X bar and virtio-net device initialisation

- An effective rewrite of the IRQ allocation code, so that core code handles the IRQ allocation for a device, based upon its bus

- Introduction of a PCI Memory Space, which is actually a shim around the ioport emulation and simply redirects guest access there

- Generation of a device-tree node describing the PCI emulation, using the properties laid out in ePAPR and associated specs

Tested on x86_64, AArch32 and AArch64. Build-tested only on PPC64.

All feedback welcome!

Will

Will Deacon (17):
kvm tools: pci: register virtio pba structure as mmio region with kvm kvm tools: pci: remove BAR 3 hangover from virtio pci msix code kvm tools: net: don't propagate error codes from tx/rx operations kvm tools: net: allow a mixture of pci and mmio virtio devices kvm tools: pci: register 24-bit configuration space below MMIO region kvm tools: pci: ensure BARs are naturally aligned
kvm tools: pci: add MMIO interface to virtio-pci devices kvm tools: irq: remove pin parameter from irq__register_device kvm tools: irq: replace the x86 irq rbtree with the PCI device tree kvm tools: irq: remove remaining parameters to irq__register_device kvm tools: irq: rename irq__register_device to irq__alloc_line kvm tools: irq: make irq__alloc_line generic
kvm tools: irq: move irq line allocation into device registration kvm tools: ARM: route guest PCI accesses to the emulation layer kvm tools: ARM: generate an fdt node for our PCI emulation kvm tools: powerpc: make use of common of_pci.h header definitions kvm tools: ARM: allow default virtio transport to be passed on cmdline

 tools/kvm/Makefile                                 |   3 +-
 tools/kvm/arm/fdt.c                                |   4 +
 tools/kvm/arm/gic.c                                |  12 --
 tools/kvm/arm/include/arm-common/kvm-arch.h        |  20 +++-
 tools/kvm/arm/include/arm-common/kvm-config-arch.h |  12 +-
 tools/kvm/arm/include/arm-common/pci.h             |   6 +
 tools/kvm/arm/ioport.c                             |   5 +-
 tools/kvm/arm/irq.c                                |   8 --
 tools/kvm/arm/kvm-cpu.c                            |   4 +-
 tools/kvm/arm/kvm.c                                |   5 +
 tools/kvm/arm/pci.c                                | 118 ++++++++++++++++++++
 tools/kvm/devices.c                                |  13 +++
 tools/kvm/hw/pci-shmem.c                           |   9 --
 tools/kvm/hw/vesa.c                                |   7 --
 tools/kvm/include/kvm/irq.h                        |  16 +--
 tools/kvm/include/kvm/of_pci.h                     |  44 ++++++++
 tools/kvm/include/kvm/pci.h                        |   3 +
 tools/kvm/include/kvm/virtio-mmio.h                |   1 +
 tools/kvm/include/kvm/virtio-pci.h                 |   4 +-
 tools/kvm/irq.c                                    |   9 ++
 tools/kvm/net/uip/core.c                           |   2 +-
 tools/kvm/pci.c                                    |  54 +++++++--
 tools/kvm/powerpc/include/kvm/kvm-arch.h           |   9 +-
 tools/kvm/powerpc/irq.c                            |  19 ----
 tools/kvm/powerpc/spapr_pci.c                      | 114 ++++++++-----------
 tools/kvm/powerpc/xics.c                           |  28 +----
 tools/kvm/virtio/9p.c                              |   2 +-
 tools/kvm/virtio/balloon.c                         |   2 +-
 tools/kvm/virtio/blk.c                             |   2 +-
 tools/kvm/virtio/console.c                         |   2 +-
 tools/kvm/virtio/mmio.c                            |  14 ++-
 tools/kvm/virtio/net.c                             |  42 +++++--
 tools/kvm/virtio/pci.c                             | 120 ++++++++++++--------
 tools/kvm/virtio/rng.c                             |   2 +-
 tools/kvm/virtio/scsi.c                            |   2 +-
 tools/kvm/x86/include/kvm/kvm-arch.h               |   9 +-
 tools/kvm/x86/irq.c                                | 121 ---------------------
 tools/kvm/x86/mptable.c                            |  35 +++---
 38 files changed, 480 insertions(+), 402 deletions(-)
 create mode 100644 tools/kvm/arm/include/arm-common/pci.h
 create mode 100644 tools/kvm/arm/pci.c
 create mode 100644 tools/kvm/include/kvm/of_pci.h
 create mode 100644 tools/kvm/irq.c
Signature · 1 line
1.8.2.2