x86: limit the amount of TLB flushing in switch_cr3_cr4()
authorJan Beulich <jbeulich@suse.com>
Wed, 18 Sep 2019 13:14:49 +0000 (15:14 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 18 Sep 2019 13:14:49 +0000 (15:14 +0200)
commitedc426665f88994a1cdc893c30df66706dc6d654
treeffb95ccb3857f28e7a3090c6d95047cefba2489e
parent464409f6cf2c73690426898369431e906100d1c0
x86: limit the amount of TLB flushing in switch_cr3_cr4()

We really need to flush the TLB just once, if we do so with or after the
CR3 write. The only case where two flushes are unavoidable is when we
mean to turn off CR4.PGE (perhaps just temporarily; see the code
comment).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/flushtlb.c