aboutsummaryrefslogtreecommitdiff
path: root/translate-all.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-05-29 12:42:00 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-06-20 16:32:46 +0200
commit5c8a00ce186b9a58d99b0afff90f87d5760bb44b (patch)
tree1d2e044be5e5adca8e813a7a9ce09003e1fb1b0b /translate-all.c
parentacc9d80b26e8cb4667b5b336963d91233b6a98c4 (diff)
downloadqemu-5c8a00ce186b9a58d99b0afff90f87d5760bb44b.zip
qemu-5c8a00ce186b9a58d99b0afff90f87d5760bb44b.tar.gz
qemu-5c8a00ce186b9a58d99b0afff90f87d5760bb44b.tar.bz2
exec: return MemoryRegion from address_space_translate
Only address_space_translate_for_iotlb needs to return the section. Every caller of address_space_translate now uses only section->mr, return it directly. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'translate-all.c')
-rw-r--r--translate-all.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/translate-all.c b/translate-all.c
index df7c697..9acb2b1 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -1355,15 +1355,15 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr)
void tb_invalidate_phys_addr(hwaddr addr)
{
ram_addr_t ram_addr;
- MemoryRegionSection *section;
+ MemoryRegion *mr;
hwaddr l = 1;
- section = address_space_translate(&address_space_memory, addr, &addr, &l, false);
- if (!(memory_region_is_ram(section->mr)
- || memory_region_is_romd(section->mr))) {
+ mr = address_space_translate(&address_space_memory, addr, &addr, &l, false);
+ if (!(memory_region_is_ram(mr)
+ || memory_region_is_romd(mr))) {
return;
}
- ram_addr = (memory_region_get_ram_addr(section->mr) & TARGET_PAGE_MASK)
+ ram_addr = (memory_region_get_ram_addr(mr) & TARGET_PAGE_MASK)
+ addr;
tb_invalidate_phys_page_range(ram_addr, ram_addr + 1, 0);
}