diff mbox series

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

Message ID 20240912070404.2993976-2-fea.wang@sifive.com (mailing list archive)
State New, archived
Headers show
Series Keep transaction attribute in address_space_map() | expand

Commit Message

Fea.Wang Sept. 12, 2024, 7:04 a.m. UTC
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>
---
 system/physmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé Sept. 12, 2024, 7:13 a.m. UTC | #1
On 12/9/24 09:04, Fea.Wang wrote:
> 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...

Cc: qemu-stable@nongnu.org
Fixes: f26404fbee ("Make address_space_map() take a MemTxAttrs argument")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> Signed-off-by: Fea.Wang <fea.wang@sifive.com>
> ---
>   system/physmem.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/system/physmem.c b/system/physmem.c
> index d71a2b1bbd..dc1db3a384 100644
> --- a/system/physmem.c
> +++ b/system/physmem.c
> @@ -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);
>           }
>
Peter Xu Sept. 12, 2024, 1:34 p.m. UTC | #2
On Thu, Sep 12, 2024 at 09:13:40AM +0200, Philippe Mathieu-Daudé wrote:
> On 12/9/24 09:04, Fea.Wang wrote:
> > 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...
> 
> Cc: qemu-stable@nongnu.org
> Fixes: f26404fbee ("Make address_space_map() take a MemTxAttrs argument")
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Thanks, queued with these attached.
diff mbox series

Patch

diff --git a/system/physmem.c b/system/physmem.c
index d71a2b1bbd..dc1db3a384 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -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);
         }