All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com, anisinha@redhat.com,
	philmd@linaro.org, kraxel@redhat.com
Subject: Re: [PATCH 17/16] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition
Date: Thu, 5 Mar 2026 13:10:01 +0100	[thread overview]
Message-ID: <20260305131001.71024353@imammedo> (raw)
In-Reply-To: <061e1cc4-7099-4e2e-a164-04c34a6a0c10@redhat.com>

On Wed, 4 Mar 2026 18:20:27 +0100
Thomas Huth <thuth@redhat.com> wrote:

> On 03/03/2026 15.00, Igor Mammedov wrote:
> > From: Philippe Mathieu-Daudé <philmd@linaro.org>
> > 
> > v2:
> >     - do not check for SMI features if hotplug happens when
> >       SMI is not enabled. (matters for qtest and possibly seabios)
> >     - removing property also removes default ICH9_LPC_SMI_F_BROADCAST_BIT
> >       put default back in place only set it initfn() instead
> > 
> > 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>
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> >   hw/acpi/ich9.c    |  4 ++--
> >   hw/isa/lpc_ich9.c | 23 ++++-------------------
> >   2 files changed, 6 insertions(+), 21 deletions(-)
> > 
> > diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> > index bbb1bd60a2..87afe86bcc 100644
> > --- a/hw/acpi/ich9.c
> > +++ b/hw/acpi/ich9.c
> > @@ -432,7 +432,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) &&
> > +        if (lpc->pm.smi_en & ICH9_PMIO_SMI_EN_APMC_EN &&
> >               !(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 "
> > @@ -476,7 +476,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev,
> >       } else 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) &&
> > +        if (lpc->pm.smi_en & ICH9_PMIO_SMI_EN_APMC_EN &&
> >               !(negotiated & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT))) {
> >               error_setg(errp, "cpu hot-unplug with SMI wasn't enabled "
> >                                "by firmware");
> > diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
> > index 51dc680029..04169ffa24 100644
> > --- a/hw/isa/lpc_ich9.c
> > +++ b/hw/isa/lpc_ich9.c
> > @@ -404,15 +404,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 */
> > @@ -474,14 +465,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);
> >           }
> >       }
> >   }
> > @@ -685,6 +671,7 @@ static void ich9_lpc_initfn(Object *obj)
> >   
> >       static const uint8_t acpi_enable_cmd = ICH9_APM_ACPI_ENABLE;
> >       static const uint8_t acpi_disable_cmd = ICH9_APM_ACPI_DISABLE;
> > +    lpc->smi_host_features = BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT);  
> 
> Shouldn't that rather be a "|=" instead of the "=" so that we don't lose the 
> other bits?

Indeed it should be '|=',
can you fix it up on merge or should I better send fixed up version?

 
>   Thomas
> 
> 
> 
> >       object_initialize_child(obj, "rtc", &lpc->rtc, TYPE_MC146818_RTC);
> >   
> > @@ -834,8 +821,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,  
> 



  reply	other threads:[~2026-03-05 12:10 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25  9:20 [PATCH v2 00/16] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Thomas Huth
2026-02-25  9:20 ` [PATCH v2 01/16] hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines Thomas Huth
2026-02-25  9:20 ` [PATCH v2 02/16] hw/i386/pc: Remove pc_compat_2_8[] array Thomas Huth
2026-02-25  9:20 ` [PATCH v2 03/16] hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field Thomas Huth
2026-02-25  9:20 ` [PATCH v2 04/16] hw/core/machine: Remove hw_compat_2_8[] array Thomas Huth
2026-02-25  9:20 ` [PATCH v2 05/16] hw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field Thomas Huth
2026-02-25  9:20 ` [PATCH v2 06/16] hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition Thomas Huth
2026-02-25  9:20 ` [PATCH v2 07/16] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition Thomas Huth
2026-02-25  9:20 ` [PATCH v2 08/16] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition Thomas Huth
2026-02-25  9:20 ` [PATCH v2 09/16] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition Thomas Huth
2026-02-25  9:20 ` [PATCH v2 10/16] hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines Thomas Huth
2026-02-25  9:20 ` [PATCH v2 11/16] hw/i386/pc: Remove pc_compat_2_9[] array Thomas Huth
2026-02-25  9:20 ` [PATCH v2 12/16] hw/core/machine: Remove hw_compat_2_9[] array Thomas Huth
2026-02-25  9:20 ` [PATCH v2 13/16] hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field Thomas Huth
2026-02-25  9:20 ` [PATCH v2 14/16] hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field Thomas Huth
2026-02-25  9:20 ` [PATCH v2 15/16] hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field Thomas Huth
2026-03-04 11:25   ` Igor Mammedov
2026-02-25  9:20 ` [PATCH v2 16/16] tests/qtest/test-x86-cpuid-compat: Remove the test with the i440fx-2.9 machine Thomas Huth
2026-02-25 18:26   ` Fabiano Rosas
2026-03-04 11:26   ` Igor Mammedov
2026-03-03 14:00 ` [PATCH 17/16] hw/southbridge/ich9: Remove ICH9_LPC_SMI_F_BROADCAST_BIT definition Igor Mammedov
2026-03-04 17:20   ` Thomas Huth
2026-03-05 12:10     ` Igor Mammedov [this message]
2026-03-05 12:33       ` Thomas Huth
2026-03-05 14:32         ` Igor Mammedov
2026-03-05 16:06           ` Igor Mammedov
2026-03-05 16:06   ` [PATCH v3 " Igor Mammedov
2026-03-05  7:26 ` [PATCH v2 00/16] hw/i386/pc: Remove deprecated 2.8 and 2.9 PC machines Thomas Huth

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=20260305131001.71024353@imammedo \
    --to=imammedo@redhat.com \
    --cc=anisinha@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.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.