mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
plugins: Fix physical address calculation for IO regions
The address calculation for IO regions introduced by
commit 787148bf92
Author: Aaron Lindsay <aaron@os.amperecomputing.com>
plugins: Expose physical addresses instead of device offsets
is not always accurate. Use the more correct
MemoryRegionSection.offset_within_address_space.
Signed-off-by: Aaron Lindsay <aaron@os.amperecomputing.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210720195735.3934473-1-aaron@os.amperecomputing.com>
Message-Id: <20210720232703.10650-25-alex.bennee@linaro.org>
This commit is contained in:
parent
c2888a679d
commit
2da42253ef
1 changed files with 1 additions and 1 deletions
|
@ -319,7 +319,7 @@ uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *haddr)
|
|||
return block->offset + offset + block->mr->addr;
|
||||
} else {
|
||||
MemoryRegionSection *mrs = haddr->v.io.section;
|
||||
return haddr->v.io.offset + mrs->mr->addr;
|
||||
return mrs->offset_within_address_space + haddr->v.io.offset;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue