* [PATCH] hw/i386/pc: Add a proper owner for the ioport memory regions
@ 2026-02-17 14:18 Thomas Huth
2026-03-11 11:53 ` Michael Tokarev
2026-05-27 14:20 ` Michael S. Tsirkin
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Huth @ 2026-02-17 14:18 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini, Michael S . Tsirkin
Cc: qemu-trivial, Richard Henderson, Eduardo Habkost
From: Thomas Huth <thuth@redhat.com>
Without a proper owner, the memory regions show up in /machine/unattached
in the QOM tree, which is something that should be avoided.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/i386/pc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 0dd3fd01d98..ee72dd47590 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1127,10 +1127,12 @@ void pc_basic_device_init(struct PCMachineState *pcms,
MemoryRegion *ioportF0_io = g_new(MemoryRegion, 1);
X86MachineState *x86ms = X86_MACHINE(pcms);
- memory_region_init_io(ioport80_io, NULL, &ioport80_io_ops, NULL, "ioport80", 1);
+ memory_region_init_io(ioport80_io, OBJECT(pcms), &ioport80_io_ops, NULL,
+ "ioport80", 1);
memory_region_add_subregion(isa_bus->address_space_io, 0x80, ioport80_io);
- memory_region_init_io(ioportF0_io, NULL, &ioportF0_io_ops, NULL, "ioportF0", 1);
+ memory_region_init_io(ioportF0_io, OBJECT(pcms), &ioportF0_io_ops, NULL,
+ "ioportF0", 1);
memory_region_add_subregion(isa_bus->address_space_io, 0xf0, ioportF0_io);
/*
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/i386/pc: Add a proper owner for the ioport memory regions
2026-02-17 14:18 [PATCH] hw/i386/pc: Add a proper owner for the ioport memory regions Thomas Huth
@ 2026-03-11 11:53 ` Michael Tokarev
2026-03-11 13:04 ` Thomas Huth
2026-05-27 14:20 ` Michael S. Tsirkin
1 sibling, 1 reply; 4+ messages in thread
From: Michael Tokarev @ 2026-03-11 11:53 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Paolo Bonzini, Michael S . Tsirkin
Cc: qemu-trivial, Richard Henderson, Eduardo Habkost
On 17.02.2026 17:18, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
>
> Without a proper owner, the memory regions show up in /machine/unattached
> in the QOM tree, which is something that should be avoided.
Does this break migration from/to older releases?
Thanks,
/mjt
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> hw/i386/pc.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 0dd3fd01d98..ee72dd47590 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1127,10 +1127,12 @@ void pc_basic_device_init(struct PCMachineState *pcms,
> MemoryRegion *ioportF0_io = g_new(MemoryRegion, 1);
> X86MachineState *x86ms = X86_MACHINE(pcms);
>
> - memory_region_init_io(ioport80_io, NULL, &ioport80_io_ops, NULL, "ioport80", 1);
> + memory_region_init_io(ioport80_io, OBJECT(pcms), &ioport80_io_ops, NULL,
> + "ioport80", 1);
> memory_region_add_subregion(isa_bus->address_space_io, 0x80, ioport80_io);
>
> - memory_region_init_io(ioportF0_io, NULL, &ioportF0_io_ops, NULL, "ioportF0", 1);
> + memory_region_init_io(ioportF0_io, OBJECT(pcms), &ioportF0_io_ops, NULL,
> + "ioportF0", 1);
> memory_region_add_subregion(isa_bus->address_space_io, 0xf0, ioportF0_io);
>
> /*
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/i386/pc: Add a proper owner for the ioport memory regions
2026-03-11 11:53 ` Michael Tokarev
@ 2026-03-11 13:04 ` Thomas Huth
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2026-03-11 13:04 UTC (permalink / raw)
To: Michael Tokarev, qemu-devel, Paolo Bonzini, Michael S . Tsirkin
Cc: qemu-trivial, Richard Henderson, Eduardo Habkost
On 11/03/2026 12.53, Michael Tokarev wrote:
> On 17.02.2026 17:18, Thomas Huth wrote:
>> From: Thomas Huth <thuth@redhat.com>
>>
>> Without a proper owner, the memory regions show up in /machine/unattached
>> in the QOM tree, which is something that should be avoided.
>
> Does this break migration from/to older releases?
AFAIK the QOM tree ordering is orthogonal to the migration logic ... or did
we ever have any problems with this in the past?
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/i386/pc: Add a proper owner for the ioport memory regions
2026-02-17 14:18 [PATCH] hw/i386/pc: Add a proper owner for the ioport memory regions Thomas Huth
2026-03-11 11:53 ` Michael Tokarev
@ 2026-05-27 14:20 ` Michael S. Tsirkin
1 sibling, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2026-05-27 14:20 UTC (permalink / raw)
To: Thomas Huth
Cc: qemu-devel, Paolo Bonzini, qemu-trivial, Richard Henderson,
Eduardo Habkost
On Tue, Feb 17, 2026 at 03:18:27PM +0100, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
>
> Without a proper owner, the memory regions show up in /machine/unattached
> in the QOM tree, which is something that should be avoided.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
queued, thanks!
> ---
> hw/i386/pc.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 0dd3fd01d98..ee72dd47590 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1127,10 +1127,12 @@ void pc_basic_device_init(struct PCMachineState *pcms,
> MemoryRegion *ioportF0_io = g_new(MemoryRegion, 1);
> X86MachineState *x86ms = X86_MACHINE(pcms);
>
> - memory_region_init_io(ioport80_io, NULL, &ioport80_io_ops, NULL, "ioport80", 1);
> + memory_region_init_io(ioport80_io, OBJECT(pcms), &ioport80_io_ops, NULL,
> + "ioport80", 1);
> memory_region_add_subregion(isa_bus->address_space_io, 0x80, ioport80_io);
>
> - memory_region_init_io(ioportF0_io, NULL, &ioportF0_io_ops, NULL, "ioportF0", 1);
> + memory_region_init_io(ioportF0_io, OBJECT(pcms), &ioportF0_io_ops, NULL,
> + "ioportF0", 1);
> memory_region_add_subregion(isa_bus->address_space_io, 0xf0, ioportF0_io);
>
> /*
> --
> 2.53.0
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-27 14:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-17 14:18 [PATCH] hw/i386/pc: Add a proper owner for the ioport memory regions Thomas Huth
2026-03-11 11:53 ` Michael Tokarev
2026-03-11 13:04 ` Thomas Huth
2026-05-27 14:20 ` Michael S. Tsirkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.