From: Paul Mackerras Date: Tue, 30 Apr 2019 10:08:52 +0000 Subject: Re: [PATCH] KVM: PPC: Book3S HV: Save/restore vrsave register in kvmhv_p9_guest_entry() Message-Id: <20190430100852.GI32205@blackberry> List-Id: References: <20190430004123.1189-1-sjitindarsingh@gmail.com> In-Reply-To: <20190430004123.1189-1-sjitindarsingh@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Suraj Jitindar Singh Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org On Tue, Apr 30, 2019 at 10:41:23AM +1000, Suraj Jitindar Singh wrote: > On POWER9 and later processors where the host can schedule vcpus on a > per thread basis, there is a streamlined entry path used when the guest > is radix. This entry path saves/restores the fp and vr state in > kvmhv_p9_guest_entry() by calling store_[fp/vr]_state() and > load_[fp/vr]_state(). This is the same as the old entry path however the > old entry path also saved/restored the VRSAVE register, which isn't done > in the new entry path. > > This means that the vrsave register is now volatile across guest exit, > which is an incorrect change in behaviour. > > Fix this by saving/restoring the vrsave register in kvmhv_p9_guest_entry(). > This restores the old, correct, behaviour. > > Fixes: 95a6432ce9038 ("KVM: PPC: Book3S HV: Streamlined guest entry/exit path on P9 for radix guests") > > Signed-off-by: Suraj Jitindar Singh Thanks, patch applied to my kvm-ppc-next tree. Paul.