From: David Gibson <david@gibson.dropbear.id.au>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, "Alexander Graf" <agraf@suse.de>,
qemu-ppc@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] target/ppc/excp_helper: Take BQL before calling cpu_interrupt()
Date: Tue, 13 Jun 2017 23:29:39 +0800 [thread overview]
Message-ID: <20170613152939.GC13420@umbus> (raw)
In-Reply-To: <1497351329-12936-1-git-send-email-thuth@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]
On Tue, Jun 13, 2017 at 12:55:29PM +0200, Thomas Huth wrote:
> Since the introduction of MTTCG, using the msgsnd instruction
> abort()s if being called without holding the BQL. So let's protect
> that part of the code now with qemu_mutex_lock_iothread().
>
> Buglink: https://bugs.launchpad.net/qemu/+bug/1694998
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Applied to ppc-for-2.10.
> ---
> target/ppc/excp_helper.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
> index 9cb2123..3a9f086 100644
> --- a/target/ppc/excp_helper.c
> +++ b/target/ppc/excp_helper.c
> @@ -17,6 +17,7 @@
> * License along with this library; if not, see <http://www.gnu.org/licenses/>.
> */
> #include "qemu/osdep.h"
> +#include "qemu/main-loop.h"
> #include "cpu.h"
> #include "exec/helper-proto.h"
> #include "exec/exec-all.h"
> @@ -1132,6 +1133,7 @@ void helper_msgsnd(target_ulong rb)
> return;
> }
>
> + qemu_mutex_lock_iothread();
> CPU_FOREACH(cs) {
> PowerPCCPU *cpu = POWERPC_CPU(cs);
> CPUPPCState *cenv = &cpu->env;
> @@ -1141,5 +1143,6 @@ void helper_msgsnd(target_ulong rb)
> cpu_interrupt(cs, CPU_INTERRUPT_HARD);
> }
> }
> + qemu_mutex_unlock_iothread();
> }
> #endif
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2017-06-14 1:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 10:55 [Qemu-devel] [PATCH] target/ppc/excp_helper: Take BQL before calling cpu_interrupt() Thomas Huth
2017-06-13 14:14 ` Alex Bennée
2017-06-15 2:32 ` [Qemu-devel] [Qemu-ppc] " Nikunj A Dadhania
2017-06-15 9:09 ` Alex Bennée
2017-06-13 15:29 ` David Gibson [this message]
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=20170613152939.GC13420@umbus \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.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 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.