Commit bc403203 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'powerpc-5.18-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fix from Michael Ellerman:

 - Fix KVM PR on 32-bit, which was broken by some MMU code refactoring.

Thanks to: Alexander Graf, and Matt Evans.

* tag 'powerpc-5.18-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  KVM: PPC: Book3S PR: Enable MSR_DR for switch_mmu_context()
parents 79dc4fc2 ee834849
...@@ -122,11 +122,27 @@ ...@@ -122,11 +122,27 @@
/* 0x0 - 0xb */ /* 0x0 - 0xb */
/* 'current->mm' needs to be in r4 */ /* switch_mmu_context() needs paging, let's enable it */
tophys(r4, r2) mfmsr r9
lwz r4, MM(r4) ori r11, r9, MSR_DR
tophys(r4, r4) mtmsr r11
/* This only clobbers r0, r3, r4 and r5 */ sync
/* switch_mmu_context() clobbers r12, rescue it */
SAVE_GPR(12, r1)
/* Calling switch_mmu_context(<inv>, current->mm, <inv>); */
lwz r4, MM(r2)
bl switch_mmu_context bl switch_mmu_context
/* restore r12 */
REST_GPR(12, r1)
/* Disable paging again */
mfmsr r9
li r6, MSR_DR
andc r9, r9, r6
mtmsr r9
sync
.endm .endm
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment