x86: move invocations of hvm_flush_guest_tlbs()
authorJan Beulich <jbeulich@suse.com>
Tue, 23 Jan 2018 09:43:39 +0000 (10:43 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 23 Jan 2018 09:43:39 +0000 (10:43 +0100)
commit3e635d02d704e71534b6edf0202ed4170725a14a
tree31eb0cebe5e5d532ee762174269e72ca9723b27a
parent0d31d16808689f88681450868d9512d332deb75d
x86: move invocations of hvm_flush_guest_tlbs()

Their need is not tied to the actual flushing of TLBs, but the ticking
of the TLB clock. Make this more obvious by folding the two invocations
into a single one in pre_flush().

Also defer the latching of CR4 in write_cr3() until after pre_flush()
(and hence implicitly until after IRQs are off), making operation
sequence the same in both cases (eliminating the theoretical risk of
pre_flush() altering CR4). This then also improves register allocation,
as the compiler doesn't need to use a callee-saved register for "cr4"
anymore.

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