From: Matt Evans <matt@ozlabs.org>
To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Cc: penberg@kernel.org, asias.hejun@gmail.com,
levinsasha928@gmail.com, gorcunov@gmail.com,
david@gibson.dropbear.id.au, aik@ozlabs.ru
Subject: [PATCH V4 0/7] Add initial SPAPR PPC64 architecture support
Date: Tue, 31 Jan 2012 17:34:35 +1100 [thread overview]
Message-ID: <1327991682-18503-1-git-send-email-matt@ozlabs.org> (raw)
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
next reply other threads:[~2012-01-31 6:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-31 6:34 Matt Evans [this message]
2012-01-31 6:34 ` [PATCH V4 1/7] kvm tools: PPC64, add HPT/SDR1 for -PR KVM Matt Evans
2012-01-31 6:34 ` [PATCH V4 2/7] kvm tools: Generate SPAPR PPC64 guest device tree Matt Evans
2012-01-31 7:59 ` Pekka Enberg
2012-01-31 10:00 ` Matt Evans
2012-02-01 3:39 ` David Gibson
2012-02-01 4:13 ` Alexey Kardashevskiy
2012-01-31 6:34 ` [PATCH V4 3/7] kvm tools: Add SPAPR PPC64 hcall & rtascall structure Matt Evans
2012-01-31 8:11 ` Pekka Enberg
2012-01-31 10:22 ` Matt Evans
2012-01-31 6:34 ` [PATCH V4 4/7] kvm tools: Add SPAPR PPC64 HV console Matt Evans
2012-01-31 6:34 ` [PATCH V4 5/7] kvm tools: Add PPC64 XICS interrupt controller support Matt Evans
2012-01-31 6:34 ` [PATCH V4 6/7] kvm tools: Add PPC64 PCI Host Bridge Matt Evans
2012-02-01 3:40 ` David Gibson
2012-02-01 4:14 ` Alexey Kardashevskiy
2012-01-31 6:34 ` [PATCH V4 7/7] kvm tools: Add PPC64 kvm_cpu__emulate_io() Matt Evans
2012-01-31 8:29 ` [PATCH V4 0/7] Add initial SPAPR PPC64 architecture support Pekka Enberg
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=1327991682-18503-1-git-send-email-matt@ozlabs.org \
--to=matt@ozlabs.org \
--cc=aik@ozlabs.ru \
--cc=asias.hejun@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=gorcunov@gmail.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=penberg@kernel.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 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).