On Thu, Jan 11, 2018 at 06:11:33PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo <wei.guo.si...@gmail.com> > > Currently kvmppc_handle_fac() will not update NV GPRs and thus it can > return with GUEST_RESUME. > > However PR KVM guest always disables MSR_TM bit at privilege state. If PR > privilege guest are trying to read TM SPRs, it will trigger TM facility > unavailable exception and fall into kvmppc_handle_fac(). Then the emulation > will be done by kvmppc_core_emulate_mfspr_pr(). The mfspr instruction can > include a RT with NV reg. So it is necessary to restore NV GPRs at this > case, to reflect the update to NV RT. > > This patch make kvmppc_handle_fac() return GUEST_RESUME_NV at TM fac > exception and with guest privilege state. > > Signed-off-by: Simon Guo <wei.guo.si...@gmail.com>
Reviewed-by: Paul Mackerras <pau...@ozlabs.org>