All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollisb@us.ibm.com>
To: kvm-ppc@vger.kernel.org
Subject: [kvm-ppc-devel] [PATCH] avoid clobbering exit_reason
Date: Sat, 08 Mar 2008 19:48:14 +0000	[thread overview]
Message-ID: <1205005694.5742.28.camel@basalt> (raw)

FYI, here's the fix for another nasty yet dumb bug in which we were
losing MMIOs by clobbering exit_reason when a signal is pending:

diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -388,7 +388,9 @@ int kvmppc_handle_exit(struct kvm_run *r
 
        kvmppc_check_and_deliver_interrupts(vcpu);
 
-       if (signal_pending(current)) {
+       /* Only check for signals if we aren't already exiting for some other
+        * reason. This keeps us from clobbering exit_reason. */
+       if (!(r & RESUME_HOST) && signal_pending(current)) {
                run->exit_reason = KVM_EXIT_INTR;
                r = (-EINTR << 2) | RESUME_HOST | (r & RESUME_FLAG_NV);
        }

As far as I know, there are currently no more showstopper bugs, so we
can get back to making network IO work.

Updated patches are in the usual place: http://penguinppc.org/~hollisb/kvm/

-- 
Hollis Blanchard
IBM Linux Technology Center


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

                 reply	other threads:[~2008-03-08 19:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1205005694.5742.28.camel@basalt \
    --to=hollisb@us.ibm.com \
    --cc=kvm-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.