From: Igor Mammedov <imammedo@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org,
	"Clément Mathieu--Drif" <clement.mathieu--drif@eviden.com>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	qemu-block@nongnu.org, "Jason Wang" <jasowang@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Ani Sinha" <anisinha@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Kevin Wolf" <kwolf@redhat.com>, "Yi Liu" <yi.l.liu@intel.com>
Subject: Re: [PATCH 03/18] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition
Date: Tue, 3 Jun 2025 17:25:40 +0200	[thread overview]
Message-ID: <20250603172540.74edac96@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <20250501210456.89071-4-philmd@linaro.org>
On Thu,  1 May 2025 23:04:41 +0200
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> The ICH9_LPC_SMI_F_BROADCAST_BIT feature bit was only set
> in the pc_compat_2_8[] array, via the 'x-smi-broadcast=off'
> property. We removed all machines using that array, lets remove
> that property and all the code around it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  include/hw/southbridge/ich9.h |  1 -
>  hw/acpi/ich9.c                |  6 ++----
>  hw/isa/lpc_ich9.c             | 22 +++-------------------
>  3 files changed, 5 insertions(+), 24 deletions(-)
> 
> diff --git a/include/hw/southbridge/ich9.h b/include/hw/southbridge/ich9.h
> index 1e231e89c92..4764c03ac2d 100644
> --- a/include/hw/southbridge/ich9.h
> +++ b/include/hw/southbridge/ich9.h
> @@ -244,7 +244,6 @@ struct ICH9LPCState {
>  #define ICH9_LPC_SMI_NEGOTIATED_FEAT_PROP "x-smi-negotiated-features"
>  
>  /* bit positions used in fw_cfg SMI feature negotiation */
> -#define ICH9_LPC_SMI_F_BROADCAST_BIT            0
>  #define ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT          1
>  #define ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT       2
>  
> diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> index c7a735bf642..40564605735 100644
> --- a/hw/acpi/ich9.c
> +++ b/hw/acpi/ich9.c
> @@ -477,8 +477,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
>      if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
>          uint64_t negotiated = lpc->smi_negotiated_features;
>  
> -        if (negotiated & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT) &&
> -            !(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT))) {
> +        if (!(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT))) {
>              error_setg(errp, "cpu hotplug with SMI wasn't enabled by firmware");
>              error_append_hint(errp, "update machine type to newer than 5.1 "
>                  "and firmware that suppors CPU hotplug with SMM");
> @@ -526,8 +525,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev,
>                 !lpc->pm.cpu_hotplug_legacy) {
>          uint64_t negotiated = lpc->smi_negotiated_features;
>  
> -        if (negotiated & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT) &&
> -            !(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT))) {
> +        if (!(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT))) {
>              error_setg(errp, "cpu hot-unplug with SMI wasn't enabled "
>                               "by firmware");
>              error_append_hint(errp, "update machine type to a version having "
> diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
> index 71afb45b631..c57a06e0dde 100644
> --- a/hw/isa/lpc_ich9.c
> +++ b/hw/isa/lpc_ich9.c
> @@ -400,15 +400,6 @@ static void smi_features_ok_callback(void *opaque)
>      guest_cpu_hotplug_features = guest_features &
>                                   (BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT) |
>                                    BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT));
> -    if (!(guest_features & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT)) &&
> -        guest_cpu_hotplug_features) {
> -        /*
> -         * cpu hot-[un]plug with SMI requires SMI broadcast,
> -         * leave @features_ok at zero
> -         */
> -        return;
> -    }
> -
>      if (guest_cpu_hotplug_features ==
>          BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT)) {
>          /* cpu hot-unplug is unsupported without cpu-hotplug */
> @@ -470,14 +461,9 @@ static void ich9_apm_ctrl_changed(uint32_t val, void *arg)
>  
>      /* SMI_EN = PMBASE + 30. SMI control and enable register */
>      if (lpc->pm.smi_en & ICH9_PMIO_SMI_EN_APMC_EN) {
> -        if (lpc->smi_negotiated_features &
> -            (UINT64_C(1) << ICH9_LPC_SMI_F_BROADCAST_BIT)) {
> -            CPUState *cs;
> -            CPU_FOREACH(cs) {
> -                cpu_interrupt(cs, CPU_INTERRUPT_SMI);
> -            }
> -        } else {
> -            cpu_interrupt(current_cpu, CPU_INTERRUPT_SMI);
> +        CPUState *cs;
> +        CPU_FOREACH(cs) {
> +            cpu_interrupt(cs, CPU_INTERRUPT_SMI);
>          }
>      }
>  }
> @@ -830,8 +816,6 @@ static const Property ich9_lpc_properties[] = {
>      DEFINE_PROP_BOOL("noreboot", ICH9LPCState, pin_strap.spkr_hi, false),
>      DEFINE_PROP_BOOL("smm-compat", ICH9LPCState, pm.smm_compat, false),
>      DEFINE_PROP_BOOL("smm-enabled", ICH9LPCState, pm.smm_enabled, false),
> -    DEFINE_PROP_BIT64("x-smi-broadcast", ICH9LPCState, smi_host_features,
> -                      ICH9_LPC_SMI_F_BROADCAST_BIT, true),
>      DEFINE_PROP_BIT64("x-smi-cpu-hotplug", ICH9LPCState, smi_host_features,
>                        ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT, true),
>      DEFINE_PROP_BIT64("x-smi-cpu-hotunplug", ICH9LPCState, smi_host_features,
next prev parent reply	other threads:[~2025-06-03 15:26 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-01 21:04 [PATCH 00/18] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Philippe Mathieu-Daudé
2025-05-01 21:04 ` [PATCH 01/18] hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines Philippe Mathieu-Daudé
2025-06-03 15:21   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 02/18] hw/i386/pc: Remove pc_compat_2_8[] array Philippe Mathieu-Daudé
2025-06-03 15:21   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 03/18] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition Philippe Mathieu-Daudé
2025-06-03 15:25   ` Igor Mammedov [this message]
2025-05-01 21:04 ` [PATCH 04/18] hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field Philippe Mathieu-Daudé
2025-06-03 15:27   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 05/18] hw/core/machine: Remove hw_compat_2_8[] array Philippe Mathieu-Daudé
2025-06-03 15:28   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 06/18] hw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field Philippe Mathieu-Daudé
2025-06-05 15:06   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 07/18] hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition Philippe Mathieu-Daudé
2025-06-05 15:14   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 08/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition Philippe Mathieu-Daudé
2025-06-06 13:07   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 09/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition Philippe Mathieu-Daudé
2025-06-06 13:10   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 10/18] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition Philippe Mathieu-Daudé
2025-06-06 13:11   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 11/18] hw/nvram/fw_cfg: Remove FWCfgState::file_slots field Philippe Mathieu-Daudé
2025-06-06 13:24   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 12/18] hw/nvram/fw_cfg: Inline fw_cfg_file_slots() Philippe Mathieu-Daudé
2025-06-06 13:29   ` Igor Mammedov
2025-06-16  5:05     ` Philippe Mathieu-Daudé
2025-05-01 21:04 ` [PATCH 13/18] hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines Philippe Mathieu-Daudé
2025-06-06 13:30   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 14/18] hw/i386/pc: Remove pc_compat_2_9[] array Philippe Mathieu-Daudé
2025-06-06 13:31   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 15/18] hw/core/machine: Remove hw_compat_2_9[] array Philippe Mathieu-Daudé
2025-06-06 13:31   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 16/18] hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field Philippe Mathieu-Daudé
2025-06-06 13:33   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 17/18] hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field Philippe Mathieu-Daudé
2025-06-06 13:34   ` Igor Mammedov
2025-05-01 21:04 ` [PATCH 18/18] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field Philippe Mathieu-Daudé
2025-06-06 13:42   ` Igor Mammedov
2025-06-12 21:39     ` Alejandro Jimenez
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=20250603172540.74edac96@imammedo.users.ipa.redhat.com \
    --to=imammedo@redhat.com \
    --cc=anisinha@redhat.com \
    --cc=clement.mathieu--drif@eviden.com \
    --cc=eduardo@habkost.net \
    --cc=hreitz@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 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).