diff options
author | Simon Guo <wei.guo.simon@gmail.com> | 2018-05-23 15:02:02 +0800 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2018-06-01 10:30:14 +1000 |
commit | 19c585eb45e360db43790c6724a3ea929ea03de3 (patch) | |
tree | d307a2d9c7c05544fab12e812c33b4e62e2ff907 /certs | |
parent | 5706340a339283fe60d55ddc72ee7728a571a834 (diff) | |
download | linux-19c585eb45e360db43790c6724a3ea929ea03de3.tar.bz2 |
KVM: PPC: Book3S PR: Restore NV regs after emulating mfspr from TM SPRs
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 in privileged state.
If PR privileged-state guest is 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 for TM
facility unavailable exceptions in guest privileged state.
Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
Reviewed-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions