Skip to content

Commit 082decf

Browse files
Hollis Blanchardavikivity
authored andcommitted
KVM: PPC: initialize IVORs in addition to IVPR
Developers can now tell at a glace the exact type of the premature interrupt, instead of just knowing that there was some premature interrupt. Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com> Signed-off-by: Alexander Graf <agraf@suse.de>
1 parent 296c19d commit 082decf

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎arch/powerpc/kvm/booke.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,15 +497,19 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
497497
/* Initial guest state: 16MB mapping 0 -> 0, PC = 0, MSR = 0, R1 = 16MB */
498498
int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
499499
{
500+
int i;
501+
500502
vcpu->arch.pc = 0;
501503
vcpu->arch.shared->msr = 0;
502504
kvmppc_set_gpr(vcpu, 1, (16<<20) - 8); /* -8 for the callee-save LR slot */
503505

504506
vcpu->arch.shadow_pid = 1;
505507

506-
/* Eye-catching number so we know if the guest takes an interrupt
507-
* before it's programmed its own IVPR. */
508+
/* Eye-catching numbers so we know if the guest takes an interrupt
509+
* before it's programmed its own IVPR/IVORs. */
508510
vcpu->arch.ivpr = 0x55550000;
511+
for (i = 0; i < BOOKE_IRQPRIO_MAX; i++)
512+
vcpu->arch.ivor[i] = 0x7700 | i * 4;
509513

510514
kvmppc_init_timing_stats(vcpu);
511515

0 commit comments

Comments
 (0)