From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: Zhao Liu <zhao1.liu@intel.com>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
Igor Mammedov <imammedo@redhat.com>,
Xiaoyao Li <xiaoyao.li@intel.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
qemu-riscv@nongnu.org, qemu-arm@nongnu.org
Subject: Re: [PATCH-for-11.0 v6 00/13] hw/sparc64/sun4u: Use fw_cfg_init_io_nodma()
Date: Thu, 4 Dec 2025 03:04:53 -0500 [thread overview]
Message-ID: <20251204030433-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20251203060942.57851-1-philmd@linaro.org>
On Wed, Dec 03, 2025 at 07:09:28AM +0100, Philippe Mathieu-Daudé wrote:
> Hi Zhao,
>
> This is my answer to this comment of yours:
>
> > Although other callers of fw_cfg_init_io_dma() besides x86 also pass
> > DMA arguments to create DMA-enabled FwCfgIoState, the "dma_enabled"
> > property of FwCfgIoState cannot yet be removed, because Sun4u and Sun4v
> > still create DMA-disabled FwCfgIoState (bypass fw_cfg_init_io_dma()) in
> > sun4uv_init() (hw/sparc64/sun4u.c).
> >
> > Maybe reusing fw_cfg_init_io_dma() for them would be a better choice, or
> > adding fw_cfg_init_io_nodma(). However, before that, first simplify the
> > handling of FwCfgState in x86.
> >
> > Considering that FwCfgIoState in x86 enables DMA by default, remove the
> > handling for DMA-disabled cases and replace DMA checks with assertions
> > to ensure that the default DMA-enabled setting is not broken.
>
> My series is to apply just after this patch of your series:
>
> [PATCH v5 10/28] hw/mips/loongson3_virt: Prefer using fw_cfg_init_mem_nodma()
>
> Regards,
>
> Phil.
pc/fwcfg things:
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> Based-on: <20251202162835.3227894-11-zhao1.liu@intel.com>
>
> Philippe Mathieu-Daudé (12):
> hw/ppc/mac: Use fw_cfg_init_mem_nodma()
> hw/sparc/sun4m: Use fw_cfg_init_mem_nodma()
> hw/nvram/fw_cfg: Factor fw_cfg_init_mem_internal() out
> hw/nvram/fw_cfg: Rename fw_cfg_init_mem_wide() ->
> fw_cfg_init_mem_dma()
> hw/nvram/fw_cfg: Propagate I/O MemoryRegion to fw_cfg_init_io_dma()
> hw/nvram/fw_cfg: Factor fw_cfg_init_io_internal() out
> hw/nvram/fw_cfg: Add fw_cfg_init_io_nodma() helper
> hw/sparc64/sun4u: Use fw_cfg_init_io_nodma()
> hw/nvram/fw_cfg: Remove fw_cfg_io_properties::dma_enabled
> hw/i386/x86: Remove X86MachineClass::fwcfg_dma_enabled field
> hw/i386/pc: Remove multiboot.bin
> hw/i386: Remove linuxboot.bin
>
> Zhao Liu (1):
> hw/i386: Assume fw_cfg DMA is always enabled
>
> include/hw/i386/x86.h | 2 -
> include/hw/nvram/fw_cfg.h | 11 +-
> pc-bios/optionrom/optionrom.h | 4 -
> hw/arm/virt.c | 2 +-
> hw/i386/fw_cfg.c | 19 +--
> hw/i386/microvm.c | 6 +-
> hw/i386/multiboot.c | 7 +-
> hw/i386/pc.c | 7 +-
> hw/i386/x86-common.c | 7 +-
> hw/i386/x86.c | 2 -
> hw/loongarch/fw_cfg.c | 4 +-
> hw/nvram/fw_cfg.c | 61 ++++----
> hw/ppc/mac_newworld.c | 11 +-
> hw/ppc/mac_oldworld.c | 11 +-
> hw/riscv/virt.c | 4 +-
> hw/sparc/sun4m.c | 12 +-
> hw/sparc64/sun4u.c | 9 +-
> pc-bios/meson.build | 2 -
> pc-bios/multiboot.bin | Bin 1024 -> 0 bytes
> pc-bios/optionrom/Makefile | 2 +-
> pc-bios/optionrom/linuxboot.S | 195 -------------------------
> pc-bios/optionrom/multiboot.S | 232 -----------------------------
> pc-bios/optionrom/multiboot_dma.S | 234 +++++++++++++++++++++++++++++-
> 23 files changed, 302 insertions(+), 542 deletions(-)
> delete mode 100644 pc-bios/multiboot.bin
> delete mode 100644 pc-bios/optionrom/linuxboot.S
> delete mode 100644 pc-bios/optionrom/multiboot.S
>
> --
> 2.51.0
>
>
prev parent reply other threads:[~2025-12-04 8:06 UTC|newest]
Thread overview: 26+ 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-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 [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=20251204030433-mutt-send-email-mst@kernel.org \
--to=mst@redhat.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 \
--cc=zhao1.liu@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 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).