Skip to content

Commit 7b5e0a4

Browse files
committed
Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-master
Two commits which fix host crashes. Signed-off-by: Paolo BOnzini <[email protected]>
2 parents 1d518c6 + ef42719 commit 7b5e0a4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

arch/powerpc/kvm/book3s_64_mmu_hv.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@ long kvmppc_alloc_reset_hpt(struct kvm *kvm, int order)
164164
goto out;
165165
}
166166

167-
if (kvm->arch.hpt.virt)
167+
if (kvm->arch.hpt.virt) {
168168
kvmppc_free_hpt(&kvm->arch.hpt);
169+
kvmppc_rmap_reset(kvm);
170+
}
169171

170172
err = kvmppc_allocate_hpt(&info, order);
171173
if (err < 0)

arch/powerpc/kvm/book3s_hv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3211,6 +3211,8 @@ static int kvmppc_vcpu_run_hv(struct kvm_run *run, struct kvm_vcpu *vcpu)
32113211
run->fail_entry.hardware_entry_failure_reason = 0;
32123212
return -EINVAL;
32133213
}
3214+
/* Enable TM so we can read the TM SPRs */
3215+
mtmsr(mfmsr() | MSR_TM);
32143216
current->thread.tm_tfhar = mfspr(SPRN_TFHAR);
32153217
current->thread.tm_tfiar = mfspr(SPRN_TFIAR);
32163218
current->thread.tm_texasr = mfspr(SPRN_TEXASR);

0 commit comments

Comments
 (0)