From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: [PATCH 4/8] kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit() Date: Thu, 6 Jun 2013 19:16:32 -0500 Message-ID: <1370564196-3821-5-git-send-email-scottwood@freescale.com> References: <1370564196-3821-1-git-send-email-scottwood@freescale.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Mihai Caraman , , , Scott Wood To: Alexander Graf , Gleb Natapov , Paolo Bonzini Return-path: Received: from co9ehsobe004.messaging.microsoft.com ([207.46.163.27]:35924 "EHLO co9outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754357Ab3FGAQt (ORCPT ); Thu, 6 Jun 2013 20:16:49 -0400 In-Reply-To: <1370564196-3821-1-git-send-email-scottwood@freescale.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index ecbe908..5cd7ad0 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -834,6 +834,17 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu, int s; int idx; +#ifdef CONFIG_PPC64 + WARN_ON(local_paca->irq_happened != 0); +#endif + + /* + * We enter with interrupts disabled in hardware, but + * we need to call hard_irq_disable anyway to ensure that + * the software state is kept in sync. + */ + hard_irq_disable(); + /* update before a new last_exit_type is rewritten */ kvmppc_update_timing_stats(vcpu); -- 1.7.10.4