[RFC PATCH 0/4] spapr: clean up nested hv

Nicholas Piggin posted 4 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230503003954.128188-1-npiggin@gmail.com
Maintainers: Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>
hw/ppc/meson.build              |   1 +
hw/ppc/spapr_hcall.c            | 348 +---------------------
hw/ppc/spapr_nested.c           | 496 ++++++++++++++++++++++++++++++++
include/hw/ppc/spapr.h          |  61 +---
include/hw/ppc/spapr_cpu_core.h |   5 +-
5 files changed, 502 insertions(+), 409 deletions(-)
create mode 100644 hw/ppc/spapr_nested.c
[RFC PATCH 0/4] spapr: clean up nested hv
Posted by Nicholas Piggin 1 year ago
Something like this is the way I'd been wanting to refactor nested hv.
The state load/store functions and data is (somewhat) abstracted, and
the hcall interface remains in the hcall handlers.

If, hypothetically, you had a new flavour of nested enter hcall that had
some other way of specifying the L2 state to load, then you would
(hopefully) be able to extend and reuse the state struct and load/store
helpers.

Thanks,
Nick

Nicholas Piggin (4):
  spapr: H_ENTER_NESTED should restore host XER ca field
  spapr: Add a nested state struct
  spapr: load and store l2 state with helper functions
  spapr: Move spapr nested HV to a new file

 hw/ppc/meson.build              |   1 +
 hw/ppc/spapr_hcall.c            | 348 +---------------------
 hw/ppc/spapr_nested.c           | 496 ++++++++++++++++++++++++++++++++
 include/hw/ppc/spapr.h          |  61 +---
 include/hw/ppc/spapr_cpu_core.h |   5 +-
 5 files changed, 502 insertions(+), 409 deletions(-)
 create mode 100644 hw/ppc/spapr_nested.c

-- 
2.40.1