]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
KVM: PPC: 44x: Initialize PVR
authorAlexander Graf <agraf@suse.de>
Mon, 13 Aug 2012 12:40:29 +0000 (14:40 +0200)
committerAlexander Graf <agraf@suse.de>
Tue, 14 Aug 2012 22:29:28 +0000 (00:29 +0200)
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>
arch/powerpc/kvm/44x.c

index 50e7dbc7356cd0ed574f3ac9fa61ea509fb26439..3d7fd21c65f92eeeb26ce19fc9d7fe07d0cdb36c 100644 (file)
@@ -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;
 }