diff options
author | Simon Guo <wei.guo.simon@gmail.com> | 2018-05-23 09:02:06 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2018-06-01 02:30:39 +0200 |
commit | 68ab07b985764ec5be816e7054a84b7ad121afc7 (patch) | |
tree | ffbbcc23ebd5a6dff17e29fd1b0da97fc0b40f00 /arch/powerpc/kvm/book3s_emulate.c | |
parent | KVM: PPC: Book3S PR: Add emulation for tabort. in privileged state (diff) | |
download | linux-68ab07b985764ec5be816e7054a84b7ad121afc7.tar.xz linux-68ab07b985764ec5be816e7054a84b7ad121afc7.zip |
KVM: PPC: Book3S PR: Add guard code to prevent returning to guest with PR=0 and Transactional state
Currently PR KVM doesn't support transaction memory in guest privileged
state.
This patch adds a check at setting guest msr, so that we can never return
to guest with PR=0 and TS=0b10. A tabort will be emulated to indicate
this and fail transaction immediately.
[paulus@ozlabs.org - don't change the TM_CAUSE_MISC definition, instead
use TM_CAUSE_KVM_FAC_UNAV.]
Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/kvm/book3s_emulate.c')
-rw-r--r-- | arch/powerpc/kvm/book3s_emulate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_emulate.c b/arch/powerpc/kvm/book3s_emulate.c index 34f910e03972..67d0fb40e8b2 100644 --- a/arch/powerpc/kvm/book3s_emulate.c +++ b/arch/powerpc/kvm/book3s_emulate.c @@ -199,7 +199,7 @@ static void kvmppc_emulate_trchkpt(struct kvm_vcpu *vcpu) } /* emulate tabort. at guest privilege state */ -static void kvmppc_emulate_tabort(struct kvm_vcpu *vcpu, int ra_val) +void kvmppc_emulate_tabort(struct kvm_vcpu *vcpu, int ra_val) { /* currently we only emulate tabort. but no emulation of other * tabort variants since there is no kernel usage of them at |