[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/41] ich9: honour 'enable_tco' property
From: |
Michael S. Tsirkin |
Subject: |
[PULL 07/41] ich9: honour 'enable_tco' property |
Date: |
Wed, 21 Dec 2022 08:04:42 -0500 |
From: Daniel P. Berrangé <berrange@redhat.com>
An 'ICH9-LPC.enable_tco' property has been exposed for a
very long time, but attempts to set it have never been
honoured.
Originally, any user provided 'enable_tco' value was force
replaced by a value passed from the machine type setup
code that was determine by machine type compat properties.
commit d6b304ba924b95d12edfddaac99777b577301309
Author: Eduardo Habkost <ehabkost@redhat.com>
Date: Sat Jan 23 14:02:10 2016 -0200
machine: Remove no_tco field
The field is always set to zero, so it is not necessary anymore.
After legacy Q35 machine types were deleted in:
commit 86165b499edf8b03bb2d0e926d116c2f12a95bfe
Author: Eduardo Habkost <ehabkost@redhat.com>
Date: Sat Jan 23 14:02:09 2016 -0200
q35: Remove old machine versions
the machine type code ended up just unconditionally passing
'true', all the time, so this was further simplified in
commit d6b304ba924b95d12edfddaac99777b577301309
Author: Eduardo Habkost <ehabkost@redhat.com>
Date: Sat Jan 23 14:02:10 2016 -0200
machine: Remove no_tco field
The field is always set to zero, so it is not necessary anymore.
commit 18d6abae3ea092950629e5d26aff1dcfc9a2d78e
Author: Eduardo Habkost <ehabkost@redhat.com>
Date: Sat Jan 23 14:02:11 2016 -0200
ich9: Remove enable_tco arguments from init functions
The enable_tco arguments are always true, so they are not needed
anymore.
Leaving the ich9_pm_init to just force set 'enable_tco' to true.
This still overrides any user specified property. The initialization
of property defaults should be done when properties are first
registered, rather than during object construction.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221216125749.596075-6-berrange@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/acpi/ich9.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index bd9bbade70..ea4182256d 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -316,8 +316,9 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
pm->smm_enabled = smm_enabled;
- pm->enable_tco = true;
- acpi_pm_tco_init(&pm->tco_regs, &pm->io);
+ if (pm->enable_tco) {
+ acpi_pm_tco_init(&pm->tco_regs, &pm->io);
+ }
if (pm->use_acpi_hotplug_bridge) {
acpi_pcihp_init(OBJECT(lpc_pci),
@@ -440,6 +441,7 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm)
pm->s4_val = 2;
pm->use_acpi_hotplug_bridge = true;
pm->keep_pci_slot_hpc = true;
+ pm->enable_tco = true;
object_property_add_uint32_ptr(obj, ACPI_PM_PROP_PM_IO_BASE,
&pm->pm_io_base, OBJ_PROP_FLAG_READ);
--
MST
- [PULL 00/41] virtio,pc,pci: features, cleanups, fixes, Michael S. Tsirkin, 2022/12/21
- [PULL 01/41] hw/acpi: add trace events for TCO watchdog register access, Michael S. Tsirkin, 2022/12/21
- [PULL 02/41] hw/isa: add trace events for ICH9 LPC chip config access, Michael S. Tsirkin, 2022/12/21
- [PULL 03/41] hw/watchdog: add trace events for watchdog action handling, Michael S. Tsirkin, 2022/12/21
- [PULL 04/41] hw: Add compat machines for 8.0, Michael S. Tsirkin, 2022/12/21
- [PULL 05/41] pc: clean up compat machines, Michael S. Tsirkin, 2022/12/21
- [PULL 06/41] hw/isa: enable TCO watchdog reboot pin strap by default, Michael S. Tsirkin, 2022/12/21
- [PULL 07/41] ich9: honour 'enable_tco' property,
Michael S. Tsirkin <=
- [PULL 08/41] virtio: get class_id and pci device id by the virtio id, Michael S. Tsirkin, 2022/12/21
- [PULL 09/41] vdpa: add vdpa-dev support, Michael S. Tsirkin, 2022/12/21
- [PULL 12/41] vdpa: use v->shadow_vqs_enabled in vhost_vdpa_svqs_start & stop, Michael S. Tsirkin, 2022/12/21
- [PULL 11/41] vdpa-dev: mark the device as unmigratable, Michael S. Tsirkin, 2022/12/21
- [PULL 13/41] vhost: set SVQ device call handler at SVQ start, Michael S. Tsirkin, 2022/12/21
- [PULL 14/41] vhost: allocate SVQ device file descriptors at device start, Michael S. Tsirkin, 2022/12/21
- [PULL 10/41] vdpa: add vdpa-dev-pci support, Michael S. Tsirkin, 2022/12/21
- [PULL 15/41] vhost: move iova_tree set to vhost_svq_start, Michael S. Tsirkin, 2022/12/21
- [PULL 16/41] vdpa: add vhost_vdpa_net_valid_svq_features, Michael S. Tsirkin, 2022/12/21
- [PULL 17/41] vdpa: request iova_range only once, Michael S. Tsirkin, 2022/12/21