QEMU-Trivial Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	qemu-trivial@nongnu.org,
	Richard Henderson <richard.henderson@linaro.org>,
	Eduardo Habkost <eduardo@habkost.net>
Subject: Re: [PATCH] hw/i386/pc: Add a proper owner for the ioport memory regions
Date: Wed, 27 May 2026 10:20:00 -0400	[thread overview]
Message-ID: <20260527101952-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20260217141827.534426-1-thuth@redhat.com>

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



      parent reply	other threads:[~2026-05-27 14:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260527101952-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox