]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S PR: Sync TM bits to shadow msr for problem state guest
authorSimon Guo <wei.guo.simon@gmail.com>
Wed, 23 May 2018 07:01:53 +0000 (15:01 +0800)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 1 Jun 2018 00:29:33 +0000 (10:29 +1000)
commit90498a7a808afcb2ec1bee53df12a8815755f909
tree769f08fc7ac63104cfb3df5893c0302ff094727d
parente4d046997a2cd2ad9d759162623418f1fa0eaf2d
KVM: PPC: Book3S PR: Sync TM bits to shadow msr for problem state guest

MSR TS bits can be modified with non-privileged instruction such as
tbegin./tend.  That means guest can change MSR value "silently" without
notifying host.

It is necessary to sync the TM bits to host so that host can calculate
shadow msr correctly.

Note, privileged mode in the guest will always fail transactions so we
only take care of problem state mode in the guest.

The logic is put into kvmppc_copy_from_svcpu() so that
kvmppc_handle_exit_pr() can use correct MSR TM bits even when preemption
occurs.

Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_pr.c