* [PATCH] ds1225y: Fix nvram MemoryRegion owner
@ 2025-10-27 1:05 Akihiko Odaki
2025-10-27 9:37 ` Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Akihiko Odaki @ 2025-10-27 1:05 UTC (permalink / raw)
To: qemu-devel
Cc: Hervé Poussineau, Aleksandar Rikalo, Paolo Bonzini,
Akihiko Odaki
s points to the MemoryRegion itself. dev points to DS1225Y, the real
owner.
Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
---
hw/nvram/ds1225y.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/nvram/ds1225y.c b/hw/nvram/ds1225y.c
index dbfd0d2e5369..0945e36652e9 100644
--- a/hw/nvram/ds1225y.c
+++ b/hw/nvram/ds1225y.c
@@ -126,7 +126,7 @@ static void nvram_sysbus_realize(DeviceState *dev, Error **errp)
s->contents = g_malloc0(s->chip_size);
- memory_region_init_io(&s->iomem, OBJECT(s), &nvram_ops, s,
+ memory_region_init_io(&s->iomem, OBJECT(dev), &nvram_ops, s,
"nvram", s->chip_size);
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem);
---
base-commit: c85ba2d7a4056595166689890285105579db446a
change-id: 20251027-ds1225y-0cbe83430a78
Best regards,
--
Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ds1225y: Fix nvram MemoryRegion owner
2025-10-27 1:05 [PATCH] ds1225y: Fix nvram MemoryRegion owner Akihiko Odaki
@ 2025-10-27 9:37 ` Philippe Mathieu-Daudé
2025-10-27 19:13 ` Philippe Mathieu-Daudé
2025-10-28 12:28 ` Michael Tokarev
2 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-10-27 9:37 UTC (permalink / raw)
To: Akihiko Odaki, qemu-devel
Cc: Hervé Poussineau, Aleksandar Rikalo, Paolo Bonzini
On 27/10/25 02:05, Akihiko Odaki wrote:
> s points to the MemoryRegion itself. dev points to DS1225Y, the real
> owner.
>
> Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
> ---
> hw/nvram/ds1225y.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
and queued, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ds1225y: Fix nvram MemoryRegion owner
2025-10-27 1:05 [PATCH] ds1225y: Fix nvram MemoryRegion owner Akihiko Odaki
2025-10-27 9:37 ` Philippe Mathieu-Daudé
@ 2025-10-27 19:13 ` Philippe Mathieu-Daudé
2025-10-28 12:28 ` Michael Tokarev
2 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-10-27 19:13 UTC (permalink / raw)
To: Akihiko Odaki, qemu-devel
Cc: Hervé Poussineau, Aleksandar Rikalo, Paolo Bonzini
On 27/10/25 02:05, Akihiko Odaki wrote:
> s points to the MemoryRegion itself. dev points to DS1225Y, the real
> owner.
>
> Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
> ---
> hw/nvram/ds1225y.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Queued, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ds1225y: Fix nvram MemoryRegion owner
2025-10-27 1:05 [PATCH] ds1225y: Fix nvram MemoryRegion owner Akihiko Odaki
2025-10-27 9:37 ` Philippe Mathieu-Daudé
2025-10-27 19:13 ` Philippe Mathieu-Daudé
@ 2025-10-28 12:28 ` Michael Tokarev
2025-10-28 16:39 ` Akihiko Odaki
2 siblings, 1 reply; 5+ messages in thread
From: Michael Tokarev @ 2025-10-28 12:28 UTC (permalink / raw)
To: Akihiko Odaki, qemu-devel
Cc: Hervé Poussineau, Aleksandar Rikalo, Paolo Bonzini,
qemu-stable
On 10/27/25 04:05, Akihiko Odaki wrote:
> s points to the MemoryRegion itself. dev points to DS1225Y, the real
> owner.
>
> Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
> ---
> hw/nvram/ds1225y.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/nvram/ds1225y.c b/hw/nvram/ds1225y.c
> index dbfd0d2e5369..0945e36652e9 100644
> --- a/hw/nvram/ds1225y.c
> +++ b/hw/nvram/ds1225y.c
> @@ -126,7 +126,7 @@ static void nvram_sysbus_realize(DeviceState *dev, Error **errp)
>
> s->contents = g_malloc0(s->chip_size);
>
> - memory_region_init_io(&s->iomem, OBJECT(s), &nvram_ops, s,
> + memory_region_init_io(&s->iomem, OBJECT(dev), &nvram_ops, s,
> "nvram", s->chip_size);
> sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem);
What's the impact of this issue?
Should it go to the stable series perhaps?
Thanks,
/mjt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ds1225y: Fix nvram MemoryRegion owner
2025-10-28 12:28 ` Michael Tokarev
@ 2025-10-28 16:39 ` Akihiko Odaki
0 siblings, 0 replies; 5+ messages in thread
From: Akihiko Odaki @ 2025-10-28 16:39 UTC (permalink / raw)
To: Michael Tokarev, qemu-devel
Cc: Hervé Poussineau, Aleksandar Rikalo, Paolo Bonzini,
qemu-stable
On 2025/10/28 21:28, Michael Tokarev wrote:
> On 10/27/25 04:05, Akihiko Odaki wrote:
>> s points to the MemoryRegion itself. dev points to DS1225Y, the real
>> owner.
>>
>> Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
>> ---
>> hw/nvram/ds1225y.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/nvram/ds1225y.c b/hw/nvram/ds1225y.c
>> index dbfd0d2e5369..0945e36652e9 100644
>> --- a/hw/nvram/ds1225y.c
>> +++ b/hw/nvram/ds1225y.c
>> @@ -126,7 +126,7 @@ static void nvram_sysbus_realize(DeviceState *dev,
>> Error **errp)
>> s->contents = g_malloc0(s->chip_size);
>> - memory_region_init_io(&s->iomem, OBJECT(s), &nvram_ops, s,
>> + memory_region_init_io(&s->iomem, OBJECT(dev), &nvram_ops, s,
>> "nvram", s->chip_size);
>> sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem);
>
> What's the impact of this issue?
> Should it go to the stable series perhaps?
There should be no perceivable impact. It causes memory leak if the
device is hotpluggable, but it is apparently not the case.
The same goes for "[PATCH] hw/riscv/riscv-iommu: Fix MemoryRegion owner":
https://lore.kernel.org/qemu-devel/20251027-iommu-v1-1-0fc52a02a273@rsg.ci.i.u-tokyo.ac.jp/
Regards,
Akihiko Odaki
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-28 16:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 1:05 [PATCH] ds1225y: Fix nvram MemoryRegion owner Akihiko Odaki
2025-10-27 9:37 ` Philippe Mathieu-Daudé
2025-10-27 19:13 ` Philippe Mathieu-Daudé
2025-10-28 12:28 ` Michael Tokarev
2025-10-28 16:39 ` Akihiko Odaki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).