diff options
| author | Isaku Yamahata <isaku.yamahata@intel.com> | 2021-02-17 21:51:12 -0800 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2021-02-23 10:58:42 -0500 |
| commit | 6be8cf56bc8bda2ed9a070bdb04446191f31acc9 (patch) | |
| tree | 653991a53ad2e88f6386fbbe4f9daabe2a6d4d7f /hw/acpi/ich9.c | |
| parent | 24cd04fce06b0d54e5ca2c12f20f714894a78b95 (diff) | |
| download | focaccia-qemu-6be8cf56bc8bda2ed9a070bdb04446191f31acc9.tar.gz focaccia-qemu-6be8cf56bc8bda2ed9a070bdb04446191f31acc9.zip | |
acpi/core: always set SCI_EN when SMM isn't supported
If SMM is not supported, ACPI fixed hardware doesn't support legacy-mode. ACPI-only platform. Where SCI_EN in PM1_CNT register is always set. The bit tells OS legacy mode(SCI_EN cleared) or ACPI mode(SCI_EN set). With the next patch (setting fadt.smi_cmd = 0 when smm isn't enabled), guest Linux tries to switch to ACPI mode, finds smi_cmd = 0, and then fails to initialize acpi subsystem. This patch proactively fixes it. This patch changes guest ABI. To keep compatibility, use "smm-compat" introduced by earlier patch. If the property is true, disable new behavior. ACPI spec 4.8.10.1 PM1 Event Grouping PM1 Eanble Registers > For ACPI-only platforms (where SCI_EN is always set) Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Message-Id: <500f62081626997e46f96377393d3662211763a8.1613615732.git.isaku.yamahata@intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/acpi/ich9.c')
| -rw-r--r-- | hw/acpi/ich9.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 5ff4e01c36..853447cf9d 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -282,7 +282,7 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, acpi_pm_tmr_init(&pm->acpi_regs, ich9_pm_update_sci_fn, &pm->io); acpi_pm1_evt_init(&pm->acpi_regs, ich9_pm_update_sci_fn, &pm->io); acpi_pm1_cnt_init(&pm->acpi_regs, &pm->io, pm->disable_s3, pm->disable_s4, - pm->s4_val); + pm->s4_val, !pm->smm_compat && !smm_enabled); acpi_gpe_init(&pm->acpi_regs, ICH9_PMIO_GPE0_LEN); memory_region_init_io(&pm->io_gpe, OBJECT(lpc_pci), &ich9_gpe_ops, pm, |