public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollisb@us.ibm.com>
To: avi@redhat.com
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: [PATCH 9 of 9] kvm: ppc: improve trap emulation
Date: Tue, 04 Nov 2008 15:00:15 -0600	[thread overview]
Message-ID: <899bca80fc7433c99a1c.1225832415@localhost.localdomain> (raw)
In-Reply-To: <patchbomb.1225832406@localhost.localdomain>

set ESR[PTR] when emulating a guest trap. This allows Linux guests to
properly handle WARN_ON() (i.e. detect that it's a non-fatal trap).

Also remove debugging printk in trap emulation.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c
--- a/arch/powerpc/kvm/emulate.c
+++ b/arch/powerpc/kvm/emulate.c
@@ -74,8 +74,8 @@ int kvmppc_emulate_instruction(struct kv
 	int advance = 1;
 
 	switch (get_op(inst)) {
-	case 3:                                                 /* trap */
-		printk("trap!\n");
+	case 3:                                             /* trap */
+		vcpu->arch.esr |= ESR_PTR;
 		kvmppc_core_queue_program(vcpu);
 		advance = 0;
 		break;

  parent reply	other threads:[~2008-11-04 21:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-04 21:00 [PATCH 0 of 9] Kernel updates for PowerPC KVM Hollis Blanchard
2008-11-04 21:00 ` [PATCH 1 of 9] KVM: ppc: refactor instruction emulation into generic and core-specific pieces Hollis Blanchard
2008-11-04 21:00 ` [PATCH 2 of 9] kvm: ppc: Move the last bits of 44x code out of booke.c Hollis Blanchard
2008-11-04 21:00 ` [PATCH 3 of 9] kvm: ppc: create struct kvm_vcpu_44x and introduce container_of() accessor Hollis Blanchard
2008-11-04 21:00 ` [PATCH 4 of 9] kvm: ppc: adjust vcpu types to support 64-bit cores Hollis Blanchard
2008-11-04 21:00 ` [PATCH 5 of 9] [PATCH] kvmppc: fix set regs to take care of msr change Hollis Blanchard
2008-11-04 21:00 ` [PATCH 6 of 9] kvm: ppc: optimize kvm stat handling Hollis Blanchard
2008-11-04 21:00 ` [PATCH 7 of 9] kvm: ppc: optimize find first bit Hollis Blanchard
2008-11-04 21:00 ` [PATCH 8 of 9] kvm: ppc: optimize irq delivery path Hollis Blanchard
2008-11-04 21:00 ` Hollis Blanchard [this message]
2008-11-05 10:40 ` [PATCH 0 of 9] Kernel updates for PowerPC KVM Avi Kivity

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=899bca80fc7433c99a1c.1225832415@localhost.localdomain \
    --to=hollisb@us.ibm.com \
    --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