From patchwork Fri Aug 7 16:08:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 6970851 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F3008C05AC for ; Fri, 7 Aug 2015 16:09:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0801B2061D for ; Fri, 7 Aug 2015 16:09:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6032E2061E for ; Fri, 7 Aug 2015 16:09:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1945923AbbHGQJ3 (ORCPT ); Fri, 7 Aug 2015 12:09:29 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:38303 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932570AbbHGQJZ (ORCPT ); Fri, 7 Aug 2015 12:09:25 -0400 Received: by wibxm9 with SMTP id xm9so71906711wib.1 for ; Fri, 07 Aug 2015 09:09:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vPW0sJYK2BGXZ/vKJJxYpmqDH4LjvzllCjYMHpcSuKY=; b=UxorY/yP7CS4/GfkNFZuHOZxAZv4wPhM9KhT0REnZLpHTofytbkstDYeoYfA9uGsFC jCTncFctxA41U3Put//N/kzzBwabDK3vEumzCxq7ZfqwtLdWLwvaor8rftOQM4UHpcDN zKHJOk+2oLmRB1SYr1kvgwTT9IwDM8BF/uCwolBmzHw7xWAdnnShnorgKzxEqaAkGT/B Ugm4W5GV2TKz8N4gU7/Uzm235vt2k2165oamq4jdwRUFpKU9d8qJrJQvsvoK+JHPTplq s12o1iXPFfwIe9TJWCDpzwvUD2fuUix/0jD0njyTBOPjAjN+u8y7ZviyhUvSz78D1b9q 5+aA== X-Gm-Message-State: ALoCoQl8dVUrCBAOsQd2Rugi7FT+bepk93yHGBZZUG7EVdkY8Zg1ms/AE2FBTcMeWdNMbnDDkVvC X-Received: by 10.194.122.132 with SMTP id ls4mr15671732wjb.130.1438963763826; Fri, 07 Aug 2015 09:09:23 -0700 (PDT) Received: from gnx2579.home (LCaen-156-56-7-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id by17sm9127438wib.18.2015.08.07.09.09.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Aug 2015 09:09:22 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, christoffer.dall@linaro.org, marc.zyngier@arm.com, drjones@redhat.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, patches@linaro.org, pbonzini@redhat.com Subject: [PATCH v2 2/4] KVM: arm/arm64: check power_off in kvm_arch_vcpu_runnable Date: Fri, 7 Aug 2015 18:08:31 +0200 Message-Id: <1438963713-10460-3-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438963713-10460-1-git-send-email-eric.auger@linaro.org> References: <1438963713-10460-1-git-send-email-eric.auger@linaro.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP kvm_arch_vcpu_runnable now also checks whether the power_off flag is set. Signed-off-by: Eric Auger --- arch/arm/kvm/arm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 3ac6b4c..4f50be3 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -347,7 +347,8 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu, */ int kvm_arch_vcpu_runnable(struct kvm_vcpu *v) { - return !!v->arch.irq_lines || kvm_vgic_vcpu_pending_irq(v); + return ((!!v->arch.irq_lines || kvm_vgic_vcpu_pending_irq(v)) + && !v->arch.power_off); } /* Just ensure a guest exit from a particular CPU */