[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 07/27] hw/i386/x86: Remove X86MachineClass::fwcfg_dma_enab
From: |
Igor Mammedov |
Subject: |
Re: [PATCH v4 07/27] hw/i386/x86: Remove X86MachineClass::fwcfg_dma_enabled field |
Date: |
Fri, 9 May 2025 17:44:00 +0200 |
On Fri, 9 May 2025 17:41:25 +0200
Igor Mammedov <imammedo@redhat.com> wrote:
> On Thu, 8 May 2025 15:35:30 +0200
> Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> > The X86MachineClass::fwcfg_dma_enabled boolean was only used
> > by the pc-q35-2.6 and pc-i440fx-2.6 machines, which got
> > removed. Remove it and simplify.
> >
> > 'multiboot.bin' isn't used anymore, we'll remove it in the
> > next commit.
> >
> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > ---
> > include/hw/i386/x86.h | 2 --
> > hw/i386/microvm.c | 3 ---
> > hw/i386/multiboot.c | 7 +------
> > hw/i386/x86-common.c | 3 +--
> > hw/i386/x86.c | 2 --
> > 5 files changed, 2 insertions(+), 15 deletions(-)
> >
> > diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
> > index fc460b82f82..29d37af11e6 100644
> > --- a/include/hw/i386/x86.h
> > +++ b/include/hw/i386/x86.h
> > @@ -29,8 +29,6 @@
> > struct X86MachineClass {
> > MachineClass parent;
> >
> > - /* use DMA capable linuxboot option rom */
> > - bool fwcfg_dma_enabled;
> > /* CPU and apic information: */
> > bool apic_xrupt_override;
> > };
> > diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
> > index e0daf0d4fc3..b1262fb1523 100644
> > --- a/hw/i386/microvm.c
> > +++ b/hw/i386/microvm.c
> > @@ -637,7 +637,6 @@ GlobalProperty microvm_properties[] = {
> >
> > static void microvm_class_init(ObjectClass *oc, const void *data)
> > {
> > - X86MachineClass *x86mc = X86_MACHINE_CLASS(oc);
> > MicrovmMachineClass *mmc = MICROVM_MACHINE_CLASS(oc);
> > MachineClass *mc = MACHINE_CLASS(oc);
> > HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
> > @@ -671,8 +670,6 @@ static void microvm_class_init(ObjectClass *oc, const
> > void *data)
> > hc->unplug_request = microvm_device_unplug_request_cb;
> > hc->unplug = microvm_device_unplug_cb;
> >
> > - x86mc->fwcfg_dma_enabled = true;
> > -
> > object_class_property_add(oc, MICROVM_MACHINE_RTC, "OnOffAuto",
> > microvm_machine_get_rtc,
> > microvm_machine_set_rtc,
> > diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
> > index 6e6b96bc345..bfa7e8f1e83 100644
> > --- a/hw/i386/multiboot.c
> > +++ b/hw/i386/multiboot.c
> > @@ -153,7 +153,6 @@ int load_multiboot(X86MachineState *x86ms,
> > int kernel_file_size,
> > uint8_t *header)
> > {
> > - bool multiboot_dma_enabled =
> > X86_MACHINE_GET_CLASS(x86ms)->fwcfg_dma_enabled;
> > int i, is_multiboot = 0;
> > uint32_t flags = 0;
> > uint32_t mh_entry_addr;
> > @@ -402,11 +401,7 @@ int load_multiboot(X86MachineState *x86ms,
> > fw_cfg_add_bytes(fw_cfg, FW_CFG_INITRD_DATA, mb_bootinfo_data,
> > sizeof(bootinfo));
> >
> > - if (multiboot_dma_enabled) {
> > - option_rom[nb_option_roms].name = "multiboot_dma.bin";
> > - } else {
> > - option_rom[nb_option_roms].name = "multiboot.bin";
>
> shouldn't we remove "multiboot.bin" as well?
never mind, I see it's being removed by the next patch
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
- Re: [PATCH v4 05/27] hw/nvram/fw_cfg: Factor fw_cfg_init_mem_internal() out, (continued)
- [PATCH v4 06/27] hw/nvram/fw_cfg: Rename fw_cfg_init_mem_wide() -> fw_cfg_init_mem_dma(), Philippe Mathieu-Daudé, 2025/05/08
- [PATCH v4 07/27] hw/i386/x86: Remove X86MachineClass::fwcfg_dma_enabled field, Philippe Mathieu-Daudé, 2025/05/08
- [PATCH v4 08/27] hw/i386/pc: Remove multiboot.bin, Philippe Mathieu-Daudé, 2025/05/08
- [PATCH v4 09/27] hw/nvram/fw_cfg: Remove fw_cfg_io_properties::dma_enabled, Philippe Mathieu-Daudé, 2025/05/08
- [PATCH v4 10/27] hw/i386/pc: Remove linuxboot.bin, Philippe Mathieu-Daudé, 2025/05/08
- [PATCH v4 11/27] hw/i386/pc: Remove pc_compat_2_6[] array, Philippe Mathieu-Daudé, 2025/05/08