]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/i386: Assume fw_cfg DMA is always enabled
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 8 Jan 2026 03:30:38 +0000 (11:30 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 7 Feb 2026 13:37:52 +0000 (14:37 +0100)
commit04ddbb137da180e684e8a1c7fafdae7d1426fd4d
treef3af6c18be7d11815d9b4aa50dff4a785a350624
parente818b4b10969927019a0a2be5b71aad7a8e0f6a7
hw/i386: Assume fw_cfg DMA is always enabled

Now all calls of x86 machines to fw_cfg_init_io_dma() pass DMA
arguments, so the FWCfgState (FWCfgIoState) created by x86 machines
enables DMA by default.

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.

Then 'linuxboot.bin' isn't used anymore, and it will be removed in the
next commit.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Link: https://lore.kernel.org/r/20260108033051.777361-15-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/i386/fw_cfg.c
hw/i386/x86-common.c