Add target_page_size member to uc_struct to track TARGET_PAGE_SIZE
This commit is contained in:
@@ -49,7 +49,7 @@ void memory_unmap(struct uc_struct *uc, MemoryRegion *mr)
|
||||
{
|
||||
target_ulong addr;
|
||||
//make sure all pages associated with the MemoryRegion are flushed
|
||||
for (addr = mr->addr; addr < mr->end; addr += TARGET_PAGE_SIZE) {
|
||||
for (addr = mr->addr; addr < mr->end; addr += uc->target_page_size) {
|
||||
tlb_flush_page(uc->current_cpu, addr);
|
||||
}
|
||||
mr->enabled = false;
|
||||
|
||||
@@ -76,6 +76,9 @@ static inline void uc_common_init(struct uc_struct* uc)
|
||||
uc->memory_unmap = memory_unmap;
|
||||
uc->readonly_mem = memory_region_set_readonly;
|
||||
|
||||
uc->target_page_size = TARGET_PAGE_SIZE;
|
||||
uc->target_page_align = TARGET_PAGE_SIZE - 1;
|
||||
|
||||
if (!uc->release)
|
||||
uc->release = release_common;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user