From patchwork Thu Feb 6 16:37:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 317498 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2C3D42C00AC for ; Fri, 7 Feb 2014 03:37:20 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754630AbaBFQhR (ORCPT ); Thu, 6 Feb 2014 11:37:17 -0500 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:42885 "EHLO e06smtp14.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754485AbaBFQhP (ORCPT ); Thu, 6 Feb 2014 11:37:15 -0500 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Feb 2014 16:37:11 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 6 Feb 2014 16:37:09 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 326452190066; Thu, 6 Feb 2014 16:37:07 +0000 (GMT) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s16Gav8458065078; Thu, 6 Feb 2014 16:36:57 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s16Gb7HW018903; Thu, 6 Feb 2014 09:37:08 -0700 Received: from smtp.lab.toulouse-stg.fr.ibm.com (srv01.lab.toulouse-stg.fr.ibm.com [9.101.4.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s16Gb75h018900; Thu, 6 Feb 2014 09:37:07 -0700 Received: from bahia.lab.toulouse-stg.fr.ibm.com (bahia.lab.toulouse-stg.fr.ibm.com [9.101.4.41]) by smtp.lab.toulouse-stg.fr.ibm.com (Postfix) with ESMTP id 1B781210FF4; Thu, 6 Feb 2014 17:37:07 +0100 (CET) Subject: [PATCH 3/4] PPC: KVM: fix RESUME_GUEST check before ending CEDE in kvmppc_run_core() To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org From: Greg Kurz Cc: aik@ozlabs.ru, paulus@samba.org, agraf@suse.de, mst@redhat.com Date: Thu, 06 Feb 2014 17:37:07 +0100 Message-ID: <20140206163707.3074.35764.stgit@bahia.lab.toulouse-stg.fr.ibm.com> In-Reply-To: <20140206163650.3074.8111.stgit@bahia.lab.toulouse-stg.fr.ibm.com> References: <20140206163650.3074.8111.stgit@bahia.lab.toulouse-stg.fr.ibm.com> User-Agent: StGit/0.16 MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14020616-1948-0000-0000-000007B6CAB8 Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org Let's use a helper for this, in case new RESUME_GUEST_XXX values are introduced. Signed-off-by: Greg Kurz --- arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index d62dc6c..85df6a4 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -1530,7 +1530,7 @@ static void kvmppc_run_core(struct kvmppc_vcore *vc) vcpu->arch.trap = 0; if (vcpu->arch.ceded) { - if (ret != RESUME_GUEST) + if (!is_kvmppc_resume_guest(ret)) kvmppc_end_cede(vcpu); else kvmppc_set_timer(vcpu);