From: Michael Ellerman Date: Sun, 30 Jun 2019 08:37:33 +0000 Subject: Re: [PATCH 2/3] KVM: PPC: Book3S HV: Signed extend decrementer value if not using large decr Message-Id: <45c3lx4g6Kz9sNt@ozlabs.org> List-Id: In-Reply-To: <20190620014651.7645-2-sjitindarsingh@gmail.com> References: <20190620014651.7645-2-sjitindarsingh@gmail.com> In-Reply-To: <20190620014651.7645-2-sjitindarsingh@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Suraj Jitindar Singh , linuxppc-dev@lists.ozlabs.org Cc: clg@kaod.org, kvm-ppc@vger.kernel.org, sjitindarsingh@gmail.com On Thu, 2019-06-20 at 01:46:50 UTC, Suraj Jitindar Singh wrote: > On POWER9 the decrementer can operate in large decrementer mode where > the decrementer is 56 bits and signed extended to 64 bits. When not > operating in this mode the decrementer behaves as a 32 bit decrementer > which is NOT signed extended (as on POWER8). > > Currently when reading a guest decrementer value we don't take into > account whether the large decrementer is enabled or not, and this means > the value will be incorrect when the guest is not using the large > decrementer. Fix this by sign extending the value read when the guest > isn't using the large decrementer. > > Fixes: 95a6432ce903 "KVM: PPC: Book3S HV: Streamlined guest entry/exit path on P9 for radix guests" > > Signed-off-by: Suraj Jitindar Singh > Tested-by: Laurent Vivier Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/869537709ebf1dc865e75c3fc97b23f8acf37c16 cheers