]> Git Repo - qemu.git/commit
target/ppc: Use class fields to simplify LPCR masking
authorDavid Gibson <[email protected]>
Mon, 6 Jan 2020 05:35:10 +0000 (16:35 +1100)
committerDavid Gibson <[email protected]>
Mon, 16 Mar 2020 22:41:15 +0000 (09:41 +1100)
commite232eccc754b7c61110a21fb029f2946cc968799
treed2c0a1ee0cf49cc5622be3ded2a0e505020ef170
parent5167100975e7888de397456adc1678f65a3dbd59
target/ppc: Use class fields to simplify LPCR masking

When we store the Logical Partitioning Control Register (LPCR) we have a
big switch statement to work out which are valid bits for the cpu model
we're emulating.

As well as being ugly, this isn't really conceptually correct, since it is
based on the mmu_model variable, whereas the LPCR isn't (only) about the
MMU, so mmu_model is basically just acting as a proxy for the cpu model.

Handle this in a simpler way, by adding a suitable lpcr_mask to the QOM
class.

Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
target/ppc/cpu-qom.h
target/ppc/mmu-hash64.c
target/ppc/translate_init.inc.c
This page took 0.02288 seconds and 4 git commands to generate.