Skip to content

target/ppc: Add support for Radix partition-scoped translation

Cédric Le Goater qemu-devel 4 versions – Applied

Status from this message: Applied to ppc-for-5.1.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 5 repliesApplied
  2. v34 patches 0 repliesSuperseded
  3. v24 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches18 repliesApplied

Changes in v4 from the cover letter

- changed ppc_radix64_walk_tree() and ppc_radix64_next_level() to return an error code instead of a PTE. It clarifies error handling in the callers (Greg's contribution)

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/4target/ppc: Introduce ppc_radix64_xlate() for Radix tree translationtarget/ppc/mmu-radix64.c+123 -962 replies
2/4target/ppc: Extend ppc_radix64_check_prot() with a 'partition_scoped' booltarget/ppc/mmu-radix64.c+6 -50 replies
3/4target/ppc: Rework ppc_radix64_walk_tree() for partition-scoped translationtarget/ppc/mmu-radix64.c+52 -270 replies
4/4target/ppc: Add support for Radix partition-scoped translationtarget/ppc/cpu.h target/ppc/excp_helper.c target/ppc/mmu-radix64.c+175 -193 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchGreg Kurz
1/4R-b
2/4R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/4] target/ppc: Add support for Radix partition-scoped translation

Hello,

The Radix tree translation model currently supports process-scoped translation for the PowerNV machine (Hypervisor mode) and for the pSeries machine (Guest mode). Guests running under an emulated Hypervisor (PowerNV machine) require a new type of Radix translation, called partition-scoped, which is missing today.

The Radix tree translation is a 2 steps process. The first step, process-scoped translation, converts an effective Address to a guest real address, and the second step, partition-scoped translation, converts a guest real address to a host real address.

There are difference cases to covers :

* Hypervisor real mode access: no Radix translation.

* Hypervisor or host application access (quadrant 0 and 3) with relocation on: process-scoped translation.

* Guest OS real mode access: only partition-scoped translation.

* Guest OS real or guest application access (quadrant 0 and 3) with relocation on: both process-scoped translation and partition-scoped translations.

* Hypervisor access in quadrant 1 and 2 with relocation on: both process-scoped translation and partition-scoped translations.

The radix tree partition-scoped translation is performed using tables pointed to by the first double-word of the Partition Table Entries and process-scoped translation uses tables pointed to by the Process Table Entries (second double-word of the Partition Table Entries).

Both partition-scoped and process-scoped translations process are identical and thus the radix tree traversing code is largely reused. However, errors in partition-scoped translations generate hypervisor exceptions.

Based on work from Suraj Jitindar Singh <[email protected]>

Thanks,

C.

Changes since v3:

- changed ppc_radix64_walk_tree() and ppc_radix64_next_level() to return an error code instead of a PTE. It clarifies error handling in the callers (Greg's contribution)

Changes since v2:

- removed the changes on the routines raising the exceptions to take a 'cause_excp' bool.

Changes since v1:

- removed checks (cpu->vhyp && lpid == 0)
- changed ppc_radix64_walk_tree() and ppc_radix64_next_level() to use an 'AddressSpace *'
- moved call to ppc_radix64_get_fully_qualified_addr() under ppc_radix64_xlate()
- reworked the prototype of the routines raising the exceptions to take a 'cause_excp' bool.
- re-introduced an extra test on nls in ppc_radix64_walk_tree()

Cédric Le Goater (4):
target/ppc: Introduce ppc_radix64_xlate() for Radix tree translation target/ppc: Extend ppc_radix64_check_prot() with a 'partition_scoped'
bool
target/ppc: Rework ppc_radix64_walk_tree() for partition-scoped
translation
target/ppc: Add support for Radix partition-scoped translation

 target/ppc/cpu.h         |   3 +
 target/ppc/excp_helper.c |   3 +-
 target/ppc/mmu-radix64.c | 453 ++++++++++++++++++++++++++++-----------
 3 files changed, 334 insertions(+), 125 deletions(-)
Signature · 1 line
2.25.1