Skip to contentSkip to conversation

Keep transaction attribute in address_space_map()

PATCH In review Fea.Wang 3 participants 4 messages Sep 12, 2024

lore
Share & tools
lore

Fea.Wang

author
#0 lore raw

cover Keep transaction attribute in address_space_map()

The follow-up transactions may use the data in the attribution, so keep the value of attribution from the function parameter.

Fea.Wang (1):
softmmu/physmem.c: Keep transaction attribute in address_space_map()

 system/physmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 1/1 softmmu/physmem.c: Keep transaction attribute in address_space_map()

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.

---
 system/physmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
system/physmem.c +1 -1
index d71a2b1bbd..dc1db3a384 100644
@@ -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);
         }
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH 1/1] softmmu/physmem.c: Keep transaction attribute in address_space_map()

Quoted 4 lines · Fea.Wang

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.

Doh, long standing bug...

Fixes f26404fbee ("Make address_space_map() take a MemTxAttrs argument")
Quoted 18 lines
---
  system/physmem.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
system/physmem.c +1 -1
index d71a2b1bbd..dc1db3a384 100644
@@ -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);
          }
 
#3 lore raw

Re: [PATCH 1/1] softmmu/physmem.c: Keep transaction attribute in address_space_map()

Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 4 lines · Fea.Wang

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.

Doh, long standing bug...

Fixes f26404fbee ("Make address_space_map() take a MemTxAttrs argument")

Thanks, queued with these attached.

Signature · 1 line
Peter Xu