svn commit: r333891 - head/sys/x86/x86
Konstantin Belousov
kib at FreeBSD.org
Sat May 19 20:26:34 UTC 2018
Author: kib
Date: Sat May 19 20:26:33 2018
New Revision: 333891
URL: https://svnweb.freebsd.org/changeset/base/333891
Log:
Fix IBRS handling around MWAIT.
The intent was to disable IBPB and IBRS around MWAIT, and re-enable on
the sleep end.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Modified:
head/sys/x86/x86/cpu_machdep.c
Modified: head/sys/x86/x86/cpu_machdep.c
==============================================================================
--- head/sys/x86/x86/cpu_machdep.c Sat May 19 19:53:23 2018 (r333890)
+++ head/sys/x86/x86/cpu_machdep.c Sat May 19 20:26:33 2018 (r333891)
@@ -166,11 +166,11 @@ acpi_cpu_idle_mwait(uint32_t mwait_hint)
KASSERT(atomic_load_int(state) == STATE_SLEEPING,
("cpu_mwait_cx: wrong monitorbuf state"));
atomic_store_int(state, STATE_MWAIT);
- handle_ibrs_entry();
+ handle_ibrs_exit();
cpu_monitor(state, 0, 0);
if (atomic_load_int(state) == STATE_MWAIT)
cpu_mwait(MWAIT_INTRBREAK, mwait_hint);
- handle_ibrs_exit();
+ handle_ibrs_entry();
/*
* We should exit on any event that interrupts mwait, because
More information about the svn-src-all
mailing list