• Simon Guo's avatar
    KVM: PPC: Book3S PR: Sync TM bits to shadow msr for problem state guest · 95757bfc
    Simon Guo authored
    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: default avatarSimon Guo <wei.guo.simon@gmail.com>
    Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
    95757bfc
book3s_pr.c 48 KB