mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
s390x/mmu: Implement Instruction-Execution-Protection Facility
IEP support in the mmu is fairly easy. Set the right permissions for TLB entries and properly report an exception. Make sure to handle EDAT-2 by setting bit 56/60/61 of the TEID (TEC) to the right values. Let's keep s390_cpu_get_phys_page_debug() working even if IEP is active. Switch MMU_DATA_LOAD - this has no other effects any more as the ASC to be used is now fully selected outside of mmu_translate(). Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com>
This commit is contained in:
parent
3dc29061f3
commit
3a06f98192
3 changed files with 27 additions and 1 deletions
|
@ -63,7 +63,11 @@ hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr)
|
|||
asc = PSW_ASC_PRIMARY;
|
||||
}
|
||||
|
||||
if (mmu_translate(env, vaddr, MMU_INST_FETCH, asc, &raddr, &prot, false)) {
|
||||
/*
|
||||
* We want to read code even if IEP is active. Use MMU_DATA_LOAD instead
|
||||
* of MMU_INST_FETCH.
|
||||
*/
|
||||
if (mmu_translate(env, vaddr, MMU_DATA_LOAD, asc, &raddr, &prot, false)) {
|
||||
return -1;
|
||||
}
|
||||
return raddr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue