aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kvm/booke.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index c604277011a6..835f6d0e4f20 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -497,15 +497,19 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
497/* Initial guest state: 16MB mapping 0 -> 0, PC = 0, MSR = 0, R1 = 16MB */ 497/* Initial guest state: 16MB mapping 0 -> 0, PC = 0, MSR = 0, R1 = 16MB */
498int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) 498int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
499{ 499{
500 int i;
501
500 vcpu->arch.pc = 0; 502 vcpu->arch.pc = 0;
501 vcpu->arch.shared->msr = 0; 503 vcpu->arch.shared->msr = 0;
502 kvmppc_set_gpr(vcpu, 1, (16<<20) - 8); /* -8 for the callee-save LR slot */ 504 kvmppc_set_gpr(vcpu, 1, (16<<20) - 8); /* -8 for the callee-save LR slot */
503 505
504 vcpu->arch.shadow_pid = 1; 506 vcpu->arch.shadow_pid = 1;
505 507
506 /* Eye-catching number so we know if the guest takes an interrupt 508 /* Eye-catching numbers so we know if the guest takes an interrupt
507 * before it's programmed its own IVPR. */ 509 * before it's programmed its own IVPR/IVORs. */
508 vcpu->arch.ivpr = 0x55550000; 510 vcpu->arch.ivpr = 0x55550000;
511 for (i = 0; i < BOOKE_IRQPRIO_MAX; i++)
512 vcpu->arch.ivor[i] = 0x7700 | i * 4;
509 513
510 kvmppc_init_timing_stats(vcpu); 514 kvmppc_init_timing_stats(vcpu);
511 515