softmmu/physmem.c: Keep transaction attribute in address_space_map()
authorFea.Wang <fea.wang@sifive.com>
Thu, 12 Sep 2024 07:04:04 +0000 (15:04 +0800)
committerPeter Xu <peterx@redhat.com>
Wed, 18 Sep 2024 18:27:39 +0000 (14:27 -0400)
The follow-up transactions may use the data in the attribution, so keep
the value of attribution from the function parameter just as
flatview_translate() above.

Signed-off-by: Fea.Wang <fea.wang@sifive.com>
Cc: qemu-stable@nongnu.org
Fixes: f26404fbee ("Make address_space_map() take a MemTxAttrs argument")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20240912070404.2993976-2-fea.wang@sifive.com
Signed-off-by: Peter Xu <peterx@redhat.com>
system/physmem.c

index d71a2b1bbde6118555d5502acd0a3367dffb0d62..dc1db3a38469876121444b4c0c642fbbc74cd388 100644 (file)
@@ -3274,7 +3274,7 @@ void *address_space_map(AddressSpace *as,
         bounce->len = l;
 
         if (!is_write) {
-            flatview_read(fv, addr, MEMTXATTRS_UNSPECIFIED,
+            flatview_read(fv, addr, attrs,
                           bounce->buffer, l);
         }