All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/20] Support for radix guest and host on POWER9
@ 2017-01-30 10:21 ` Paul Mackerras
  0 siblings, 0 replies; 50+ messages in thread
From: Paul Mackerras @ 2017-01-30 10:21 UTC (permalink / raw)
  To: linuxppc-dev, kvm, kvm-ppc

The primary purpose of this patch series is to make it possible to run
a guest on POWER9 using the radix MMU under a KVM host that also uses
the radix MMU.  To do this, the guest needs to say that it supports
radix in the ibm,client-architecture-support vector, and if the host
agrees, the guest then needs to call the new H_REGISTER_PROCESS_TABLE
hypercall to tell the hypervisor where its process table is (the
process table contains pointers to the radix trees for each process).

On the host side, we add new KVM interfaces for userspace (e.g. QEMU)
to use to know whether the host supports radix guest, HPT guests, or
both, and for userspace to use to implement H_REGISTER_PROCESS_TABLE.
There are two new capabilities and two new ioctls.  These are added in
patch 8/20.

The host then needs to be able to construct the second-level radix
tree ("partition-scoped" in architecturese) which maps guest real
addresses to host real addresses.  We add PTEs to this table on
hypervisor page faults and remove them in response to MMU notifier
callbacks.

The patch series also includes some improvements for HPT guests
running under a HPT host.

Currently, the MMU type of the guest (radix or HPT) must be the same
as the host.  That is, if the host is booted in radix mode, it can
only run radix guests.  If the host is booted in HPT mode (e.g. by
putting "disable_radix" on the kernel command line), it can only run
HPT guests.

The patch series is against 4.10-rc4.

Differences since v1:

- Added TLB flushing when a vcpu moves from one physical CPU to
another.

- Guest exit path can now have the MMU on, meaning that the
guest can now use relocation-on interrupts.

- Added workarounds for the POWER9 DD1 chip.

- Use kvm_is_radix(kvm) consistently.

Paul.
---
 Documentation/virtual/kvm/api.txt         |  83 ++++
 arch/powerpc/include/asm/book3s/64/mmu.h  |  14 +-
 arch/powerpc/include/asm/exception-64s.h  |  10 +-
 arch/powerpc/include/asm/hvcall.h         |  11 +
 arch/powerpc/include/asm/kvm_book3s.h     |  26 +-
 arch/powerpc/include/asm/kvm_book3s_64.h  |   6 +
 arch/powerpc/include/asm/kvm_host.h       |   6 +
 arch/powerpc/include/asm/kvm_ppc.h        |   2 +
 arch/powerpc/include/asm/prom.h           |  17 +-
 arch/powerpc/include/asm/reg.h            |   4 +
 arch/powerpc/include/uapi/asm/kvm.h       |  20 +
 arch/powerpc/kernel/asm-offsets.c         |   2 +
 arch/powerpc/kernel/exceptions-64s.S      |  53 ++-
 arch/powerpc/kernel/prom_init.c           |  18 +-
 arch/powerpc/kvm/Makefile                 |   3 +-
 arch/powerpc/kvm/book3s.c                 |   1 +
 arch/powerpc/kvm/book3s_64_mmu_hv.c       | 110 +++--
 arch/powerpc/kvm/book3s_64_mmu_radix.c    | 716 ++++++++++++++++++++++++++++++
 arch/powerpc/kvm/book3s_hv.c              | 205 ++++++++-
 arch/powerpc/kvm/book3s_hv_builtin.c      |  38 +-
 arch/powerpc/kvm/book3s_hv_rm_mmu.c       |  25 +-
 arch/powerpc/kvm/book3s_hv_rm_xics.c      |   8 +-
 arch/powerpc/kvm/book3s_hv_rmhandlers.S   | 138 +++++-
 arch/powerpc/kvm/powerpc.c                |  32 ++
 arch/powerpc/mm/init-common.c             |   3 +-
 arch/powerpc/mm/init_64.c                 |  35 ++
 arch/powerpc/mm/pgtable-radix.c           |   2 +
 arch/powerpc/mm/pgtable_64.c              |  16 +-
 arch/powerpc/platforms/pseries/firmware.c |   2 +-
 arch/powerpc/platforms/pseries/lpar.c     |  29 ++
 include/uapi/linux/kvm.h                  |   6 +
 31 files changed, 1490 insertions(+), 151 deletions(-)

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

end of thread, other threads:[~2017-01-30 21:16 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30 10:21 [PATCH v2 00/20] Support for radix guest and host on POWER9 Paul Mackerras
2017-01-30 10:21 ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 01/20] powerpc/64: Don't try to use radix MMU under a hypervisor Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 02/20] powerpc/pseries: Fixes for the "ibm,architecture-vec-5" options Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21   ` [PATCH v2 02/20] powerpc/pseries: Fixes for the "ibm, architecture-vec-5" options Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 03/20] powerpc/64: Enable use of radix MMU under hypervisor on POWER9 Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 21:16   ` Michael Ellerman
2017-01-30 21:16     ` Michael Ellerman
2017-01-30 10:21 ` [PATCH v2 04/20] powerpc/64: More definitions for POWER9 Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 05/20] powerpc/64: Export pgtable_cache and pgtable_cache_add for KVM Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 06/20] powerpc/64: Make type of partition table flush depend on partition type Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 07/20] powerpc/64: Allow for relocation-on interrupts from guest to host Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 08/20] KVM: PPC: Book3S HV: Add userspace interfaces for POWER9 MMU Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 09/20] KVM: PPC: Book3S HV: Set process table for HPT guests on POWER9 Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 10/20] KVM: PPC: Book3S HV: Use ASDR " Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 11/20] KVM: PPC: Book3S HV: Add basic infrastructure for radix guests Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 12/20] KVM: PPC: Book3S HV: Modify guest entry/exit paths to handle " Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 13/20] KVM: PPC: Book3S HV: Page table construction and page faults for " Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 20:58   ` Michael Ellerman
2017-01-30 20:58     ` Michael Ellerman
2017-01-30 21:05     ` Paul Mackerras
2017-01-30 21:05       ` Paul Mackerras
2017-01-30 21:05       ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 14/20] KVM: PPC: Book3S HV: MMU notifier callbacks " Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 15/20] KVM: PPC: Book3S HV: Implement dirty page logging " Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 16/20] KVM: PPC: Book3S HV: Make HPT-specific hypercalls return error in radix mode Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 17/20] KVM: PPC: Book3S HV: Invalidate TLB on radix guest vcpu movement Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 18/20] KVM: PPC: Book3S HV: Allow guest exit path to have MMU on Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 19/20] KVM: PPC: Book3S HV: Invalidate ERAT on guest entry/exit for POWER9 DD1 Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras
2017-01-30 10:21 ` [PATCH v2 20/20] KVM: PPC: Book3S HV: Enable radix guest support Paul Mackerras
2017-01-30 10:21   ` Paul Mackerras

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.