Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: hollis_blanchard@mentor.com
To: avi@redhat.com
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, agraf@suse.de
Subject: [PATCH 1 of 3] KVM: PPC: initialize IVORs in addition to IVPR
Date: Sat, 07 Aug 2010 10:33:56 -0700	[thread overview]
Message-ID: <3c7aca9f48eeb96f3203.1281202436@localhost6.localdomain6> (raw)
In-Reply-To: <patchbomb.1281202435@localhost6.localdomain6>

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>


---
 arch/powerpc/kvm/booke.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -466,15 +466,19 @@ int kvmppc_handle_exit(struct kvm_run *r
 /* Initial guest state: 16MB mapping 0 -> 0, PC = 0, MSR = 0, R1 = 16MB */
 int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
 {
+	int i;
+
 	vcpu->arch.pc = 0;
 	vcpu->arch.msr = 0;
 	kvmppc_set_gpr(vcpu, 1, (16<<20) - 8); /* -8 for the callee-save LR slot */
 
 	vcpu->arch.shadow_pid = 1;
 
-	/* Eye-catching number so we know if the guest takes an interrupt
-	 * before it's programmed its own IVPR. */
+	/* Eye-catching numbers so we know if the guest takes an interrupt
+	 * before it's programmed its own IVPR/IVORs. */
 	vcpu->arch.ivpr = 0x55550000;
+	for (i = 0; i < BOOKE_IRQPRIO_MAX; i++)
+		vcpu->arch.ivor[i] = 0x7700 | i * 4;
 
 	kvmppc_init_timing_stats(vcpu);
 

  reply	other threads:[~2010-08-07 17:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-07 17:33 [PATCH 0 of 3] Fix KVM on PowerPC 440GP hollis_blanchard
2010-08-07 17:33 ` hollis_blanchard [this message]
     [not found] ` <patchbomb.1281202435-bi+AKbBUZKagILUCTcTcHdKyNwTtLsGr@public.gmane.org>
2010-08-07 17:33   ` [PATCH 2 of 3] KVM: PPC: fix compilation of "dump tlbs" debug function hollis_blanchard-nmGgyN9QBj3QT0dZR+AlfA
2010-08-07 17:33   ` [PATCH 3 of 3] KVM: PPC: allow ppc440gp to pass the compatibility check hollis_blanchard-nmGgyN9QBj3QT0dZR+AlfA
2010-08-17  9:27   ` [PATCH 0 of 3] Fix KVM on PowerPC 440GP Avi Kivity
     [not found]     ` <4C6A561B.9080903-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-08-17  9:35       ` Alexander Graf
2010-08-16 13:19 ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3c7aca9f48eeb96f3203.1281202436@localhost6.localdomain6 \
    --to=hollis_blanchard@mentor.com \
    --cc=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox