[PATCH 0/3] ppc: Check for bad Radix configs

Leandro Lupori posted 3 patches 1 year, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220620202704.78978-1-leandro.lupori@eldorado.org.br
Maintainers: "Cédric Le Goater" <clg@kaod.org>, Daniel Henrique Barboza <danielhb413@gmail.com>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>
There is a newer version of this series
hw/ppc/spapr.c             |  5 +++
hw/ppc/spapr_hcall.c       |  9 +++++
target/ppc/mmu-book3s-v3.c |  5 +++
target/ppc/mmu-radix64.c   | 74 ++++++++++++++++++++++++++++++++------
4 files changed, 82 insertions(+), 11 deletions(-)
[PATCH 0/3] ppc: Check for bad Radix configs
Posted by Leandro Lupori 1 year, 10 months ago
On PowerPC64 using Radix MMU, when partition or process table is not
properly aligned, according to their size, an exception must be raised
(DSI/ISI/HDSI/HISI) and the "Bad Radix Config" bit must be set in the
appropriate register.
Hardware and KVM already do this, but TCG was missing this part.

This patch series also improves the code that validates each Radix Tree
level, by checking the number of levels and the size of each one.

Finally, when DEBUG_MMU is defined, PDE/PTE base address alignment is
also checked and reported, to make it easier to detect invalid
configurations.

Leandro Lupori (3):
  ppc: Check partition and process table alignment
  target/ppc: Improve Radix xlate level validation
  target/ppc: Check page dir/table base alignment

 hw/ppc/spapr.c             |  5 +++
 hw/ppc/spapr_hcall.c       |  9 +++++
 target/ppc/mmu-book3s-v3.c |  5 +++
 target/ppc/mmu-radix64.c   | 74 ++++++++++++++++++++++++++++++++------
 4 files changed, 82 insertions(+), 11 deletions(-)

-- 
2.25.1