From nobody Fri Dec 12 14:05:31 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1764691670; cv=none; d=zohomail.com; s=zohoarc; b=H/PMXButUgggoVpM90BY7t9IMmrMrzKi9dWlRbDtjjmUZ+v07F927EpzsRjPLzbykZUetPXoUnSib4p2mV7OM2S0Y+zRamN/ps+dGlRMTPG+mz9PpmqzN/vtVLXTMswBt94dOgm1tmCkWpzl63LjK1UfXIkOZ2wGeO8vhkFLB90= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764691670; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gyUfxHVFuI9tpUZqvC1PUnmxNYSgP8OQmSy7V907jXw=; b=N4+5H9ltV6g/mQMRYm24YYWF3ylcYMe6FoaA/9kLUxDOzTJvXz0gCN0/EQzA0K+GegvWGeiE6WY1iXm7zVZpF/414IIuf9dcGSNOszECHnFiid/06vcJqcxLPSCr2vKzfpgMar5DFMN7wyECJSy7nD/zWAlTTXSMkm3gWydkT0k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764691670053912.5621027418541; Tue, 2 Dec 2025 08:07:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vQStx-0008Ry-4Q; Tue, 02 Dec 2025 11:06:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vQStF-0006MA-NW; Tue, 02 Dec 2025 11:06:14 -0500 Received: from mgamail.intel.com ([192.198.163.7]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vQStD-0007EB-5q; Tue, 02 Dec 2025 11:06:09 -0500 Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2025 08:06:05 -0800 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.39]) by orviesa005.jf.intel.com with ESMTP; 02 Dec 2025 08:05:56 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1764691567; x=1796227567; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+z5nIoH78wA+yFYRCQXaohR6ZmUY0zV8s02/chMIeGk=; b=ee8+27flE6g1SPQGNm2YlN3+KUVqdcBxnr32FFOpLDz3pgXlV88KxyCH 5WCUhvxLymc/M06zWnOBPUw2phqDs5Shrbu+Z1k0nhlM2EHjtCzsu0aM4 KolMbmr3VLSiuO9fq89MPwJoQZsqPECPVpRK5T2u7c4TUH61BKyEVM1/s i+R43z0JNUFBEOk+py2ZHheJQmXR3LsD6TfhczCuHiUC7/Rs9352dK5aT IgmbfgAA4+eU//0CX+L4z7fYM2yMy/+c8J3lT5IEsOAhzaFI/Dw0ux6Nt IOmoCdZ4W7J/VKxxPJCfaWzDs8/bkaSHjgNHl2d1zUbabfFx0/4H4P9vH A==; X-CSE-ConnectionGUID: fhBievr3QnCvh878M2/pOQ== X-CSE-MsgGUID: y4dVYOOWTBqGSyS330VBog== X-IronPort-AV: E=McAfee;i="6800,10657,11630"; a="92142667" X-IronPort-AV: E=Sophos;i="6.20,243,1758610800"; d="scan'208";a="92142667" X-CSE-ConnectionGUID: YspVYPo2RVu6Bh2S79YSnw== X-CSE-MsgGUID: KQtfBojEQcaBf/c83+ZLeA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.20,243,1758610800"; d="scan'208";a="199537367" From: Zhao Liu To: Paolo Bonzini , "Michael S . Tsirkin" , Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Thomas Huth Cc: qemu-devel@nongnu.org, devel@lists.libvirt.org, kvm@vger.kernel.org, qemu-riscv@nongnu.org, qemu-arm@nongnu.org, Richard Henderson , Sergio Lopez , Gerd Hoffmann , Peter Maydell , Laurent Vivier , Jiaxun Yang , Yi Liu , Eduardo Habkost , Alistair Francis , Daniel Henrique Barboza , Marcelo Tosatti , Weiwei Li , Amit Shah , Xiaoyao Li , Yanan Wang , Helge Deller , Palmer Dabbelt , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Ani Sinha , Fabiano Rosas , Liu Zhiwei , =?UTF-8?q?Cl=C3=A9ment=20Mathieu--Drif?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Huacai Chen , Jason Wang , Mark Cave-Ayland , BALATON Zoltan , Peter Krempa , Jiri Denemark , Zhao Liu Subject: [PATCH v5 13/28] hw/i386/x86: Remove X86MachineClass::fwcfg_dma_enabled field Date: Wed, 3 Dec 2025 00:28:20 +0800 Message-Id: <20251202162835.3227894-14-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251202162835.3227894-1-zhao1.liu@intel.com> References: <20251202162835.3227894-1-zhao1.liu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.198.163.7; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1764691670777019201 From: Philippe Mathieu-Daud=C3=A9 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=C3=A9 Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Signed-off-by: Zhao Liu --- hw/i386/microvm.c | 3 --- hw/i386/multiboot.c | 7 +------ hw/i386/x86-common.c | 3 +-- hw/i386/x86.c | 2 -- include/hw/i386/x86.h | 2 -- 5 files changed, 2 insertions(+), 15 deletions(-) diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 94d22a232aca..812f2ac2f983 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -640,7 +640,6 @@ GlobalProperty microvm_properties[] =3D { =20 static void microvm_class_init(ObjectClass *oc, const void *data) { - X86MachineClass *x86mc =3D X86_MACHINE_CLASS(oc); MicrovmMachineClass *mmc =3D MICROVM_MACHINE_CLASS(oc); MachineClass *mc =3D MACHINE_CLASS(oc); HotplugHandlerClass *hc =3D HOTPLUG_HANDLER_CLASS(oc); @@ -674,8 +673,6 @@ static void microvm_class_init(ObjectClass *oc, const v= oid *data) hc->unplug_request =3D microvm_device_unplug_request_cb; hc->unplug =3D microvm_device_unplug_cb; =20 - x86mc->fwcfg_dma_enabled =3D 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 78690781b74c..3b993126edb6 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 =3D X86_MACHINE_GET_CLASS(x86ms)->fwcfg_dma= _enabled; int i, is_multiboot =3D 0; uint32_t flags =3D 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)); =20 - if (multiboot_dma_enabled) { - option_rom[nb_option_roms].name =3D "multiboot_dma.bin"; - } else { - option_rom[nb_option_roms].name =3D "multiboot.bin"; - } + option_rom[nb_option_roms].name =3D "multiboot_dma.bin"; option_rom[nb_option_roms].bootindex =3D 0; nb_option_roms++; =20 diff --git a/hw/i386/x86-common.c b/hw/i386/x86-common.c index 60b7ab80433a..1ee55382dab8 100644 --- a/hw/i386/x86-common.c +++ b/hw/i386/x86-common.c @@ -645,7 +645,6 @@ void x86_load_linux(X86MachineState *x86ms, int acpi_data_size, bool pvh_enabled) { - bool linuxboot_dma_enabled =3D X86_MACHINE_GET_CLASS(x86ms)->fwcfg_dma= _enabled; uint16_t protocol; int setup_size, kernel_size, cmdline_size; int dtb_size, setup_data_offset; @@ -1004,7 +1003,7 @@ void x86_load_linux(X86MachineState *x86ms, =20 option_rom[nb_option_roms].bootindex =3D 0; option_rom[nb_option_roms].name =3D "linuxboot.bin"; - if (linuxboot_dma_enabled && fw_cfg_dma_enabled(fw_cfg)) { + if (fw_cfg_dma_enabled(fw_cfg)) { option_rom[nb_option_roms].name =3D "linuxboot_dma.bin"; } nb_option_roms++; diff --git a/hw/i386/x86.c b/hw/i386/x86.c index f80533df1c54..dbf104d60af4 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -375,14 +375,12 @@ static void x86_machine_initfn(Object *obj) static void x86_machine_class_init(ObjectClass *oc, const void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); - X86MachineClass *x86mc =3D X86_MACHINE_CLASS(oc); NMIClass *nc =3D NMI_CLASS(oc); =20 mc->cpu_index_to_instance_props =3D x86_cpu_index_to_props; mc->get_default_cpu_node_id =3D x86_get_default_cpu_node_id; mc->possible_cpu_arch_ids =3D x86_possible_cpu_arch_ids; mc->kvm_type =3D x86_kvm_type; - x86mc->fwcfg_dma_enabled =3D true; nc->nmi_monitor_handler =3D x86_nmi; =20 object_class_property_add(oc, X86_MACHINE_SMM, "OnOffAuto", diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index 8755cad50a36..201eee80eb73 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -30,8 +30,6 @@ struct X86MachineClass { MachineClass parent; =20 - /* use DMA capable linuxboot option rom */ - bool fwcfg_dma_enabled; /* CPU and apic information: */ bool apic_xrupt_override; }; --=20 2.34.1