From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
Henry Wertz <hwertz10@gmail.com>
Cc: qemu-arm <qemu-arm@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [Qemu-arm] ARM memory barrier patch
Date: Tue, 17 Apr 2018 11:58:06 -1000 [thread overview]
Message-ID: <2a15b7bf-1502-6f95-6b7e-12a2990f5a05@linaro.org> (raw)
In-Reply-To: <CAFEAcA8cWYPjN8sxCwzCXhNBucXyhCBMFDA-AJ2zUCr-FKLT1A@mail.gmail.com>
On 04/17/2018 11:51 AM, Peter Maydell wrote:
> On 17 April 2018 at 22:32, Henry Wertz <hwertz10@gmail.com> wrote:
>> Please find submitted a patch for ARM memory barriers. This patch is
>> against qemu-2.12-rc2 but I do believe it should apply for anything from
>> 2.11.x to current. (the code being patched was added in for 2.11 series.)
>>
>>
>> I found with qemu 2.11.x or newer that I would get an illegal instruction
>> error running some Intel binaries on my ARM chromebook. On investigation,
>> I found it was quitting on memory barriers.
>> qemu instruction:
>> mb $0x31
>> was translating as:
>> 0x604050cc: 5bf07ff5 blpl #0x600250a8
>>
>> After patch it gives:
>> 0x604050cc: f57ff05b dmb ish
>>
>> In short, I found INSN_DMB_ISH (memory barrier for ARMv7) appeared to be
>> correct based on online docs, but due to some endian-related shenanigans it
>> had to be byte-swapped to suit qemu; it appears INSN_DMB_MCR (memory barrier
>> for ARMv6) also should be byte swapped (and this patch does so).
>> I have not checked for correctness of aarch64's barrier instruction.
>>
>> Signed-off-by: Henry Wertz <hwertz10@gmail.com>
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>
> Richard, did you want to take this via the tcg tree?
Yes, I can do that.
r~
prev parent reply other threads:[~2018-04-17 21:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-17 21:32 [Qemu-devel] ARM memory barrier patch Henry Wertz
2018-04-17 21:51 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2018-04-17 21:58 ` Richard Henderson [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=2a15b7bf-1502-6f95-6b7e-12a2990f5a05@linaro.org \
--to=richard.henderson@linaro.org \
--cc=hwertz10@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).