mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
acc9d80b26
commit
5c8a00ce18
3 changed files with 84 additions and 84 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue