From: Scott Wood Date: Thu, 31 Mar 2011 16:11:21 +0000 Subject: Re: [PATCH v5 4/4] KVM: PPC: e500: Save/restore SPE state Message-Id: <20110331111121.19df34be@schlenkerla.am.freescale.net> List-Id: References: <20110330233435.GA19004@schlenkerla.am.freescale.net> In-Reply-To: <20110330233435.GA19004@schlenkerla.am.freescale.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org On Thu, 31 Mar 2011 12:11:48 +0200 Alexander Graf wrote: > >>>>>>> On 31.03.2011, at 05:21, Liu Yu-B13201 wrote: > >>>>>>> > >>>>>>>> > >>>>>>>> I think the patch miss the bit to handle the case that > >>>>>>>> if guest clear the MSR_SPE. Doh. > >>>> So that MSR[SPE] should always be traped. > >>> > >>> It doesn't have to be trapped - we can enable it lazily on > >>> SPE_UNAVAIL :). Of course we should also explicitly enable it > >>> on set_msr. I don't see any benefit to doing this, if we're going to take a trap one way or another. Since we need to trap on clearing it anyway, might as well just keep things simple and have SPE always be a trapworthy MSR bit. > Scott, to verify that I don't completely screw up the lazy FPU work back when I did it, I wrote some small test program that would just initialize an fpu register with a value and then constantly loop to verify if it's still the same. I ran that program with different values on the host and guest sides. That exposed quite a lot of glitches. > > It would be nice if you could provide something similar for the SPE patches, so we have some more faith in it :). OK. -Scott