]> git.proxmox.com Git - mirror_qemu.git/commit
spapr: Small cleanup of PPC MMU enums
authorSam Bobroff <sam.bobroff@au1.ibm.com>
Thu, 2 Mar 2017 05:38:56 +0000 (16:38 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 3 Mar 2017 00:30:59 +0000 (11:30 +1100)
commitec975e839cbb6143be80cfc91b1df103fc7e4771
treecfe05d1e235e9548051341537833880b6c6fa6d8
parentbb998645284924db6da93e777af5f29ef2f3c0a8
spapr: Small cleanup of PPC MMU enums

The PPC MMU types are sometimes treated as if they were a bit field
and sometime as if they were an enum which causes maintenance
problems: flipping bits in the MMU type (which is done on both the 1TB
segment and 64K segment bits) currently produces new MMU type
values that are not handled in every "switch" on it, sometimes causing
an abort().

This patch provides some macros that can be used to filter out the
"bit field-like" bits so that the remainder of the value can be
switched on, like an enum. This allows removal of all of the
"degraded" types from the list and should ease maintenance.

Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c
target/ppc/cpu-qom.h
target/ppc/kvm.c
target/ppc/mmu-hash64.c
target/ppc/mmu_helper.c
target/ppc/translate.c