]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: use vcpu requests for power_off
authorAndrew Jones <drjones@redhat.com>
Sun, 4 Jun 2017 12:43:56 +0000 (14:43 +0200)
committerChristoffer Dall <cdall@linaro.org>
Sun, 4 Jun 2017 14:53:54 +0000 (16:53 +0200)
commitbf1dc45eff99273d02be6d676e3e638d9f9a5106
treee075bd575b7b0792f3740cababcac996883385ab
parent4ec4b1e5622719ea0c6b45b51c60bbc292e4e539
KVM: arm/arm64: use vcpu requests for power_off

System shutdown is currently using request-less VCPU kicks. This
leaves open a tiny race window, as it doesn't ensure the state
change to power_off is seen by a VCPU just about to enter guest
mode. VCPU requests, OTOH, are guaranteed to be seen (see "Ensuring
Requests Are Seen" of Documentation/virtual/kvm/vcpu-requests.rst)
This patch applies the EXIT request used by pause to power_off,
fixing the race.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Christoffer Dall <cdall@linaro.org>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
virt/kvm/arm/psci.c