Skip to content

kvm tools SPAPR PPC64 support

Matt Evans kvm kvm-ppc 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 8 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 8 patches the cover letter announces are in this archive.

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/8] kvm tools SPAPR PPC64 support

Hi,

This set of patches builds upon the prep-work of the previous set and adds support to kvmtool for PPC64 SPAPR-based guests, i.e. an environment akin to an LPAR on IBM's pSeries machines.

This support is not yet fully-featured but, in a basic state, works well. The guests have a functional but no-frills experience, with:

- SMP guests
- HV console (or RTAS console, for udbg)
- Net, block over virtio-pci
- No PAPR VIO/VSCSI/VNET yet
- No fancyfeatures like migration yet

Though minimal, guests are quite stable.

There are obvious areas for future improvement:

- Non-VRMA RMAs aren't supported, meaning POWER7-only for the moment
- Other CPU-specific details are currently assumed (e.g. available page sizes); work is required to determine host capabilities and pass these up.
- Support SLOF
- Maybe support VIO
- Some hypercalls used by partition firmware/SLOF (not the kernel) are unimplemented
- Fancy PCI (e.g. passthrough)
- Currently KVM_NR_CPUs is arbitrarily fixed at 255, and could be higher. Guests with this many CPUs boot fine.

Some PPC KVM kernel-side features aren't implemented yet and have required kvmtool workarounds; mmio coalescing isn't supported and lack of ioeventfds requires virtio to gracefully fall back when it fails to register one.

Cheers,

Matt

Matt Evans (8):
kvm tools: Add initial SPAPR PPC64 architecture support kvm tools: Generate SPAPR PPC64 guest device tree kvm tools: Add SPAPR PPC64 hcall & rtascall structure kvm tools: Add SPAPR PPC64 HV console
kvm tools: Add PPC64 XICS interrupt controller support kvm tools: Add PPC64 PCI Host Bridge
kvm tools: Add PPC64 kvm_cpu__emulate_io()
kvm tools: Make virtio-pci's ioeventfd__add_event() fall back
gracefully if ioeventfds unavailable

 tools/kvm/Makefile                           |   16 +
 tools/kvm/include/kvm/ioeventfd.h            |    3 +-
 tools/kvm/ioeventfd.c                        |   12 +-
 tools/kvm/kvm.c                              |    3 +
 tools/kvm/powerpc/include/kvm/barrier.h      |    6 +
 tools/kvm/powerpc/include/kvm/kvm-arch.h     |   74 ++++
 tools/kvm/powerpc/include/kvm/kvm-cpu-arch.h |   48 +++
 tools/kvm/powerpc/ioport.c                   |   18 +
 tools/kvm/powerpc/irq.c                      |   62 +++
 tools/kvm/powerpc/kvm-cpu.c                  |  281 ++++++++++++++
 tools/kvm/powerpc/kvm.c                      |  466 +++++++++++++++++++++++
 tools/kvm/powerpc/spapr.h                    |  316 +++++++++++++++
 tools/kvm/powerpc/spapr_hcall.c              |  151 ++++++++
 tools/kvm/powerpc/spapr_hvcons.c             |  101 +++++
 tools/kvm/powerpc/spapr_hvcons.h             |   19 +
 tools/kvm/powerpc/spapr_pci.c                |  429 +++++++++++++++++++++
 tools/kvm/powerpc/spapr_pci.h                |   38 ++
 tools/kvm/powerpc/spapr_rtas.c               |  226 +++++++++++
 tools/kvm/powerpc/xics.c                     |  529 ++++++++++++++++++++++++++
 tools/kvm/powerpc/xics.h                     |   23 ++
 tools/kvm/virtio/pci.c                       |   11 +-
 21 files changed, 2827 insertions(+), 5 deletions(-)
 create mode 100644 tools/kvm/powerpc/include/kvm/barrier.h
 create mode 100644 tools/kvm/powerpc/include/kvm/kvm-arch.h
 create mode 100644 tools/kvm/powerpc/include/kvm/kvm-cpu-arch.h
 create mode 100644 tools/kvm/powerpc/ioport.c
 create mode 100644 tools/kvm/powerpc/irq.c
 create mode 100644 tools/kvm/powerpc/kvm-cpu.c
 create mode 100644 tools/kvm/powerpc/kvm.c
 create mode 100644 tools/kvm/powerpc/spapr.h
 create mode 100644 tools/kvm/powerpc/spapr_hcall.c
 create mode 100644 tools/kvm/powerpc/spapr_hvcons.c
 create mode 100644 tools/kvm/powerpc/spapr_hvcons.h
 create mode 100644 tools/kvm/powerpc/spapr_pci.c
 create mode 100644 tools/kvm/powerpc/spapr_pci.h
 create mode 100644 tools/kvm/powerpc/spapr_rtas.c
 create mode 100644 tools/kvm/powerpc/xics.c
 create mode 100644 tools/kvm/powerpc/xics.h