From patchwork Mon May 4 01:52:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47976 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 01DD72121F for ; Mon, 4 May 2015 01:56:36 +0000 (UTC) Received: by wiun10 with SMTP id n10sf30528253wiu.1 for ; Sun, 03 May 2015 18:56:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=3oVfp2Wui8AraagVkCow+rzCe4AHwxF7dDbtG6r/i2U=; b=R6MzqcSHlCcT/Wmsct20sPKLsftUn9EHeVYBIEoaZNLPA1T8zeqIjWIUdn/rP9nTkO N6nF4WeQKiP5X6OrZouixWwKeQu7aGxlD91H+5U8Ni0MxXQqmoCLMdJ0pfkxY5ifPCLi ZVxZJQY7kQSehitJqqOmpQq2lLVUbxVsuhjNXrPUqiOUoZhbDUlRM7gfLkU6sgERv0WV HLSdjcQDACW0vyxJnyfBM1vANueiqThGK9vsJBXpFFcX6sMGEvalfvPEBKNx0hO15z4q WQQt9Evh1B9tASK36uWPVzzjmXCU2mRyT2yymUAUq2JvfAOHrLNHmBABSF9w2oPgxf7P OjDA== X-Gm-Message-State: ALoCoQlZHZOuEIBt9/D++8XokxxXhQiv2xgaZlQhr1ZNZ3ubM39xW+NyjzrTnE37ZJ4mEz2+5mOC X-Received: by 10.194.240.164 with SMTP id wb4mr16939605wjc.1.1430704595342; Sun, 03 May 2015 18:56:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.30.37 with SMTP id p5ls724219lah.9.gmail; Sun, 03 May 2015 18:56:35 -0700 (PDT) X-Received: by 10.112.161.197 with SMTP id xu5mr17422270lbb.69.1430704595108; Sun, 03 May 2015 18:56:35 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id yk6si9088730lbb.90.2015.05.03.18.56.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2015 18:56:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbbuc2 with SMTP id uc2so95617183lbb.2 for ; Sun, 03 May 2015 18:56:35 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr5243422lbc.19.1430704595016; Sun, 03 May 2015 18:56:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp1413224lbt; Sun, 3 May 2015 18:56:34 -0700 (PDT) X-Received: by 10.70.42.139 with SMTP id o11mr38481700pdl.66.1430704593298; Sun, 03 May 2015 18:56:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ix6si17838787pac.46.2015.05.03.18.56.32; Sun, 03 May 2015 18:56:33 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751966AbbEDB4c (ORCPT + 2 others); Sun, 3 May 2015 21:56:32 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:35202 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751823AbbEDB4b (ORCPT ); Sun, 3 May 2015 21:56:31 -0400 Received: by pdbqd1 with SMTP id qd1so150112559pdb.2 for ; Sun, 03 May 2015 18:56:31 -0700 (PDT) X-Received: by 10.68.253.162 with SMTP id ab2mr38279639pbd.62.1430704591356; Sun, 03 May 2015 18:56:31 -0700 (PDT) Received: from localhost ([180.150.153.1]) by mx.google.com with ESMTPSA id xv9sm11030640pbc.2.2015.05.03.18.56.29 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 03 May 2015 18:56:30 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, christoffer.dall@linaro.org, shannon.zhao@linaro.org Subject: [PATCH for 3.14.y stable 38/47] arm/arm64: KVM: Don't clear the VCPU_POWER_OFF flag Date: Mon, 4 May 2015 09:52:33 +0800 Message-Id: <1430704362-6292-39-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1430704362-6292-1-git-send-email-shannon.zhao@linaro.org> References: <1430704362-6292-1-git-send-email-shannon.zhao@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: shannon.zhao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Christoffer Dall 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 Signed-off-by: Christoffer Dall Signed-off-by: Shannon Zhao --- arch/arm/kvm/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index fb9c291..4a7f538 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -678,7 +678,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;