diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2017-02-20 10:54:48 +1100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-03-01 11:23:39 +1100 |
commit | 7d6250e3d1a145e5427f21f5664995e0056b34a6 (patch) | |
tree | 4b243104336d8fe08d013bb5a27f7827c094d10b /target/ppc/misc_helper.c | |
parent | b7b0b1f13a9d0b77b3dcb7696de420c2e805ca25 (diff) | |
download | qemu-7d6250e3d1a145e5427f21f5664995e0056b34a6.zip qemu-7d6250e3d1a145e5427f21f5664995e0056b34a6.tar.gz qemu-7d6250e3d1a145e5427f21f5664995e0056b34a6.tar.bz2 |
target/ppc: SDR1 is a hypervisor resource
At present the SDR1 register - the base of the system's hashed page table
(HPT) - is represented as an SPR with supervisor read and write permission.
However, on CPUs which have a hypervisor mode, the SDR1 is a hypervisor
only resource. Change the permission checking on the SPR to reflect this.
Now that this is done, we don't need to check for an external HPT executing
mtsdr1: an external HPT only applies when we're emulating the behaviour of
a hypervisor, rather than modelling the CPU's hypervisor mode internally,
so if we're permitted to execute mtsdr1, we don't have an external HPT.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Diffstat (limited to 'target/ppc/misc_helper.c')
-rw-r--r-- | target/ppc/misc_helper.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/target/ppc/misc_helper.c b/target/ppc/misc_helper.c index ab432ba..fa573dd 100644 --- a/target/ppc/misc_helper.c +++ b/target/ppc/misc_helper.c @@ -82,11 +82,9 @@ void helper_store_sdr1(CPUPPCState *env, target_ulong val) { PowerPCCPU *cpu = ppc_env_get_cpu(env); - if (!env->external_htab) { - if (env->spr[SPR_SDR1] != val) { - ppc_store_sdr1(env, val); - tlb_flush(CPU(cpu)); - } + if (env->spr[SPR_SDR1] != val) { + ppc_store_sdr1(env, val); + tlb_flush(CPU(cpu)); } } |