From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Date: Mon, 21 Nov 2016 05:07:06 +0000 Subject: Re: [PATCH] KVM: PPC: Book3S HV: Save/restore XER in checkpointed register state Message-Id: <20161121050706.GM26748@fergus.ozlabs.ibm.com> List-Id: References: <20161107040958.dzopsvoelow25css@oak.ozlabs.ibm.com> In-Reply-To: <20161107040958.dzopsvoelow25css@oak.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org On Mon, Nov 07, 2016 at 03:09:58PM +1100, Paul Mackerras wrote: > When switching from/to a guest that has a transaction in progress, > we need to save/restore the checkpointed register state. Although > XER is part of the CPU state that gets checkpointed, the code that > does this saving and restoring doesn't save/restore XER. > > This fixes it by saving and restoring the XER. To allow userspace > to read/write the checkpointed XER value, we also add a new ONE_REG > specifier. > > The visible effect of this bug is that the guest may see its XER > value being corrupted when it uses transactions. > > Fixes: e4e38121507a ("KVM: PPC: Book3S HV: Add transactional memory support") > Fixes: 0a8eccefcb34 ("KVM: PPC: Book3S HV: Add missing code for transaction reclaim on guest exit") > Cc: stable@vger.kernel.org # v3.15+ > Signed-off-by: Paul Mackerras Applied to kvm-ppc-next. Paul. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Subject: Re: [PATCH] KVM: PPC: Book3S HV: Save/restore XER in checkpointed register state Date: Mon, 21 Nov 2016 16:07:06 +1100 Message-ID: <20161121050706.GM26748@fergus.ozlabs.ibm.com> References: <20161107040958.dzopsvoelow25css@oak.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Return-path: Received: from ozlabs.org ([103.22.144.67]:39543 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750944AbcKUFIg (ORCPT ); Mon, 21 Nov 2016 00:08:36 -0500 Content-Disposition: inline In-Reply-To: <20161107040958.dzopsvoelow25css@oak.ozlabs.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Nov 07, 2016 at 03:09:58PM +1100, Paul Mackerras wrote: > When switching from/to a guest that has a transaction in progress, > we need to save/restore the checkpointed register state. Although > XER is part of the CPU state that gets checkpointed, the code that > does this saving and restoring doesn't save/restore XER. > > This fixes it by saving and restoring the XER. To allow userspace > to read/write the checkpointed XER value, we also add a new ONE_REG > specifier. > > The visible effect of this bug is that the guest may see its XER > value being corrupted when it uses transactions. > > Fixes: e4e38121507a ("KVM: PPC: Book3S HV: Add transactional memory support") > Fixes: 0a8eccefcb34 ("KVM: PPC: Book3S HV: Add missing code for transaction reclaim on guest exit") > Cc: stable@vger.kernel.org # v3.15+ > Signed-off-by: Paul Mackerras Applied to kvm-ppc-next. Paul.