From patchwork Fri May 10 03:09:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 242892 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 5E41A2C0185 for ; Fri, 10 May 2013 13:10:41 +1000 (EST) Received: from co1outboundpool.messaging.microsoft.com (co1ehsobe005.messaging.microsoft.com [216.32.180.188]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Microsoft Secure Server Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id D03B92C012A for ; Fri, 10 May 2013 13:09:57 +1000 (EST) Received: from mail141-co1-R.bigfish.com (10.243.78.252) by CO1EHSOBE035.bigfish.com (10.243.66.100) with Microsoft SMTP Server id 14.1.225.23; Fri, 10 May 2013 03:09:52 +0000 Received: from mail141-co1 (localhost [127.0.0.1]) by mail141-co1-R.bigfish.com (Postfix) with ESMTP id CA2EA68031A; Fri, 10 May 2013 03:09:52 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ah1fc6hzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1d0ch1d2eh1d3fh1155h) Received: from mail141-co1 (localhost.localdomain [127.0.0.1]) by mail141-co1 (MessageSwitch) id 136815539146557_26009; Fri, 10 May 2013 03:09:51 +0000 (UTC) Received: from CO1EHSMHS008.bigfish.com (unknown [10.243.78.241]) by mail141-co1.bigfish.com (Postfix) with ESMTP id 08EC04004E; Fri, 10 May 2013 03:09:51 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO1EHSMHS008.bigfish.com (10.243.66.18) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 10 May 2013 03:09:50 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-004.039d.mgd.msft.net (10.84.1.14) with Microsoft SMTP Server (TLS) id 14.2.328.11; Fri, 10 May 2013 03:10:00 +0000 Received: from snotra.am.freescale.net ([10.214.85.10]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r4A39i1w025681; Thu, 9 May 2013 20:09:48 -0700 From: Scott Wood To: Alexander Graf , Benjamin Herrenschmidt Subject: [PATCH v2 2/4] kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit() Date: Thu, 9 May 2013 22:09:42 -0500 Message-ID: <1368155384-11035-3-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1368155384-11035-1-git-send-email-scottwood@freescale.com> References: <1368155384-11035-1-git-send-email-scottwood@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: Scott Wood , linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" EE is hard-disabled on entry to kvmppc_handle_exit(), so call hard_irq_disable() so that PACA_IRQ_HARD_DIS is set, and soft_enabled is unset. Without this, we get warnings such as arch/powerpc/kernel/time.c:300, and sometimes host kernel hangs. Signed-off-by: Scott Wood --- arch/powerpc/kvm/booke.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 1020119..705fc5c 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -833,6 +833,11 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, int r = RESUME_HOST; int s; +#ifdef CONFIG_PPC64 + WARN_ON(local_paca->irq_happened != 0); +#endif + hard_irq_disable(); + /* update before a new last_exit_type is rewritten */ kvmppc_update_timing_stats(vcpu);