Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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()

+21 -5
+21 -5
arch/powerpc/kvm/book3s_32_sr.S
··· 122 122 123 123 /* 0x0 - 0xb */ 124 124 125 - /* 'current->mm' needs to be in r4 */ 126 - tophys(r4, r2) 127 - lwz r4, MM(r4) 128 - tophys(r4, r4) 129 - /* This only clobbers r0, r3, r4 and r5 */ 125 + /* switch_mmu_context() needs paging, let's enable it */ 126 + mfmsr r9 127 + ori r11, r9, MSR_DR 128 + mtmsr r11 129 + sync 130 + 131 + /* switch_mmu_context() clobbers r12, rescue it */ 132 + SAVE_GPR(12, r1) 133 + 134 + /* Calling switch_mmu_context(<inv>, current->mm, <inv>); */ 135 + lwz r4, MM(r2) 130 136 bl switch_mmu_context 137 + 138 + /* restore r12 */ 139 + REST_GPR(12, r1) 140 + 141 + /* Disable paging again */ 142 + mfmsr r9 143 + li r6, MSR_DR 144 + andc r9, r9, r6 145 + mtmsr r9 146 + sync 131 147 132 148 .endm