Skip to content

Commit 3d3319b

Browse files
committed
KVM: PPC: Book3S: PR: Enable interrupts earlier
Now that the svcpu sync is interrupt aware we can enable interrupts earlier in the exit code path again, moving 32bit and 64bit closer together. While at it, document the fact that we're always executing the exit path with interrupts enabled so that the next person doesn't trap over this. Signed-off-by: Alexander Graf <[email protected]>
1 parent 40fdd8c commit 3d3319b

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

arch/powerpc/kvm/book3s_interrupts.S

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ kvm_start_lightweight:
129129
* R12 = exit handler id
130130
* R13 = PACA
131131
* SVCPU.* = guest *
132+
* MSR.EE = 1
132133
*
133134
*/
134135

@@ -148,11 +149,6 @@ kvm_start_lightweight:
148149
nop
149150

150151
#ifdef CONFIG_PPC_BOOK3S_64
151-
/* Re-enable interrupts */
152-
ld r3, HSTATE_HOST_MSR(r13)
153-
ori r3, r3, MSR_EE
154-
MTMSR_EERI(r3)
155-
156152
/*
157153
* Reload kernel SPRG3 value.
158154
* No need to save guest value as usermode can't modify SPRG3.

arch/powerpc/kvm/book3s_rmhandlers.S

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,11 @@ _GLOBAL(kvmppc_entry_trampoline)
153153

154154
li r6, MSR_IR | MSR_DR
155155
andc r6, r5, r6 /* Clear DR and IR in MSR value */
156-
#ifdef CONFIG_PPC_BOOK3S_32
157156
/*
158157
* Set EE in HOST_MSR so that it's enabled when we get into our
159-
* C exit handler function. On 64-bit we delay enabling
160-
* interrupts until we have finished transferring stuff
161-
* to or from the PACA.
158+
* C exit handler function.
162159
*/
163160
ori r5, r5, MSR_EE
164-
#endif
165161
mtsrr0 r7
166162
mtsrr1 r6
167163
RFI

0 commit comments

Comments
 (0)