target-arm: ensure all cross vCPUs TLB flushes complete
commita67cf2772733e0ff40ed14cfed9e177b050c22a7
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 23 Feb 2017 18:29:25 +0000 (23 18:29 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Fri, 24 Feb 2017 10:32:46 +0000 (24 10:32 +0000)
tree5c45d2a977ffe485d96ad91a294e39ef21837dd3
parentc22edfebff29f63d793032e4fbd42a035bb73e27
target-arm: ensure all cross vCPUs TLB flushes complete

Previously flushes on other vCPUs would only get serviced when they
exited their TranslationBlocks. While this isn't overly problematic it
violates the semantics of TLB flush from the point of view of source
vCPU.

To solve this we call the cputlb *_all_cpus_synced() functions to do
the flushes which ensures all flushes are completed by the time the
vCPU next schedules its own work. As the TLB instructions are modelled
as CP writes the TB ends at this point meaning cpu->exit_request will
be checked before the next instruction is executed.

Deferring the work until the architectural sync point is a possible
future optimisation.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/helper.c