Commit 7b5e0a4e authored by Paolo Bonzini's avatar Paolo Bonzini

Merge branch 'kvm-ppc-fixes' of...

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: default avatarPaolo BOnzini <pbonzini@redhat.com>
parents 1d518c68 ef427198
...@@ -164,8 +164,10 @@ long kvmppc_alloc_reset_hpt(struct kvm *kvm, int order) ...@@ -164,8 +164,10 @@ long kvmppc_alloc_reset_hpt(struct kvm *kvm, int order)
goto out; goto out;
} }
if (kvm->arch.hpt.virt) if (kvm->arch.hpt.virt) {
kvmppc_free_hpt(&kvm->arch.hpt); kvmppc_free_hpt(&kvm->arch.hpt);
kvmppc_rmap_reset(kvm);
}
err = kvmppc_allocate_hpt(&info, order); err = kvmppc_allocate_hpt(&info, order);
if (err < 0) if (err < 0)
......
...@@ -3211,6 +3211,8 @@ static int kvmppc_vcpu_run_hv(struct kvm_run *run, struct kvm_vcpu *vcpu) ...@@ -3211,6 +3211,8 @@ static int kvmppc_vcpu_run_hv(struct kvm_run *run, struct kvm_vcpu *vcpu)
run->fail_entry.hardware_entry_failure_reason = 0; run->fail_entry.hardware_entry_failure_reason = 0;
return -EINVAL; return -EINVAL;
} }
/* Enable TM so we can read the TM SPRs */
mtmsr(mfmsr() | MSR_TM);
current->thread.tm_tfhar = mfspr(SPRN_TFHAR); current->thread.tm_tfhar = mfspr(SPRN_TFHAR);
current->thread.tm_tfiar = mfspr(SPRN_TFIAR); current->thread.tm_tfiar = mfspr(SPRN_TFIAR);
current->thread.tm_texasr = mfspr(SPRN_TEXASR); current->thread.tm_texasr = mfspr(SPRN_TEXASR);
......
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