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: 2548241 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id CA4D73FD4E for ; Fri, 10 May 2013 03:10:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755331Ab3EJDJz (ORCPT ); Thu, 9 May 2013 23:09:55 -0400 Received: from co1ehsobe006.messaging.microsoft.com ([216.32.180.189]:2024 "EHLO co1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755028Ab3EJDJx (ORCPT ); Thu, 9 May 2013 23:09:53 -0400 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 CC: , , , Scott Wood 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 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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);