]> git.proxmox.com Git - mirror_qemu.git/commit - target/ppc/cpu.h
target/ppc: Move no-execute and guarded page checking into new function
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Wed, 1 Mar 2017 07:12:54 +0000 (18:12 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 3 Mar 2017 00:30:59 +0000 (11:30 +1100)
commit07a68f990785a8574c78a36b21cf5165e46f1113
treeec2a208ab06040a3b57845b492a1bb4eca3a1f98
parent347a5c73bafd1b5872c9d3192a4d08f8aa1d5f5a
target/ppc: Move no-execute and guarded page checking into new function

A pte entry has bit fields which can be used to make a page no-execute or
guarded, if either of these bits are set then an instruction access to this
page will fail. Currently these bits are checked with the pp_prot function
however the ISA specifies that the access authority controlled by the
key-pp value pair should only be checked on an instruction access after
the no-execute and guard bits have already been verified to permit the
access.

Move the no-execute and guard bit checking into a new separate function.
Note that we can remove the check for the no-execute bit in the slb entry
since this check was already performed above when we obtained the slb
entry.

In the event that the no-execute or guard bits are set, an ISI should be
generated with the SRR1_NOEXEC_GUARD (0x10000000) bit set in srr1. Add a
define for this for clarity.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
[dwg: Move constants to cpu.h since they're not MMUv3 specific]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/cpu.h
target/ppc/mmu-hash64.c