Lines Matching +full:mode +full:- +full:xxx

1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <asm/ppc-opcode.h>
15 * This handles the cases where the guest is in real suspend mode
17 * The caller has checked that the guest is in real-suspend mode
18 * (MSR[TS] = S and the fake-suspend flag is not set).
22 u32 instr = vcpu->arch.emul_inst; in kvmhv_p9_tm_emulation_early()
32 * to handle TM-related invalid forms that have bit 31 = 0. Moreover, in kvmhv_p9_tm_emulation_early()
39 /* XXX do we need to check for PR=0 here? */ in kvmhv_p9_tm_emulation_early()
40 newmsr = vcpu->arch.shregs.srr1; in kvmhv_p9_tm_emulation_early()
41 /* should only get here for Sx -> T1 transition */ in kvmhv_p9_tm_emulation_early()
45 vcpu->arch.shregs.msr = newmsr; in kvmhv_p9_tm_emulation_early()
46 vcpu->arch.cfar = vcpu->arch.regs.nip - 4; in kvmhv_p9_tm_emulation_early()
47 vcpu->arch.regs.nip = vcpu->arch.shregs.srr0; in kvmhv_p9_tm_emulation_early()
52 msr = vcpu->arch.shregs.msr; in kvmhv_p9_tm_emulation_early()
53 if ((msr & MSR_PR) && (vcpu->arch.vcore->pcr & PCR_ARCH_206)) in kvmhv_p9_tm_emulation_early()
56 if (!(vcpu->arch.hfscr & HFSCR_EBB) || in kvmhv_p9_tm_emulation_early()
60 /* expect to see a S->T transition requested */ in kvmhv_p9_tm_emulation_early()
68 vcpu->arch.shregs.msr = msr; in kvmhv_p9_tm_emulation_early()
69 vcpu->arch.cfar = vcpu->arch.regs.nip - 4; in kvmhv_p9_tm_emulation_early()
70 vcpu->arch.regs.nip = mfspr(SPRN_EBBRR); in kvmhv_p9_tm_emulation_early()
74 /* XXX do we need to check for PR=0 here? */ in kvmhv_p9_tm_emulation_early()
77 msr = vcpu->arch.shregs.msr; in kvmhv_p9_tm_emulation_early()
78 /* check this is a Sx -> T1 transition */ in kvmhv_p9_tm_emulation_early()
84 vcpu->arch.shregs.msr = newmsr; in kvmhv_p9_tm_emulation_early()
90 msr = vcpu->arch.shregs.msr; in kvmhv_p9_tm_emulation_early()
92 if ((msr & MSR_PR) && (vcpu->arch.vcore->pcr & PCR_ARCH_206)) in kvmhv_p9_tm_emulation_early()
95 if (!(vcpu->arch.hfscr & HFSCR_TM) || !(msr & MSR_TM)) in kvmhv_p9_tm_emulation_early()
99 vcpu->arch.shregs.msr = (msr & ~MSR_TS_MASK) | MSR_TS_T; in kvmhv_p9_tm_emulation_early()
101 vcpu->arch.regs.ccr = (vcpu->arch.regs.ccr & 0x0fffffff) | in kvmhv_p9_tm_emulation_early()
115 vcpu->arch.shregs.msr &= ~MSR_TS_MASK; /* go to N state */ in kvmhv_emulate_tm_rollback()
116 vcpu->arch.regs.nip = vcpu->arch.tfhar; in kvmhv_emulate_tm_rollback()
118 vcpu->arch.regs.ccr = (vcpu->arch.regs.ccr & 0x0fffffff) | 0xa0000000; in kvmhv_emulate_tm_rollback()