]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm/arm64: KVM: Don't clear the VCPU_POWER_OFF flag
authorChristoffer Dall <christoffer.dall@linaro.org>
Tue, 2 Dec 2014 14:27:51 +0000 (15:27 +0100)
committerJiri Slaby <jslaby@suse.cz>
Thu, 30 Apr 2015 09:15:12 +0000 (11:15 +0200)
commit 03f1d4c17edb31b41b14ca3a749ae38d2dd6639d upstream.

If a VCPU was originally started with power off (typically to be brought
up by PSCI in SMP configurations), there is no need to clear the
POWER_OFF flag in the kernel, as this flag is only tested during the
init ioctl itself.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/arm/kvm/arm.c

index bac1ba5b39609a81a8662668e5b49a54411c2f61..7dc8e010c2003badc53e6b1b27713592e0a73701 100644 (file)
@@ -676,7 +676,7 @@ static int kvm_arch_vcpu_ioctl_vcpu_init(struct kvm_vcpu *vcpu,
        /*
         * Handle the "start in power-off" case by marking the VCPU as paused.
         */
-       if (__test_and_clear_bit(KVM_ARM_VCPU_POWER_OFF, vcpu->arch.features))
+       if (test_bit(KVM_ARM_VCPU_POWER_OFF, vcpu->arch.features))
                vcpu->arch.pause = true;
 
        return 0;