From: Paolo Bonzini Date: Mon, 07 Mar 2016 14:07:03 +0000 Subject: Re: [PATCH] KVM: PPC: Book3S HV: Sanitize special-purpose register values on guest exit Message-Id: <56DD8B07.8050903@redhat.com> List-Id: References: <20160307111230.GC32019@fergus.ozlabs.ibm.com> In-Reply-To: <20160307111230.GC32019@fergus.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Paul Mackerras , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Cc: Alexander Graf , David Gibson 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