powerpc/64s/exception: KVM handler can set the HSRR trap bit
[linux-2.6-block.git] / arch / powerpc / include / asm / exception-64s.h
index d2a5bbeb727d7a730a1488235b925c9584b6c74e..a7b514574b80a0f1c13360abd6548958abd18816 100644 (file)
@@ -454,7 +454,12 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
        ld      r10,\area+EX_R10(r13)
        std     r12,HSTATE_SCRATCH0(r13)
        sldi    r12,r9,32
+       /* HSRR variants have the 0x2 bit added to their trap number */
+       .if \hsrr
+       ori     r12,r12,(\n + 0x2)
+       .else
        ori     r12,r12,(\n)
+       .endif
        /* This reloads r9 before branching to kvmppc_interrupt */
        __BRANCH_TO_KVM_EXIT(\area, kvmppc_interrupt)