Skip to content

Commit 7ef4e98

Browse files
committed
KVM: PPC: Book3S: PR: Handle EMUL_ASSIST
In addition to normal "priviledged instruction" traps, we can also receive "emulation assist" traps on newer hardware that has the HV bit set. Handle that one the same way as a privileged instruction, including the instruction fetching. That way we don't execute old instructions that we happen to still leave in that field when an emul assist trap comes. This fixes -M mac99 / -M g3beige on p7 bare metal for me. Signed-off-by: Alexander Graf <[email protected]>
1 parent 568b445 commit 7ef4e98

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/powerpc/kvm/book3s_segment.S

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
250250
beq ld_last_prev_inst
251251
cmpwi r12, BOOK3S_INTERRUPT_ALIGNMENT
252252
beq- ld_last_inst
253+
#ifdef CONFIG_PPC64
254+
BEGIN_FTR_SECTION
255+
cmpwi r12, BOOK3S_INTERRUPT_H_EMUL_ASSIST
256+
beq- ld_last_inst
257+
END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
258+
#endif
253259

254260
b no_ld_last_inst
255261

0 commit comments

Comments
 (0)