qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Fedorov <sergey.fedorov@linaro.org>
To: qemu-devel@nongnu.org
Cc: Sergey Fedorov <serge.fdrv@gmail.com>,
	Sergey Fedorov <sergey.fedorov@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	Richard Henderson <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH] cpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interrupt()
Date: Thu, 12 May 2016 17:14:21 +0300	[thread overview]
Message-ID: <1463062461-717-1-git-send-email-sergey.fedorov@linaro.org> (raw)

From: Sergey Fedorov <serge.fdrv@gmail.com>

Suggested-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com>
Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org>
---

This patch applies on top of commit:
    40ae3669fb55 ("cpu-exec: Remove unused 'x86_cpu' and 'env' from cpu_exec()")
from:
    git://github.com/rth7680/qemu.git tcg-next

 cpu-exec.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/cpu-exec.c b/cpu-exec.c
index 0ea47e997dfa..a7b03f77cf53 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -489,9 +489,10 @@ static inline void cpu_handle_interrupt(CPUState *cpu,
                 *last_tb = NULL;
             }
         }
-        /* Don't use the cached interrupt_request value,
-           do_interrupt may have updated the EXITTB flag. */
-        if (cpu->interrupt_request & CPU_INTERRUPT_EXITTB) {
+        /* The target hook may have updated the 'cpu->interrupt_request';
+         * reload the 'interrupt_request' value */
+        interrupt_request = cpu->interrupt_request;
+        if (interrupt_request & CPU_INTERRUPT_EXITTB) {
             cpu->interrupt_request &= ~CPU_INTERRUPT_EXITTB;
             /* ensure that no TB jump will be modified as
                the program flow was changed */
-- 
1.9.1

             reply	other threads:[~2016-05-12 14:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 14:14 Sergey Fedorov [this message]
2016-05-12 16:47 ` [Qemu-devel] [PATCH] cpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interrupt() Richard Henderson
2016-05-12 16:49   ` Sergey Fedorov

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=1463062461-717-1-git-send-email-sergey.fedorov@linaro.org \
    --to=sergey.fedorov@linaro.org \
    --cc=crosthwaite.peter@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=serge.fdrv@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).