From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:55273 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752386AbeEKHAb (ORCPT ); Fri, 11 May 2018 03:00:31 -0400 Date: Fri, 11 May 2018 08:59:55 +0200 From: Greg KH To: Paul Mackerras Cc: stable@vger.kernel.org Subject: Re: [PATCH v4.14 4/4] KVM: PPC: Book3S HV: Fix guest time accounting with VIRT_CPU_ACCOUNTING_GEN Message-ID: <20180511065955.GF13558@kroah.com> References: <20180511061906.GA30116@fergus.ozlabs.ibm.com> <20180511062141.GD30116@fergus.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180511062141.GD30116@fergus.ozlabs.ibm.com> Sender: stable-owner@vger.kernel.org List-ID: On Fri, May 11, 2018 at 04:21:41PM +1000, Paul Mackerras wrote: > commit 61bd0f66ff92d5ce765ff9850fd3cbfec773c560 upstream. > > Since commit 8b24e69fc47e ("KVM: PPC: Book3S HV: Close race with testing > for signals on guest entry"), if CONFIG_VIRT_CPU_ACCOUNTING_GEN is set, the > guest time is not accounted to guest time and user time, but instead to > system time. > > This is because guest_enter()/guest_exit() are called while interrupts > are disabled and the tick counter cannot be updated between them. > > To fix that, move guest_exit() after local_irq_enable(), and as > guest_enter() is called with IRQ disabled, call guest_enter_irqoff() > instead. > > Fixes: 8b24e69fc47e ("KVM: PPC: Book3S HV: Close race with testing for signals on guest entry") > Signed-off-by: Laurent Vivier > Reviewed-by: Paolo Bonzini > Signed-off-by: Paul Mackerras > --- > arch/powerpc/kvm/book3s_hv.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) Applied, thanks. greg k-h