From: Corey Minyard <cminyard@mvista.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, Zhao Liu <zhao1.liu@intel.com>,
Yi Liu <yi.l.liu@intel.com>, Paolo Bonzini <pbonzini@redhat.com>,
Thomas Huth <thuth@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Ani Sinha <anisinha@redhat.com>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
Aurelien Jarno <aurelien@aurel32.net>,
Eduardo Habkost <eduardo@habkost.net>,
Yanan Wang <wangyanan55@huawei.com>
Subject: Re: [PATCH v2 04/10] hw/core/boards: Remove MachineClass::smbus_no_migration_support field
Date: Mon, 9 Mar 2026 10:41:08 -0500 [thread overview]
Message-ID: <aa7qFOP-GTATfG0u@mail.minyard.net> (raw)
In-Reply-To: <20260309145013.44327-5-philmd@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 5529 bytes --]
On Mon, Mar 09, 2026 at 03:50:06PM +0100, Philippe Mathieu-Daudé wrote:
> The MachineClass::smbus_no_migration_support boolean was only used
> by the pc-q35-3.1 and pc-i440fx-3.1 machines, which got removed.
> Remove it, along with pm_smbus_vmstate_needed().
>
> Use the unconditional VMSTATE_BOOL() and VMSTATE_STRUCT() macros.
Nice.
Acked-by: Corey Minyard <corey@minyard.net>
or do you want me to handle it?
-corey
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Message-Id: <20260307152635.83893-5-philmd@linaro.org>
> ---
> include/hw/core/boards.h | 1 -
> include/hw/i2c/pm_smbus.h | 7 -------
> hw/acpi/piix4.c | 8 +-------
> hw/i2c/pm_smbus.c | 7 -------
> hw/i2c/smbus_eeprom.c | 4 +---
> hw/i2c/smbus_ich9.c | 10 ++--------
> 6 files changed, 4 insertions(+), 33 deletions(-)
>
> diff --git a/include/hw/core/boards.h b/include/hw/core/boards.h
> index 9ad2a7d5c97..e15dbcea83b 100644
> --- a/include/hw/core/boards.h
> +++ b/include/hw/core/boards.h
> @@ -314,7 +314,6 @@ struct MachineClass {
> bool auto_enable_numa_with_memhp;
> bool auto_enable_numa_with_memdev;
> bool ignore_boot_device_suffixes;
> - bool smbus_no_migration_support;
> bool nvdimm_supported;
> bool numa_mem_supported;
> bool auto_enable_numa;
> diff --git a/include/hw/i2c/pm_smbus.h b/include/hw/i2c/pm_smbus.h
> index dafe0df4f69..62bbd45e803 100644
> --- a/include/hw/i2c/pm_smbus.h
> +++ b/include/hw/i2c/pm_smbus.h
> @@ -44,13 +44,6 @@ typedef struct PMSMBus {
>
> void pm_smbus_init(DeviceState *parent, PMSMBus *smb, bool force_aux_blk);
>
> -/*
> - * For backwards compatibility on migration, older versions don't have
> - * working migration for pm_smbus, this lets us ignore the migrations
> - * for older machine versions.
> - */
> -bool pm_smbus_vmstate_needed(void);
> -
> extern const VMStateDescription pmsmb_vmstate;
>
> #endif /* PM_SMBUS_H */
> diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
> index 138ac3d3940..43860d12278 100644
> --- a/hw/acpi/piix4.c
> +++ b/hw/acpi/piix4.c
> @@ -205,11 +205,6 @@ static const VMStateDescription vmstate_cpuhp_state = {
> }
> };
>
> -static bool piix4_vmstate_need_smbus(void *opaque, int version_id)
> -{
> - return pm_smbus_vmstate_needed();
> -}
> -
> /*
> * This is a fudge to turn off the acpi_index field,
> * whose test was always broken on piix4 with 6.2 and older machine types.
> @@ -238,8 +233,7 @@ static const VMStateDescription vmstate_acpi = {
> VMSTATE_UINT16(ar.pm1.evt.en, PIIX4PMState),
> VMSTATE_UINT16(ar.pm1.cnt.cnt, PIIX4PMState),
> VMSTATE_STRUCT(apm, PIIX4PMState, 0, vmstate_apm, APMState),
> - VMSTATE_STRUCT_TEST(smb, PIIX4PMState, piix4_vmstate_need_smbus, 3,
> - pmsmb_vmstate, PMSMBus),
> + VMSTATE_STRUCT(smb, PIIX4PMState, 3, pmsmb_vmstate, PMSMBus),
> VMSTATE_TIMER_PTR(ar.tmr.timer, PIIX4PMState),
> VMSTATE_INT64(ar.tmr.overflow_time, PIIX4PMState),
> VMSTATE_STRUCT(ar.gpe, PIIX4PMState, 2, vmstate_gpe, ACPIGPE),
> diff --git a/hw/i2c/pm_smbus.c b/hw/i2c/pm_smbus.c
> index ead53d2724d..5654d516382 100644
> --- a/hw/i2c/pm_smbus.c
> +++ b/hw/i2c/pm_smbus.c
> @@ -443,13 +443,6 @@ static const MemoryRegionOps pm_smbus_ops = {
> .endianness = DEVICE_LITTLE_ENDIAN,
> };
>
> -bool pm_smbus_vmstate_needed(void)
> -{
> - MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
> -
> - return !mc->smbus_no_migration_support;
> -}
> -
> const VMStateDescription pmsmb_vmstate = {
> .name = "pmsmb",
> .version_id = 1,
> diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c
> index d9ac556a0ab..693d4762205 100644
> --- a/hw/i2c/smbus_eeprom.c
> +++ b/hw/i2c/smbus_eeprom.c
> @@ -88,11 +88,9 @@ static int eeprom_write_data(SMBusDevice *dev, uint8_t *buf, uint8_t len)
>
> static bool smbus_eeprom_vmstate_needed(void *opaque)
> {
> - MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
> SMBusEEPROMDevice *eeprom = opaque;
>
> - return (eeprom->accessed || smbus_vmstate_needed(&eeprom->smbusdev)) &&
> - !mc->smbus_no_migration_support;
> + return eeprom->accessed || smbus_vmstate_needed(&eeprom->smbusdev);
> }
>
> static const VMStateDescription vmstate_smbus_eeprom = {
> diff --git a/hw/i2c/smbus_ich9.c b/hw/i2c/smbus_ich9.c
> index 956c9b59bbc..51513e73fde 100644
> --- a/hw/i2c/smbus_ich9.c
> +++ b/hw/i2c/smbus_ich9.c
> @@ -41,20 +41,14 @@ struct ICH9SMBState {
> PMSMBus smb;
> };
>
> -static bool ich9_vmstate_need_smbus(void *opaque, int version_id)
> -{
> - return pm_smbus_vmstate_needed();
> -}
> -
> static const VMStateDescription vmstate_ich9_smbus = {
> .name = "ich9_smb",
> .version_id = 1,
> .minimum_version_id = 1,
> .fields = (const VMStateField[]) {
> VMSTATE_PCI_DEVICE(dev, ICH9SMBState),
> - VMSTATE_BOOL_TEST(irq_enabled, ICH9SMBState, ich9_vmstate_need_smbus),
> - VMSTATE_STRUCT_TEST(smb, ICH9SMBState, ich9_vmstate_need_smbus, 1,
> - pmsmb_vmstate, PMSMBus),
> + VMSTATE_BOOL(irq_enabled, ICH9SMBState),
> + VMSTATE_STRUCT(smb, ICH9SMBState, 1, pmsmb_vmstate, PMSMBus),
> VMSTATE_END_OF_LIST()
> }
> };
> --
> 2.53.0
>
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3365 bytes --]
next prev parent reply other threads:[~2026-03-09 15:41 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 14:50 [PATCH v2 00/10] hw/i386/pc: Remove deprecated 3.1 machines Philippe Mathieu-Daudé
2026-03-09 14:50 ` [PATCH v2 01/10] hw/i386/pc: Remove deprecated pc-q35/pc-i440fx/xenfv " Philippe Mathieu-Daudé
2026-03-10 14:23 ` Zhao Liu
2026-03-09 14:50 ` [PATCH v2 02/10] hw/i386/pc: Remove PCMachineClass::pvh_enabled field Philippe Mathieu-Daudé
2026-03-10 14:25 ` Zhao Liu
2026-03-09 14:50 ` [PATCH v2 03/10] hw/i386/x86: Remove @pvh_enabled argument in x86_load_linux() Philippe Mathieu-Daudé
2026-03-10 14:26 ` Zhao Liu
2026-03-09 14:50 ` [PATCH v2 04/10] hw/core/boards: Remove MachineClass::smbus_no_migration_support field Philippe Mathieu-Daudé
2026-03-09 15:41 ` Corey Minyard [this message]
2026-03-10 14:27 ` Zhao Liu
2026-03-09 14:50 ` [PATCH v2 05/10] hw/i386/pc: Remove pc_compat_3_1[] array Philippe Mathieu-Daudé
2026-03-10 14:28 ` Zhao Liu
2026-03-09 14:50 ` [PATCH v2 06/10] hw/i386/iommu: Remove IntelIOMMUState::dma_drain field Philippe Mathieu-Daudé
2026-03-10 6:07 ` CLEMENT MATHIEU--DRIF
2026-03-10 14:29 ` Zhao Liu
2026-03-09 14:50 ` [PATCH v2 07/10] target/i386/cpu: Remove X86CPU::intel_pt_auto_level field Philippe Mathieu-Daudé
2026-03-10 14:31 ` Zhao Liu
2026-03-09 14:50 ` [PATCH v2 08/10] hw/core/machine: Remove the hw_compat_3_1[] array Philippe Mathieu-Daudé
2026-03-10 14:31 ` Zhao Liu
2026-03-09 14:50 ` [PATCH v2 09/10] hw/pci-bridge/pcie_rp: Remove PCIESlot::disable_acs field Philippe Mathieu-Daudé
2026-03-09 14:50 ` [PATCH v2 10/10] hw/tpm: Remove CRBState::ppi_enabled field Philippe Mathieu-Daudé
2026-03-09 15:46 ` [PATCH v2 00/10] hw/i386/pc: Remove deprecated 3.1 machines Philippe Mathieu-Daudé
2026-03-10 14:48 ` Zhao Liu
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=aa7qFOP-GTATfG0u@mail.minyard.net \
--to=cminyard@mvista.com \
--cc=anisinha@redhat.com \
--cc=aurelien@aurel32.net \
--cc=eduardo@habkost.net \
--cc=imammedo@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=wangyanan55@huawei.com \
--cc=yi.l.liu@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 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.