[PATCH V4 0/7] Add initial SPAPR PPC64 architecture support

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

 



This series adds support for a PPC64 platform, SPAPR, on top of the previous
more general PPC64 CPU support.  This platform is paravirtualised, with most
of the MMU hypercalls being dealt with in the kernel.  Userland needs to
describe the environment to the machine with a device tree, cope with some
hypercalls (and RTAS calls) for hvconsole, PCI config and IRQs, and emulate
the interrupt controller (XICS) and PCI Host Bridge of the SPAPR-esque
machine.

With this series, normal pSeries kernels boot fine (including RH kernels that
include virtio support out of the box).  There is no support for PPC32 or
'bare metal' PPC64 guests as yet.

Processor state is set up as a guest kernel would expect (both primary and
secondaries), and SMP is fully supported.

The kernels are loaded as flat binaries and booted directly.  The intention
is to later support loading firmware such as SLOF.

Some of the code within is borrowed/based upon code in QEMU, particularly
the XICS emulation, device tree construction and PCI setup.

-- Changes since V3:
   - Gained another patch to provide PPC KVM-PR support (widens userbase :p )
     This allocates a page table, sets up a few more regs etc.  Also,
     removes restriction that mandates use of hugepages.
     Requires KVM-PR to implement H_BULK_REMOVE (separate patch)
   - Cleaned up FDT generation to detect host CPU & generate based
     on its properties; now supports PPC970 as well as POWER7
   - Removed redefinition of hypercall #defines, using <asm/hvcall.h> instead
   - More sensible MMIO layering; CPU passes MMIO to PHB, PHB then decides
     which PCI window is accessed.
   - Die if kernel-handled hypercalls ever get to userland
   - Build in libfdt as sugggested -- it's small and present in our sourcetree,
     and removes external dependency on 64bit libfdt (which isn't in some
     distros).
   - Spit & polish

Thanks to David & Alex for the PPC-related reviews!

Matt Evans (7):
  kvm tools: PPC64, add HPT/SDR1 for -PR KVM
  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()

 tools/kvm/Makefile                           |   31 ++-
 tools/kvm/powerpc/cpu_info.c                 |   83 ++++
 tools/kvm/powerpc/cpu_info.h                 |   43 +++
 tools/kvm/powerpc/include/kvm/kvm-arch.h     |   17 +
 tools/kvm/powerpc/include/kvm/kvm-cpu-arch.h |   12 +-
 tools/kvm/powerpc/irq.c                      |   43 ++-
 tools/kvm/powerpc/kvm-cpu.c                  |   64 +++-
 tools/kvm/powerpc/kvm.c                      |  290 ++++++++++++++-
 tools/kvm/powerpc/spapr.h                    |   93 +++++
 tools/kvm/powerpc/spapr_hcall.c              |  134 +++++++
 tools/kvm/powerpc/spapr_hvcons.c             |  102 +++++
 tools/kvm/powerpc/spapr_hvcons.h             |   19 +
 tools/kvm/powerpc/spapr_pci.c                |  423 +++++++++++++++++++++
 tools/kvm/powerpc/spapr_pci.h                |   57 +++
 tools/kvm/powerpc/spapr_rtas.c               |  229 ++++++++++++
 tools/kvm/powerpc/xics.c                     |  514 ++++++++++++++++++++++++++
 tools/kvm/powerpc/xics.h                     |   23 ++
 17 files changed, 2150 insertions(+), 27 deletions(-)
 create mode 100644 tools/kvm/powerpc/cpu_info.c
 create mode 100644 tools/kvm/powerpc/cpu_info.h
 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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux