[PATCH 2/3] acpi: mark PMTIMER as unlocked

Igor Mammedov posted 3 patches 4 months, 3 weeks ago
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>, Elena Ufimtseva <elena.ufimtseva@oracle.com>, Jagannathan Raman <jag.raman@oracle.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
There is a newer version of this series
[PATCH 2/3] acpi: mark PMTIMER as unlocked
Posted by Igor Mammedov 4 months, 3 weeks ago
Reading QEMU_CLOCK_VIRTUAL is thread-safe.

with CLI
 -M q35,hpet=off -cpu host -enable-kvm -smp 240,sockets=4
patch makes WS2025 guest, that wasn't able to boot in 30min, to boot in 2-1min.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/acpi/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index 58f8964e13..683fbdd8df 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -547,6 +547,8 @@ void acpi_pm_tmr_init(ACPIREGS *ar, acpi_update_sci_fn update_sci,
     ar->tmr.timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, acpi_pm_tmr_timer, ar);
     memory_region_init_io(&ar->tmr.io, memory_region_owner(parent),
                           &acpi_pm_tmr_ops, ar, "acpi-tmr", 4);
+    memory_region_enable_lockless_ro_io(&ar->tmr.io);
+    ar->tmr.io.disable_reentrancy_guard = true;
     memory_region_add_subregion(parent, 8, &ar->tmr.io);
 }
 
-- 
2.43.5