summary refs log tree commit diff stats
path: root/scripts/qapi/expr.py
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2020-01-06 16:52:26 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2020-03-17 09:41:15 +1100
commita864a6b382d52579210b86cde50bc949d48a3155 (patch)
tree4222075631ff393c62a3e569ab5215f3944e611a /scripts/qapi/expr.py
parente232eccc754b7c61110a21fb029f2946cc968799 (diff)
downloadfocaccia-qemu-a864a6b382d52579210b86cde50bc949d48a3155.tar.gz
focaccia-qemu-a864a6b382d52579210b86cde50bc949d48a3155.zip
target/ppc: Streamline calculation of RMA limit from LPCR[RMLS]
Currently we use a big switch statement in ppc_hash64_update_rmls() to work
out what the right RMA limit is based on the LPCR[RMLS] field.  There's no
formula for this - it's just an arbitrary mapping defined by the existing
CPU implementations - but we can make it a bit more readable by using a
lookup table rather than a switch.  In addition we can use the MiB/GiB
symbols to make it a bit clearer.

While there we add a bit of clarity and rationale to the comment about
what happens if the LPCR[RMLS] doesn't contain a valid value.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'scripts/qapi/expr.py')
0 files changed, 0 insertions, 0 deletions