From patchwork Mon May 4 01:25:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47920 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C28F520553 for ; Mon, 4 May 2015 01:27:08 +0000 (UTC) Received: by wgin8 with SMTP id n8sf40603954wgi.0 for ; Sun, 03 May 2015 18:27:08 -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=nCWAPyROr/RJc0NFd94brzBScHDoo7UxFWtZPfq7eE8=; b=BhQH7k4LAFmHTE8hgVDHArlOhdz1HPho2TmRYwKCAUyR79GFVWhp1B5FLyjKuR7zUt mZjzf0bMadn2b47g+24P5jSBZccHXLxNo1w0swBvGyhZmndw9hI/QYKf92x71I65qEKd gKxhBzC9VXUOqCdF1pKP2TV025WNGNg+kVlFnYc81jKZV1ByOWXS4qkO5jDASJwGU8by VpPGV+1AQy1NtCskI/1uti63xCFr13Q/XKNZ+XMTo4RENtGGv/uSS83ybbayDU87u95w nTHKdhfpvh7wU+B0gBNPakLoH337VSOaLhPHMxSyk5Px0VoonzTMNlUmeOA8mo2Nicf8 wv+Q== X-Gm-Message-State: ALoCoQlCRblwbErdv2TyhzSsr14Puk486muK0OcCR2Imw2wp/pL+pdOxBZ9SQdt+1sLRF23oOqs5 X-Received: by 10.194.143.98 with SMTP id sd2mr16894622wjb.6.1430702828113; Sun, 03 May 2015 18:27:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.42 with SMTP id j10ls597374laf.27.gmail; Sun, 03 May 2015 18:27:07 -0700 (PDT) X-Received: by 10.112.166.139 with SMTP id zg11mr17333661lbb.93.1430702827649; Sun, 03 May 2015 18:27:07 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id i4si9064054laf.44.2015.05.03.18.27.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2015 18:27:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by labbd9 with SMTP id bd9so94859441lab.2 for ; Sun, 03 May 2015 18:27:07 -0700 (PDT) X-Received: by 10.112.13.6 with SMTP id d6mr16044973lbc.117.1430702827524; Sun, 03 May 2015 18:27:07 -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 l1csp1405829lbt; Sun, 3 May 2015 18:27:06 -0700 (PDT) X-Received: by 10.66.102.99 with SMTP id fn3mr38005333pab.118.1430702825626; Sun, 03 May 2015 18:27:05 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id es7si17680936pbd.123.2015.05.03.18.27.04; Sun, 03 May 2015 18:27:05 -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 S1751036AbbEDB1D (ORCPT + 2 others); Sun, 3 May 2015 21:27:03 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:36210 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbbEDB1D (ORCPT ); Sun, 3 May 2015 21:27:03 -0400 Received: by pabsx10 with SMTP id sx10so147311077pab.3 for ; Sun, 03 May 2015 18:27:02 -0700 (PDT) X-Received: by 10.70.98.233 with SMTP id el9mr38475334pdb.54.1430702822670; Sun, 03 May 2015 18:27:02 -0700 (PDT) Received: from localhost ([180.150.153.1]) by mx.google.com with ESMTPSA id t9sm11010287pas.3.2015.05.03.18.27.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 03 May 2015 18:27:01 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: sasha.levin@oracle.com, christoffer.dall@linaro.org, shannon.zhao@linaro.org Subject: [PATCH for 3.18.y stable 04/22] arm/arm64: KVM: Don't clear the VCPU_POWER_OFF flag Date: Mon, 4 May 2015 09:25:08 +0800 Message-Id: <1430702726-2056-5-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1430702726-2056-1-git-send-email-shannon.zhao@linaro.org> References: <1430702726-2056-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.215.49 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 9e193c8..b160bea 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -661,7 +661,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;