All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Xiaoyao Li" <xiaoyao.li@intel.com>,
	qemu-riscv@nongnu.org, qemu-arm@nongnu.org,
	"Artyom Tarasenko" <atar4qemu@gmail.com>
Subject: Re: [PATCH-for-11.0 v6 08/13] hw/sparc64/sun4u: Use fw_cfg_init_io_nodma()
Date: Fri, 19 Dec 2025 18:03:27 +0800	[thread overview]
Message-ID: <aUUi7zLIrFnaZY5h@intel.com> (raw)
In-Reply-To: <83c9ed5a-8b1b-4b80-91f3-8690b2c64019@ilande.co.uk>

> > > The reason that the fw_cfg device lives under ebus on sun4u is because the
> > > ebus device is effectively a PCI-ISA bridge, and the fw_cfg port is mapped
> > > into I/O address space along with other ISA devices. I'm not sure that
> > > setting the parent to the machine is the right thing to do here.
> > 
> > Thanks Philippe and Mark, IIUC, ebus doesn't have the hotplug use case,
> > so it lives long enough like the sun4u/v machine, therefore replacing
> > the parent object "ebus" with machine is safe.
> 
> It's safe, but it still doesn't make sense for sun4u/v because there is no
> machine-level I/O address space as per x86. It really does exist as a
> separate legacy bus under a PCI bridge.

I tend to agree with Philippe's perspective - since it's per-Guest,
setting the parent as machine seems appropriate.

> That's correct, ebus does not support hotplug.
> 
> > Adding a "parent" argument to the generic interface fw_cfg_init_io_nodma()
> > doesn't seem necessary at the moment, since using the default machine as
> > parent seems enough to meet all current needs in QEMU.
> > 
> > What do you think?
> 
> My preference would be add to add the parent argument as it's easy to do,
> and doesn't attempt to enforce x86-type constraints on other architectures.

I think it's not a x86-specific issue. The parent parameter's role is
lifecycle management - if we allowed custom parents, we'd have to
account for various complications that could result from early parent
destruction, so it's not much easy IMO.

Thanks,
Zhao



  reply	other threads:[~2025-12-19  9:39 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03  6:09 [PATCH-for-11.0 v6 00/13] hw/sparc64/sun4u: Use fw_cfg_init_io_nodma() Philippe Mathieu-Daudé
2025-12-03  6:09 ` [PATCH-for-11.0 v6 01/13] hw/ppc/mac: Use fw_cfg_init_mem_nodma() Philippe Mathieu-Daudé
2025-12-03 15:34   ` Zhao Liu
2025-12-03  6:09 ` [PATCH-for-11.0 v6 02/13] hw/sparc/sun4m: " Philippe Mathieu-Daudé
2025-12-03 15:35   ` Zhao Liu
2025-12-03  6:09 ` [PATCH-for-11.0 v6 03/13] hw/nvram/fw_cfg: Factor fw_cfg_init_mem_internal() out Philippe Mathieu-Daudé
2025-12-03  6:09 ` [PATCH-for-11.0 v6 04/13] hw/nvram/fw_cfg: Rename fw_cfg_init_mem_wide() -> fw_cfg_init_mem_dma() Philippe Mathieu-Daudé
2025-12-03  6:09 ` [PATCH-for-11.0 v6 05/13] hw/nvram/fw_cfg: Propagate I/O MemoryRegion to fw_cfg_init_io_dma() Philippe Mathieu-Daudé
2025-12-03 15:39   ` Zhao Liu
2025-12-03 17:13     ` Philippe Mathieu-Daudé
2025-12-03  6:09 ` [PATCH-for-11.0 v6 06/13] hw/nvram/fw_cfg: Factor fw_cfg_init_io_internal() out Philippe Mathieu-Daudé
2025-12-03 15:40   ` Zhao Liu
2025-12-03  6:09 ` [PATCH-for-11.0 v6 07/13] hw/nvram/fw_cfg: Add fw_cfg_init_io_nodma() helper Philippe Mathieu-Daudé
2025-12-03 15:41   ` Zhao Liu
2025-12-03  6:09 ` [PATCH-for-11.0 v6 08/13] hw/sparc64/sun4u: Use fw_cfg_init_io_nodma() Philippe Mathieu-Daudé
2025-12-03 15:51   ` Zhao Liu
2025-12-03 17:14     ` Philippe Mathieu-Daudé
2025-12-04  2:01       ` Mark Cave-Ayland
2025-12-18  8:52         ` Zhao Liu
2025-12-18  9:37           ` Mark Cave-Ayland
2025-12-19 10:03             ` Zhao Liu [this message]
2025-12-18 11:22           ` Philippe Mathieu-Daudé
2025-12-19 10:05             ` Zhao Liu
2025-12-19 16:37             ` Mark Cave-Ayland
2025-12-03  6:09 ` [PATCH-for-11.0 v6 09/13] hw/nvram/fw_cfg: Remove fw_cfg_io_properties::dma_enabled Philippe Mathieu-Daudé
2025-12-03  6:09 ` [PATCH-for-11.0 v6 10/13] hw/i386/x86: Remove X86MachineClass::fwcfg_dma_enabled field Philippe Mathieu-Daudé
2025-12-03  6:09 ` [PATCH-for-11.0 v6 11/13] hw/i386/pc: Remove multiboot.bin Philippe Mathieu-Daudé
2025-12-03  6:09 ` [PATCH-for-11.0 v6 12/13] hw/i386: Assume fw_cfg DMA is always enabled Philippe Mathieu-Daudé
2025-12-03  7:01   ` Philippe Mathieu-Daudé
2025-12-03  6:09 ` [PATCH-for-11.0 v6 13/13] hw/i386: Remove linuxboot.bin Philippe Mathieu-Daudé
2025-12-03  7:01 ` [PATCH-for-11.0 v6 00/13] hw/sparc64/sun4u: Use fw_cfg_init_io_nodma() Philippe Mathieu-Daudé
2025-12-04  8:04 ` Michael S. Tsirkin

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=aUUi7zLIrFnaZY5h@intel.com \
    --to=zhao1.liu@intel.com \
    --cc=atar4qemu@gmail.com \
    --cc=imammedo@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=xiaoyao.li@intel.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 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.