mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
347a5c73ba
commit
07a68f9907
2 changed files with 17 additions and 9 deletions
|
@ -475,6 +475,7 @@ struct ppc_slb_t {
|
|||
|
||||
/* SRR1 error code fields */
|
||||
|
||||
#define SRR1_NOEXEC_GUARD 0x10000000
|
||||
#define SRR1_PROTFAULT 0x08000000
|
||||
#define SRR1_IAMR 0x00200000
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue