qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/15] Nested PAPR API (KVM on PowerVM)
@ 2024-02-20  8:35 Harsh Prateek Bora
  2024-02-20  8:35 ` [PATCH v4 01/15] spapr: nested: register nested-hv api hcalls only for cap-nested-hv Harsh Prateek Bora
                   ` (14 more replies)
  0 siblings, 15 replies; 38+ messages in thread
From: Harsh Prateek Bora @ 2024-02-20  8:35 UTC (permalink / raw)
  To: npiggin, qemu-ppc
  Cc: clegoate, mikey, amachhiw, vaibhav, sbhat, danielhb413,
	qemu-devel

There is an existing Nested-HV API to enable nested guests on powernv
machines. However, that is not supported on pseries/PowerVM LPARs.
This patch series implements required hcall interfaces to enable nested
guests with KVM on PowerVM.
Unlike Nested-HV, with this API, entire L2 state is retained by L0
during guest entry/exit and uses pre-defined Guest State Buffer (GSB)
format to communicate guest state between L1 and L2 via L0.

L0 here refers to the phyp/PowerVM, or launching a Qemu TCG L0 with the
newly introduced option cap-nested-papr=true.
L1 refers to the LPAR host on PowerVM or Linux booted on Qemu TCG with
above mentioned option cap-nested-papr=true.
L2 refers to nested guest running on top of L1 using KVM.
No SW changes needed for Qemu running in L1 Linux as well as L2 Kernel.

Linux Kernel side support is already merged upstream:
---
commit 19d31c5f115754c369c0995df47479c384757f82
Author: Jordan Niethe <jniethe5@gmail.com>
Date:   Thu Sep 14 13:05:59 2023 +1000

    KVM: PPC: Add support for nestedv2 guests
---
For more details, documentation can be referred in either of patch
series.

There are scripts available to assist in setting up an environment for
testing nested guests at https://github.com/iamjpn/kvm-powervm-test

A tree with this series is available at:
https://github.com/planetharsh/qemu/tree/upstream-0219-v4

Thanks to Michael Neuling, Shivaprasad Bhat, Amit Machhiwal, Kautuk
Consul, Vaibhav Jain and Jordan Niethe.

Changelog:
v4: added hcall unreg helper to allow hcall re-registrations in caps apply.
v3: https://lore.kernel.org/qemu-devel/20240118052438.1475437-1-harshpb@linux.ibm.com/
v2: https://lore.kernel.org/qemu-devel/20231012104951.194876-1-harshpb@linux.ibm.com/
v1: https://lore.kernel.org/qemu-devel/20230906043333.448244-1-harshpb@linux.ibm.com/

Amit Machhiwal (1):
  spapr: nested: Set the PCR when logical PVR is set

Harsh Prateek Bora (14):
  spapr: nested: register nested-hv api hcalls only for cap-nested-hv
  spapr: nested: move nested part of spapr_get_pate into spapr_nested.c
  spapr: nested: Introduce SpaprMachineStateNested to store related
    info.
  spapr: nested: keep nested-hv related code restricted to its API.
  spapr: nested: Document Nested PAPR API
  spapr: nested: Introduce H_GUEST_[GET|SET]_CAPABILITIES hcalls.
  spapr: nested: Introduce H_GUEST_[CREATE|DELETE] hcalls.
  spapr: nested: Introduce H_GUEST_CREATE_VCPU hcall.
  spapr: nested: Extend nested_ppc_state for nested PAPR API
  spapr: nested: Initialize the GSB elements lookup table.
  spapr: nested: Introduce H_GUEST_[GET|SET]_STATE hcalls.
  spapr: nested: Use correct source for parttbl info for nested PAPR
    API.
  spapr: nested: Introduce H_GUEST_RUN_VCPU hcall.
  spapr: nested: Introduce cap-nested-papr for Nested PAPR API

 docs/devel/nested-papr.txt    |  514 +++++++++++
 include/hw/ppc/spapr.h        |   26 +-
 include/hw/ppc/spapr_nested.h |  430 ++++++++-
 target/ppc/cpu.h              |    4 +
 hw/ppc/ppc.c                  |   10 +
 hw/ppc/spapr.c                |   35 +-
 hw/ppc/spapr_caps.c           |   59 ++
 hw/ppc/spapr_hcall.c          |   24 +-
 hw/ppc/spapr_nested.c         | 1552 ++++++++++++++++++++++++++++++++-
 9 files changed, 2599 insertions(+), 55 deletions(-)
 create mode 100644 docs/devel/nested-papr.txt

