x86: make CPU state flush requests explicit
authorJan Beulich <jbeulich@suse.com>
Tue, 23 Jan 2018 09:44:11 +0000 (10:44 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 23 Jan 2018 09:44:11 +0000 (10:44 +0100)
commitc64bf2d2a6259bab0ca64e208e6b0f5e4eda75e8
tree2b7c838158298465ea86a29f0ad0fc75434cc777
parent3e635d02d704e71534b6edf0202ed4170725a14a
x86: make CPU state flush requests explicit

Having this be an implied side effect of a TLB flush is not very nice:
It could (at least in theory) lead to unintended state flushes (see e.g.
https://lists.xenproject.org/archives/html/xen-devel/2017-11/msg00187.html
for context). Introduce a flag to be used in the two places actually
wanting the state flushed, and conditionalize the
__sync_local_execstate() invocation in the IPI handler accordingly.

At the same time also conditionalize the flush_area_local() invocations,
to short-circuit the function ending up as a no-op anyway.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/domain.c
xen/arch/x86/smp.c
xen/include/asm-x86/flushtlb.h