summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/bookehv_interrupts.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kvm/bookehv_interrupts.S')
-rw-r--r--arch/powerpc/kvm/bookehv_interrupts.S58
1 files changed, 21 insertions, 37 deletions
diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S
index 909e96e0650c..6048a00515d7 100644
--- a/arch/powerpc/kvm/bookehv_interrupts.S
+++ b/arch/powerpc/kvm/bookehv_interrupts.S
@@ -87,17 +87,13 @@
mfspr r8, SPRN_TBRL
mfspr r9, SPRN_TBRU
cmpw r9, r7
- PPC_STL r8, VCPU_TIMING_EXIT_TBL(r4)
+ stw r8, VCPU_TIMING_EXIT_TBL(r4)
bne- 1b
- PPC_STL r9, VCPU_TIMING_EXIT_TBU(r4)
+ stw r9, VCPU_TIMING_EXIT_TBU(r4)
#endif
oris r8, r6, MSR_CE@h
-#ifdef CONFIG_64BIT
- std r6, (VCPU_SHARED_MSR)(r11)
-#else
- stw r6, (VCPU_SHARED_MSR + 4)(r11)
-#endif
+ PPC_STD(r6, VCPU_SHARED_MSR, r11)
ori r8, r8, MSR_ME | MSR_RI
PPC_STL r5, VCPU_PC(r4)
@@ -220,7 +216,7 @@ _GLOBAL(kvmppc_handler_\intno\()_\srr1)
PPC_STL r4, VCPU_GPR(r4)(r11)
PPC_LL r4, THREAD_NORMSAVE(0)(r10)
PPC_STL r5, VCPU_GPR(r5)(r11)
- PPC_STL r13, VCPU_CR(r11)
+ stw r13, VCPU_CR(r11)
mfspr r5, \srr0
PPC_STL r3, VCPU_GPR(r10)(r11)
PPC_LL r3, THREAD_NORMSAVE(2)(r10)
@@ -247,7 +243,7 @@ _GLOBAL(kvmppc_handler_\intno\()_\srr1)
PPC_STL r4, VCPU_GPR(r4)(r11)
PPC_LL r4, GPR9(r8)
PPC_STL r5, VCPU_GPR(r5)(r11)
- PPC_STL r9, VCPU_CR(r11)
+ stw r9, VCPU_CR(r11)
mfspr r5, \srr0
PPC_STL r3, VCPU_GPR(r8)(r11)
PPC_LL r3, GPR10(r8)
@@ -256,10 +252,10 @@ _GLOBAL(kvmppc_handler_\intno\()_\srr1)
mfspr r6, \srr1
PPC_LL r4, GPR11(r8)
PPC_STL r7, VCPU_GPR(r7)(r11)
- PPC_STL r8, VCPU_GPR(r8)(r11)
PPC_STL r3, VCPU_GPR(r10)(r11)
mfctr r7
PPC_STL r12, VCPU_GPR(r12)(r11)
+ PPC_STL r13, VCPU_GPR(r13)(r11)
PPC_STL r4, VCPU_GPR(r11)(r11)
PPC_STL r7, VCPU_CTR(r11)
mr r4, r11
@@ -319,14 +315,14 @@ _GLOBAL(kvmppc_resume_host)
mfspr r6, SPRN_SPRG4
PPC_STL r5, VCPU_LR(r4)
mfspr r7, SPRN_SPRG5
- PPC_STL r3, VCPU_VRSAVE(r4)
- PPC_STL r6, VCPU_SHARED_SPRG4(r11)
+ stw r3, VCPU_VRSAVE(r4)
+ PPC_STD(r6, VCPU_SHARED_SPRG4, r11)
mfspr r8, SPRN_SPRG6
- PPC_STL r7, VCPU_SHARED_SPRG5(r11)
+ PPC_STD(r7, VCPU_SHARED_SPRG5, r11)
mfspr r9, SPRN_SPRG7
- PPC_STL r8, VCPU_SHARED_SPRG6(r11)
+ PPC_STD(r8, VCPU_SHARED_SPRG6, r11)
mfxer r3
- PPC_STL r9, VCPU_SHARED_SPRG7(r11)
+ PPC_STD(r9, VCPU_SHARED_SPRG7, r11)
/* save guest MAS registers and restore host mas4 & mas6 */
mfspr r5, SPRN_MAS0
@@ -335,11 +331,7 @@ _GLOBAL(kvmppc_resume_host)
stw r5, VCPU_SHARED_MAS0(r11)
mfspr r7, SPRN_MAS2
stw r6, VCPU_SHARED_MAS1(r11)
-#ifdef CONFIG_64BIT
- std r7, (VCPU_SHARED_MAS2)(r11)
-#else
- stw r7, (VCPU_SHARED_MAS2 + 4)(r11)
-#endif
+ PPC_STD(r7, VCPU_SHARED_MAS2, r11)
mfspr r5, SPRN_MAS3
mfspr r6, SPRN_MAS4
stw r5, VCPU_SHARED_MAS7_3+4(r11)
@@ -527,11 +519,7 @@ lightweight_exit:
stw r3, VCPU_HOST_MAS6(r4)
lwz r3, VCPU_SHARED_MAS0(r11)
lwz r5, VCPU_SHARED_MAS1(r11)
-#ifdef CONFIG_64BIT
- ld r6, (VCPU_SHARED_MAS2)(r11)
-#else
- lwz r6, (VCPU_SHARED_MAS2 + 4)(r11)
-#endif
+ PPC_LD(r6, VCPU_SHARED_MAS2, r11)
lwz r7, VCPU_SHARED_MAS7_3+4(r11)
lwz r8, VCPU_SHARED_MAS4(r11)
mtspr SPRN_MAS0, r3
@@ -549,13 +537,13 @@ lightweight_exit:
* SPRGs, so we need to reload them here with the guest's values.
*/
lwz r3, VCPU_VRSAVE(r4)
- lwz r5, VCPU_SHARED_SPRG4(r11)
+ PPC_LD(r5, VCPU_SHARED_SPRG4, r11)
mtspr SPRN_VRSAVE, r3
- lwz r6, VCPU_SHARED_SPRG5(r11)
+ PPC_LD(r6, VCPU_SHARED_SPRG5, r11)
mtspr SPRN_SPRG4W, r5
- lwz r7, VCPU_SHARED_SPRG6(r11)
+ PPC_LD(r7, VCPU_SHARED_SPRG6, r11)
mtspr SPRN_SPRG5W, r6
- lwz r8, VCPU_SHARED_SPRG7(r11)
+ PPC_LD(r8, VCPU_SHARED_SPRG7, r11)
mtspr SPRN_SPRG6W, r7
mtspr SPRN_SPRG7W, r8
@@ -563,13 +551,9 @@ lightweight_exit:
PPC_LL r3, VCPU_LR(r4)
PPC_LL r5, VCPU_XER(r4)
PPC_LL r6, VCPU_CTR(r4)
- PPC_LL r7, VCPU_CR(r4)
+ lwz r7, VCPU_CR(r4)
PPC_LL r8, VCPU_PC(r4)
-#ifdef CONFIG_64BIT
- ld r9, (VCPU_SHARED_MSR)(r11)
-#else
- lwz r9, (VCPU_SHARED_MSR + 4)(r11)
-#endif
+ PPC_LD(r9, VCPU_SHARED_MSR, r11)
PPC_LL r0, VCPU_GPR(r0)(r4)
PPC_LL r1, VCPU_GPR(r1)(r4)
PPC_LL r2, VCPU_GPR(r2)(r4)
@@ -590,9 +574,9 @@ lightweight_exit:
mfspr r9, SPRN_TBRL
mfspr r8, SPRN_TBRU
cmpw r8, r6
- PPC_STL r9, VCPU_TIMING_LAST_ENTER_TBL(r4)
+ stw r9, VCPU_TIMING_LAST_ENTER_TBL(r4)
bne 1b
- PPC_STL r8, VCPU_TIMING_LAST_ENTER_TBU(r4)
+ stw r8, VCPU_TIMING_LAST_ENTER_TBU(r4)
#endif
/*
OpenPOWER on IntegriCloud