final updates for uc_mem_unmap, uc_mem_protect, and support ro UC_PROT_EXEC permission

This commit is contained in:
Chris Eagle
2015-08-30 19:50:18 -07:00
parent 05b645abd5
commit 9e4e96ff47
5 changed files with 322 additions and 19 deletions

View File

@ -299,6 +299,11 @@ tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr)
if (unlikely(env1->tlb_table[mmu_idx][page_index].addr_code !=
(addr & TARGET_PAGE_MASK))) {
cpu_ldub_code(env1, addr);
//check for NX related error from softmmu
if (env1->invalid_error == UC_ERR_MEM_READ) {
env1->invalid_error = UC_ERR_CODE_INVALID;
return -1;
}
}
pd = env1->iotlb[mmu_idx][page_index] & ~TARGET_PAGE_MASK;
mr = iotlb_to_region(cpu->as, pd);