提交 0844e007 编写于 作者: P Paolo Bonzini

exec: make io_mem_unassigned private

There is no reason to avoid a recompile before accessing unassigned
memory.  In the end it will be treated as MMIO anyway.
Reviewed-by: NRichard Henderson <rth@twiddle.net>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 8f3e03cb
...@@ -66,8 +66,8 @@ AddressSpace address_space_io; ...@@ -66,8 +66,8 @@ AddressSpace address_space_io;
AddressSpace address_space_memory; AddressSpace address_space_memory;
DMAContext dma_context_memory; DMAContext dma_context_memory;
MemoryRegion io_mem_rom, io_mem_unassigned, io_mem_notdirty; MemoryRegion io_mem_rom, io_mem_notdirty;
static MemoryRegion io_mem_subpage_ram; static MemoryRegion io_mem_unassigned, io_mem_subpage_ram;
#endif #endif
......
...@@ -111,7 +111,6 @@ void cpu_physical_memory_write_rom(hwaddr addr, ...@@ -111,7 +111,6 @@ void cpu_physical_memory_write_rom(hwaddr addr,
const uint8_t *buf, int len); const uint8_t *buf, int len);
extern struct MemoryRegion io_mem_rom; extern struct MemoryRegion io_mem_rom;
extern struct MemoryRegion io_mem_unassigned;
extern struct MemoryRegion io_mem_notdirty; extern struct MemoryRegion io_mem_notdirty;
#endif #endif
......
...@@ -68,10 +68,7 @@ static inline DATA_TYPE glue(io_read, SUFFIX)(CPUArchState *env, ...@@ -68,10 +68,7 @@ static inline DATA_TYPE glue(io_read, SUFFIX)(CPUArchState *env,
physaddr = (physaddr & TARGET_PAGE_MASK) + addr; physaddr = (physaddr & TARGET_PAGE_MASK) + addr;
env->mem_io_pc = retaddr; env->mem_io_pc = retaddr;
if (mr != &io_mem_rom if (mr != &io_mem_rom && mr != &io_mem_notdirty && !can_do_io(env)) {
&& mr != &io_mem_unassigned
&& mr != &io_mem_notdirty
&& !can_do_io(env)) {
cpu_io_recompile(env, retaddr); cpu_io_recompile(env, retaddr);
} }
...@@ -218,10 +215,7 @@ static inline void glue(io_write, SUFFIX)(CPUArchState *env, ...@@ -218,10 +215,7 @@ static inline void glue(io_write, SUFFIX)(CPUArchState *env,
MemoryRegion *mr = iotlb_to_region(physaddr); MemoryRegion *mr = iotlb_to_region(physaddr);
physaddr = (physaddr & TARGET_PAGE_MASK) + addr; physaddr = (physaddr & TARGET_PAGE_MASK) + addr;
if (mr != &io_mem_rom if (mr != &io_mem_rom && mr != &io_mem_notdirty && !can_do_io(env)) {
&& mr != &io_mem_unassigned
&& mr != &io_mem_notdirty
&& !can_do_io(env)) {
cpu_io_recompile(env, retaddr); cpu_io_recompile(env, retaddr);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册