浏览代码

KVM: PPC: 44x: Initialize PVR

We need to make sure that vcpu->arch.pvr is initialized to a sane value,
so let's just take the host PVR.

Signed-off-by: Alexander Graf <agraf@suse.de>
Alexander Graf 13 年之前
父节点
当前提交
491dd5b8a4
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      arch/powerpc/kvm/44x.c

+ 1 - 0
arch/powerpc/kvm/44x.c

@@ -83,6 +83,7 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu)
 		vcpu_44x->shadow_refs[i].gtlb_index = -1;
 
 	vcpu->arch.cpu_type = KVM_CPU_440;
+	vcpu->arch.pvr = mfspr(SPRN_PVR);
 
 	return 0;
 }