diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-07-26 15:19:01 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-07-26 19:04:56 +0200 |
commit | 7b5e0a4e82bf5a451b57586cd4401f0907fcf68c (patch) | |
tree | f3a170d3864b407e25c03cca6de9c71b41c06dd3 | |
parent | 1d518c6820daf4e00d29adfba980aee05f605f0f (diff) | |
parent | ef42719814db06fdfa26cd7566de0b64de173320 (diff) | |
download | linux-stable-7b5e0a4e82bf5a451b57586cd4401f0907fcf68c.tar.gz linux-stable-7b5e0a4e82bf5a451b57586cd4401f0907fcf68c.tar.bz2 linux-stable-7b5e0a4e82bf5a451b57586cd4401f0907fcf68c.zip |
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 <pbonzini@redhat.com>
-rw-r--r-- | arch/powerpc/kvm/book3s_64_mmu_hv.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c index 8cb0190e2a73..b42812e014c0 100644 --- a/arch/powerpc/kvm/book3s_64_mmu_hv.c +++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c @@ -164,8 +164,10 @@ long kvmppc_alloc_reset_hpt(struct kvm *kvm, int order) goto out; } - if (kvm->arch.hpt.virt) + if (kvm->arch.hpt.virt) { kvmppc_free_hpt(&kvm->arch.hpt); + kvmppc_rmap_reset(kvm); + } err = kvmppc_allocate_hpt(&info, order); if (err < 0) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 0b436df746fc..359c79cdf0cc 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -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; 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_tfiar = mfspr(SPRN_TFIAR); current->thread.tm_texasr = mfspr(SPRN_TEXASR); |