]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: optimize VCPU RUN
authorAndrew Jones <drjones@redhat.com>
Sun, 4 Jun 2017 12:43:57 +0000 (14:43 +0200)
committerChristoffer Dall <cdall@linaro.org>
Sun, 4 Jun 2017 14:53:55 +0000 (16:53 +0200)
commitd7ffca1a63b963936cda00a05cc95f3e163eaeed
tree752a20556538c34790cc5e4cdcdc96268dddad3f
parentbf1dc45eff99273d02be6d676e3e638d9f9a5106
KVM: arm/arm64: optimize VCPU RUN

We can make a small optimization by not checking the state of
the power_off field on each run. This is done by treating
power_off like pause, only checking it when we get the EXIT
VCPU request. When a VCPU powers off another VCPU the EXIT
request is already made, so we just need to make sure the
request is also made on self power off. kvm_vcpu_kick() isn't
necessary for these cases, as the VCPU would just be kicking
itself, but we add it anyway as a self kick doesn't cost much,
and it makes the code more future-proof.

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/arm.c
virt/kvm/arm/psci.c