aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorAaron Lindsay <aaron@os.amperecomputing.com>2021-03-12 17:28:09 +0000
committerAlex Bennée <alex.bennee@linaro.org>2021-03-17 07:17:46 +0000
commit787148bf928a54b5cc86f5b434f9399e9737679c (patch)
tree11c5c460da6162f70d9b70b2a59ae57a8bf7cbb5 /contrib
parent279d0a5b1e6b81f88f95b889de8356a331ea8380 (diff)
plugins: Expose physical addresses instead of device offsets
This allows plugins to query for full virtual-to-physical address translation for a given `qemu_plugin_hwaddr` and stops exposing the offset within the device itself. As this change breaks the API, QEMU_PLUGIN_VERSION is incremented. Signed-off-by: Aaron Lindsay <aaron@os.amperecomputing.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210309202802.211756-1-aaron@os.amperecomputing.com> Message-Id: <20210312172821.31647-3-alex.bennee@linaro.org>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/plugins/hotpages.c2
-rw-r--r--contrib/plugins/hwprofile.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c
index eacc678eac..bf53267532 100644
--- a/contrib/plugins/hotpages.c
+++ b/contrib/plugins/hotpages.c
@@ -122,7 +122,7 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo,
}
} else {
if (hwaddr && !qemu_plugin_hwaddr_is_io(hwaddr)) {
- page = (uint64_t) qemu_plugin_hwaddr_device_offset(hwaddr);
+ page = (uint64_t) qemu_plugin_hwaddr_phys_addr(hwaddr);
} else {
page = vaddr;
}
diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c
index 6dac1d5f85..faf216ac00 100644
--- a/contrib/plugins/hwprofile.c
+++ b/contrib/plugins/hwprofile.c
@@ -201,7 +201,7 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo,
return;
} else {
const char *name = qemu_plugin_hwaddr_device_name(hwaddr);
- uint64_t off = qemu_plugin_hwaddr_device_offset(hwaddr);
+ uint64_t off = qemu_plugin_hwaddr_phys_addr(hwaddr);
bool is_write = qemu_plugin_mem_is_store(meminfo);
DeviceCounts *counts;