[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/28] plugins: Fix physical address calculation for IO regions
From: |
Alex Bennée |
Subject: |
[PULL 24/28] plugins: Fix physical address calculation for IO regions |
Date: |
Fri, 23 Jul 2021 18:03:50 +0100 |
From: Aaron Lindsay <aaron@os.amperecomputing.com>
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>
diff --git a/plugins/api.c b/plugins/api.c
index 78b563c5c5..2d521e6ba8 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
--
2.20.1
- [PULL 11/28] contrib/gitdm: add domain-map for Eldorado, (continued)
- [PULL 11/28] contrib/gitdm: add domain-map for Eldorado, Alex Bennée, 2021/07/23
- [PULL 19/28] contrib/gitdm: add more individual contributor entries., Alex Bennée, 2021/07/23
- [PULL 20/28] tcg/plugins: implement a qemu_plugin_user_exit helper, Alex Bennée, 2021/07/23
- [PULL 26/28] gitlab: enable a very minimal build with the tricore container, Alex Bennée, 2021/07/23
- [PULL 21/28] plugins/cache: Fixed a bug with destroying FIFO metadata, Alex Bennée, 2021/07/23
- [PULL 23/28] plugins/cache: Fixed "function decl. is not a prototype" warnings, Alex Bennée, 2021/07/23
- [PULL 15/28] contrib/gitdm: add domain-map for NVIDIA, Alex Bennée, 2021/07/23
- [PULL 13/28] contrib/gitdm: un-ironically add a mapping for LWN, Alex Bennée, 2021/07/23
- [PULL 12/28] contrib/gitdm: add domain-map/group-map for Wind River, Alex Bennée, 2021/07/23
- [PULL 22/28] plugins/cache: limited the scope of a mutex lock, Alex Bennée, 2021/07/23
- [PULL 24/28] plugins: Fix physical address calculation for IO regions,
Alex Bennée <=
- [PULL 17/28] contrib/gitdm: add an explicit academic entry for BU, Alex Bennée, 2021/07/23
- [PULL 16/28] contrib/gitdm: add group-map for Netflix, Alex Bennée, 2021/07/23
- [PULL 27/28] gitlab-ci: Remove the second superfluous macos task, Alex Bennée, 2021/07/23
- [PULL 18/28] contrib/gitdm: add a new interns group-map for GSoC/Outreachy work, Alex Bennée, 2021/07/23
- [PULL 14/28] contrib/gitdm: add domain-map for Crudebyte, Alex Bennée, 2021/07/23
- [PULL 25/28] tests/tcg/configure.sh: add handling for assembler only builds, Alex Bennée, 2021/07/23
- [PULL 28/28] gitlab-ci: Extract OpenSBI job rules to reusable section, Alex Bennée, 2021/07/23
- Re: [PULL for 6.1-rc1 00/28] doc, metadata, plugin and testing updates, Philippe Mathieu-Daudé, 2021/07/23