]> xenbits.xensource.com Git - people/larsk/xen.git/commit
xen/arm: livepatch: Prevent CPUs to fetch stale instructions after livepatching
authorJulien Grall <julien.grall@arm.com>
Wed, 18 Sep 2019 13:37:41 +0000 (14:37 +0100)
committerJulien Grall <julien.grall@arm.com>
Sat, 21 Sep 2019 09:47:25 +0000 (10:47 +0100)
commit84c3ae30aa79b54b3d75a2e62ae1fb340419b8d7
treef0d4ff9a1cff531e6433784585a51ea0289c5217
parentae84f55353475f569daddb9a81ac0a6bc7772c90
xen/arm: livepatch: Prevent CPUs to fetch stale instructions after livepatching

During livepatch, a single CPU will take care of applying the patch and
all the others will wait for the action to complete. They will then once
execute arch_livepatch_post_action() to flush the pipeline.

Per B2.2.5 "Concurrent modification and execution of instructions" in
DDI 0487E.a, flushing the instruction cache is not enough to ensure new
instructions are seen. All the PEs should also do an isb() to
synchronize the fetched instruction stream.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
xen/arch/arm/livepatch.c