From patchwork Fri Apr 24 05:27:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47539 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A717E20553 for ; Fri, 24 Apr 2015 05:34:43 +0000 (UTC) Received: by wicmx19 with SMTP id mx19sf1562554wic.3 for ; Thu, 23 Apr 2015 22:34:43 -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=hKC20C6K0eyv475qWB8jRY5oIDl/tmLca9Ct7VFAG3c=; b=K4VpjUThMBStospFDncq8QGIzVI/1qVL4joob5NT3CYtYFZCxb8JM9L0kv470rK5aQ Mt0lklC78seHUFhPHjkfnYrrvmz8bD/LCY1au4th8bhhiSaDpxe4OCwto+iV/2zyqySD sejyjlWX+bK1XZhHrEKxXs+3o+8fbZI5jiHZ9tubbF48nSOr30JcUtyS0HNtymEpwXjC dnBD4SV3raqJ2vXdEKhf+gHDTstjZEXD87Ybu8Z38KwqyZHBlwYSwI8oBprAFQivoFJP cfvGzC/HmVrrpWGSHCZJ9dLy/QrD/ZjRMV/Yj5PNzTgTDZwA0qHIhZ6jd9tSZLcc0IYa 5V5w== X-Gm-Message-State: ALoCoQma8xVds9iFuFYaLXcOIaEUJQXh97f8xoTWLDWyZpoxH4BKI2vRRjdKUNZTDzfjLdARye+T X-Received: by 10.180.7.138 with SMTP id j10mr176076wia.2.1429853683001; Thu, 23 Apr 2015 22:34:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.8.171 with SMTP id dl11ls401148lad.55.gmail; Thu, 23 Apr 2015 22:34:42 -0700 (PDT) X-Received: by 10.152.88.1 with SMTP id bc1mr5479483lab.79.1429853682708; Thu, 23 Apr 2015 22:34:42 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id g10si4911001lam.78.2015.04.23.22.34.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 22:34:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by lagv1 with SMTP id v1so27561508lag.3 for ; Thu, 23 Apr 2015 22:34:42 -0700 (PDT) X-Received: by 10.152.27.98 with SMTP id s2mr5456185lag.106.1429853682576; Thu, 23 Apr 2015 22:34:42 -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 l1csp978864lbt; Thu, 23 Apr 2015 22:34:41 -0700 (PDT) X-Received: by 10.68.215.9 with SMTP id oe9mr11839384pbc.146.1429853680912; Thu, 23 Apr 2015 22:34:40 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bd10si15800741pdb.178.2015.04.23.22.34.40; Thu, 23 Apr 2015 22:34:40 -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 S1754578AbbDXFej (ORCPT + 2 others); Fri, 24 Apr 2015 01:34:39 -0400 Received: from mail-oi0-f43.google.com ([209.85.218.43]:33601 "EHLO mail-oi0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754571AbbDXFej (ORCPT ); Fri, 24 Apr 2015 01:34:39 -0400 Received: by oica37 with SMTP id a37so32491152oic.0 for ; Thu, 23 Apr 2015 22:34:38 -0700 (PDT) X-Received: by 10.202.229.139 with SMTP id c133mr3479059oih.99.1429853678785; Thu, 23 Apr 2015 22:34:38 -0700 (PDT) Received: from localhost ([167.160.116.36]) by mx.google.com with ESMTPSA id sj5sm6009233oeb.13.2015.04.23.22.34.36 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 Apr 2015 22:34:37 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: jslaby@suse.cz, christoffer.dall@linaro.org, shannon.zhao@linaro.org Subject: [PATCH for 3.12.y stable 54/63] arm/arm64: KVM: Don't clear the VCPU_POWER_OFF flag Date: Fri, 24 Apr 2015 13:27:52 +0800 Message-Id: <1429853281-6136-55-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1429853281-6136-1-git-send-email-shannon.zhao@linaro.org> References: <1429853281-6136-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.50 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 bac1ba5..7dc8e01 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -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;