]> git.proxmox.com Git - mirror_qemu.git/commit - target/arm/translate.c
target-arm: Define correct mmu_idx values and pass them in TB flags
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 5 Feb 2015 13:37:23 +0000 (13:37 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 5 Feb 2015 13:37:23 +0000 (13:37 +0000)
commitc1e3781090b9d36c60e1a254ba297cb34011d3d4
tree8d1f98324c00b060d33263e5ee78e95d4af96130
parent949013ce111eb64f8bc81cf9a9f1cefd6a1678c3
target-arm: Define correct mmu_idx values and pass them in TB flags

We currently claim that for ARM the mmu_idx should simply be the current
exception level. However this isn't actually correct -- secure EL0 and EL1
should have separate indexes from non-secure EL0 and EL1 since their
VA->PA mappings may differ. We also will want an index for stage 2
translations when we properly support EL2.

Define and document all seven mmu index values that we require, and
pass the mmu index in the TB flags rather than exception level or
priv/user bit.

This change doesn't update the get_phys_addr() code, so our page
table walking still assumes a simplistic "user or priv?" model for
the moment.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Greg Bellows <greg.bellows@linaro.org>
---
This leaves some odd gaps in the TB flags usage. I will circle
back and clean this up later (including moving the other common
flags like the singlestep ones to the top of the flags word),
but I didn't want to bloat this patchseries further.
target-arm/cpu.h
target-arm/helper.c
target-arm/translate-a64.c
target-arm/translate.c
target-arm/translate.h