-- 
2.39.3



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

end of thread, other threads:[~2024-03-05  8:26 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20  8:35 [PATCH v4 00/15] Nested PAPR API (KVM on PowerVM) Harsh Prateek Bora
2024-02-20  8:35 ` [PATCH v4 01/15] spapr: nested: register nested-hv api hcalls only for cap-nested-hv Harsh Prateek Bora
2024-02-27  8:51   ` Nicholas Piggin
2024-02-20  8:35 ` [PATCH v4 02/15] spapr: nested: move nested part of spapr_get_pate into spapr_nested.c Harsh Prateek Bora
2024-02-20  8:35 ` [PATCH v4 03/15] spapr: nested: Introduce SpaprMachineStateNested to store related info Harsh Prateek Bora
2024-02-20  8:35 ` [PATCH v4 04/15] spapr: nested: keep nested-hv related code restricted to its API Harsh Prateek Bora
2024-02-27  8:54   ` Nicholas Piggin
2024-02-27  9:45     ` Harsh Prateek Bora
2024-02-27 10:40       ` Nicholas Piggin
2024-02-20  8:35 ` [PATCH v4 05/15] spapr: nested: Document Nested PAPR API Harsh Prateek Bora
2024-02-27  9:29   ` Nicholas Piggin
2024-02-27  9:31     ` Harsh Prateek Bora
2024-02-27 10:39       ` Nicholas Piggin
2024-02-29  5:46         ` Harsh Prateek Bora
2024-02-20  8:36 ` [PATCH v4 06/15] spapr: nested: Introduce H_GUEST_[GET|SET]_CAPABILITIES hcalls Harsh Prateek Bora
2024-02-20  8:36 ` [PATCH v4 07/15] spapr: nested: Introduce H_GUEST_[CREATE|DELETE] hcalls Harsh Prateek Bora
2024-02-20  8:36 ` [PATCH v4 08/15] spapr: nested: Introduce H_GUEST_CREATE_VCPU hcall Harsh Prateek Bora
2024-02-27  9:51   ` Nicholas Piggin
2024-02-29  9:39     ` Harsh Prateek Bora
2024-02-20  8:36 ` [PATCH v4 09/15] spapr: nested: Extend nested_ppc_state for nested PAPR API Harsh Prateek Bora
2024-02-27  9:59   ` Nicholas Piggin
2024-02-29  9:42     ` Harsh Prateek Bora
2024-02-20  8:36 ` [PATCH v4 10/15] spapr: nested: Initialize the GSB elements lookup table Harsh Prateek Bora
2024-02-27 10:02   ` Nicholas Piggin
2024-02-29 10:29     ` Harsh Prateek Bora
2024-02-20  8:36 ` [PATCH v4 11/15] spapr: nested: Introduce H_GUEST_[GET|SET]_STATE hcalls Harsh Prateek Bora
2024-02-27 10:10   ` Nicholas Piggin
2024-03-05  8:19     ` Harsh Prateek Bora
2024-02-20  8:36 ` [PATCH v4 12/15] spapr: nested: Use correct source for parttbl info for nested PAPR API Harsh Prateek Bora
2024-02-27 10:16   ` Nicholas Piggin
2024-03-05  8:21     ` Harsh Prateek Bora
2024-02-20  8:36 ` [PATCH v4 13/15] spapr: nested: Introduce H_GUEST_RUN_VCPU hcall Harsh Prateek Bora
2024-02-20  8:36 ` [PATCH v4 14/15] spapr: nested: Introduce cap-nested-papr for Nested PAPR API Harsh Prateek Bora
2024-02-27 10:22   ` Nicholas Piggin
2024-03-05  8:24     ` Harsh Prateek Bora
2024-02-20  8:36 ` [PATCH v4 15/15] spapr: nested: Set the PCR when logical PVR is set Harsh Prateek Bora
2024-02-27 10:23   ` Nicholas Piggin
2024-03-05  8:26     ` Harsh Prateek Bora

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).