diff options
author | Aaron Lindsay <aaron@os.amperecomputing.com> | 2021-07-21 00:26:58 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2021-07-23 17:22:16 +0100 |
commit | 2da42253ef9af7a9c3a5e9e7fcfb1e7eb84a8bb6 (patch) | |
tree | e7520a14767c86a74de1ced1683d747375017af3 | |
parent | c2888a679d376baa2dc36a31e44ddb824f232d9c (diff) | |
download | qemu-2da42253ef9af7a9c3a5e9e7fcfb1e7eb84a8bb6.zip qemu-2da42253ef9af7a9c3a5e9e7fcfb1e7eb84a8bb6.tar.gz qemu-2da42253ef9af7a9c3a5e9e7fcfb1e7eb84a8bb6.tar.bz2 |
plugins: Fix physical address calculation for IO regions
The address calculation for IO regions introduced by
commit 787148bf928a54b5cc86f5b434f9399e9737679c
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>
-rw-r--r-- | plugins/api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/api.c b/plugins/api.c index 78b563c..2d521e6 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -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 |