From patchwork Tue Jun 2 14:48:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49398 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 51D1D20BD1 for ; Tue, 2 Jun 2015 14:51:29 +0000 (UTC) Received: by wgla2 with SMTP id a2sf41342670wgl.1 for ; Tue, 02 Jun 2015 07:51:28 -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=QBqlKWnzTH4G0cK2VvWbTJ5x9TbwQLOSi4aKCehIMAEBQuZm3AEz4MQAH6WcC4pOSF Xoe66bySI2aLxlpRDCMU21zapzT3DH23cLDRQ5D4XR/WFjwQSA1Toi6ScOK77Fg6fi+6 t0h0IoGov9IHrJuQqEegMe/OXrYxssSg47I+WAezV1Om+90j4SO5rdCE5Ij+1r0NMIY2 jVOV3EkJrXinWShCI/PWaTwxpeT3ar//Mv33a2XWCjmB06n6KcYqAmgg2/FP16YlT9M6 QNKwwnPzglY791GIR2qYZgJON+IEd83WFkr0iWayPPDObS2GiWetQ9LLJoiPLy2OKKfW wRUA== X-Gm-Message-State: ALoCoQkC/MJJPyEyGWAWOVq1fmHXlvRMGoUaSOBUg8XmAt8NfBndARiLpkT6WXJmbZWaNDXk2iV8 X-Received: by 10.152.4.230 with SMTP id n6mr26180636lan.2.1433256688654; Tue, 02 Jun 2015 07:51:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.100 with SMTP id j4ls804942lah.92.gmail; Tue, 02 Jun 2015 07:51:28 -0700 (PDT) X-Received: by 10.152.206.75 with SMTP id lm11mr17036739lac.41.1433256688500; Tue, 02 Jun 2015 07:51:28 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id w7si13861041law.138.2015.06.02.07.51.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jun 2015 07:51:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbcmx3 with SMTP id mx3so106094287lbc.1 for ; Tue, 02 Jun 2015 07:51:28 -0700 (PDT) X-Received: by 10.152.7.7 with SMTP id f7mr26998779laa.106.1433256688397; Tue, 02 Jun 2015 07:51:28 -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.108.230 with SMTP id hn6csp3129722lbb; Tue, 2 Jun 2015 07:51:26 -0700 (PDT) X-Received: by 10.66.169.39 with SMTP id ab7mr10779193pac.109.1433256686286; Tue, 02 Jun 2015 07:51:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id po1si26750474pac.52.2015.06.02.07.51.25; Tue, 02 Jun 2015 07:51:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759331AbbFBOvZ (ORCPT + 2 others); Tue, 2 Jun 2015 10:51:25 -0400 Received: from mail-ob0-f179.google.com ([209.85.214.179]:36813 "EHLO mail-ob0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753802AbbFBOvY (ORCPT ); Tue, 2 Jun 2015 10:51:24 -0400 Received: by obbea2 with SMTP id ea2so129515107obb.3 for ; Tue, 02 Jun 2015 07:51:24 -0700 (PDT) X-Received: by 10.60.130.167 with SMTP id of7mr15911307oeb.85.1433256684122; Tue, 02 Jun 2015 07:51:24 -0700 (PDT) Received: from localhost ([167.160.116.34]) by mx.google.com with ESMTPSA id xn9sm9478645oeb.11.2015.06.02.07.51.21 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Jun 2015 07:51:22 -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 23/32] arm/arm64: KVM: Don't clear the VCPU_POWER_OFF flag Date: Tue, 2 Jun 2015 22:48:18 +0800 Message-Id: <1433256507-7856-24-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1433256507-7856-1-git-send-email-shannon.zhao@linaro.org> References: <1433256507-7856-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.177 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;