aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@amd.com>2024-05-03 03:44:45 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-06-04 11:53:38 +0200
commit5d1c26029e54bbdcef081cf3a016abf890f2da54 (patch)
tree9af9189d07eca1f1daf8e74a2d89985553beade9 /system
parent1be974bc2658b2f1d9a3aaacda2657dc85c208d2 (diff)
downloadqemu-5d1c26029e54bbdcef081cf3a016abf890f2da54.zip
qemu-5d1c26029e54bbdcef081cf3a016abf890f2da54.tar.gz
qemu-5d1c26029e54bbdcef081cf3a016abf890f2da54.tar.bz2
physmem: Always pass offset + addr to xen_map_cache
Always pass address with offset to xen_map_cache(). This is in preparation for support for grant mappings. Since this is within a block that checks for offset == 0, this has no functional changes. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240529140739.1387692-5-edgar.iglesias@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'system')
-rw-r--r--system/physmem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/system/physmem.c b/system/physmem.c
index 342b7a8..5e6257e 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -2230,7 +2230,8 @@ static void *qemu_ram_ptr_length(RAMBlock *block, ram_addr_t addr,
* In that case just map the requested area.
*/
if (block->offset == 0) {
- return xen_map_cache(block->mr, addr, len, lock, lock,
+ return xen_map_cache(block->mr, block->offset + addr,
+ len, lock, lock,
is_write);
}