From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: PPC: Book3S HV: Sanitize special-purpose register values on guest exit Date: Mon, 7 Mar 2016 15:07:03 +0100 Message-ID: <56DD8B07.8050903@redhat.com> References: <20160307111230.GC32019@fergus.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Alexander Graf , David Gibson To: Paul Mackerras , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Return-path: Received: from mail-wm0-f46.google.com ([74.125.82.46]:34073 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752401AbcCGOHI (ORCPT ); Mon, 7 Mar 2016 09:07:08 -0500 In-Reply-To: <20160307111230.GC32019@fergus.ozlabs.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/03/2016 12:12, Paul Mackerras wrote: > Thomas Huth discovered that a guest could cause a hard hang of a > host CPU by setting the Instruction Authority Mask Register (IAMR) > to a suitable value. It turns out that this is because when the > code was added to context-switch the new special-purpose registers > (SPRs) that were added in POWER8, we forgot to add code to ensure > that they were restored to a sane value on guest exit. > > This adds code to set the those registers where a bad value could > compromise the execution of the host kernel to a suitable neutral > value on guest exit. > > Cc: stable@vger.kernel.org # v3.14+ > Fixes: b73117c49364 > Reported-by: Thomas Huth > Signed-off-by: Paul Mackerras > --- > Paolo, since this fixes a bug where a guest can cause a hard hang > of a host CPU, I'd like it to go in 4.5 if possible. Sure. Paolo