KVM: PPC: Book3S HV: Remove TM emulation from POWER7/8 path
TM fake-suspend emulation is only used by POWER9. Remove it from the old code path. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210811160134.904987-3-npiggin@gmail.com
This commit is contained in:
parent
fd42b7b09c
commit
daac40e8d7
|
@ -1088,12 +1088,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
|
||||||
cmpwi r12, BOOK3S_INTERRUPT_H_INST_STORAGE
|
cmpwi r12, BOOK3S_INTERRUPT_H_INST_STORAGE
|
||||||
beq kvmppc_hisi
|
beq kvmppc_hisi
|
||||||
|
|
||||||
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
|
||||||
/* For softpatch interrupt, go off and do TM instruction emulation */
|
|
||||||
cmpwi r12, BOOK3S_INTERRUPT_HV_SOFTPATCH
|
|
||||||
beq kvmppc_tm_emul
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* See if this is a leftover HDEC interrupt */
|
/* See if this is a leftover HDEC interrupt */
|
||||||
cmpwi r12,BOOK3S_INTERRUPT_HV_DECREMENTER
|
cmpwi r12,BOOK3S_INTERRUPT_HV_DECREMENTER
|
||||||
bne 2f
|
bne 2f
|
||||||
|
@ -1599,42 +1593,6 @@ maybe_reenter_guest:
|
||||||
blt deliver_guest_interrupt
|
blt deliver_guest_interrupt
|
||||||
b guest_exit_cont
|
b guest_exit_cont
|
||||||
|
|
||||||
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
|
||||||
/*
|
|
||||||
* Softpatch interrupt for transactional memory emulation cases
|
|
||||||
* on POWER9 DD2.2. This is early in the guest exit path - we
|
|
||||||
* haven't saved registers or done a treclaim yet.
|
|
||||||
*/
|
|
||||||
kvmppc_tm_emul:
|
|
||||||
/* Save instruction image in HEIR */
|
|
||||||
mfspr r3, SPRN_HEIR
|
|
||||||
stw r3, VCPU_HEIR(r9)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The cases we want to handle here are those where the guest
|
|
||||||
* is in real suspend mode and is trying to transition to
|
|
||||||
* transactional mode.
|
|
||||||
*/
|
|
||||||
lbz r0, HSTATE_FAKE_SUSPEND(r13)
|
|
||||||
cmpwi r0, 0 /* keep exiting guest if in fake suspend */
|
|
||||||
bne guest_exit_cont
|
|
||||||
rldicl r3, r11, 64 - MSR_TS_S_LG, 62
|
|
||||||
cmpwi r3, 1 /* or if not in suspend state */
|
|
||||||
bne guest_exit_cont
|
|
||||||
|
|
||||||
/* Call C code to do the emulation */
|
|
||||||
mr r3, r9
|
|
||||||
bl kvmhv_p9_tm_emulation_early
|
|
||||||
nop
|
|
||||||
ld r9, HSTATE_KVM_VCPU(r13)
|
|
||||||
li r12, BOOK3S_INTERRUPT_HV_SOFTPATCH
|
|
||||||
cmpwi r3, 0
|
|
||||||
beq guest_exit_cont /* continue exiting if not handled */
|
|
||||||
ld r10, VCPU_PC(r9)
|
|
||||||
ld r11, VCPU_MSR(r9)
|
|
||||||
b fast_interrupt_c_return /* go back to guest if handled */
|
|
||||||
#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check whether an HDSI is an HPTE not found fault or something else.
|
* Check whether an HDSI is an HPTE not found fault or something else.
|
||||||
* If it is an HPTE not found fault that is due to the guest accessing
|
* If it is an HPTE not found fault that is due to the guest accessing
|
||||||
|
|
Loading…
Reference in New Issue