qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair.francis@xilinx.com>
To: Alistair Francis <alistair.francis@xilinx.com>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	Edgar Iglesias <edgar.iglesias@xilinx.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Edgar Iglesias <edgar.iglesias@gmail.com>
Subject: Re: [Qemu-devel] [RFC v1 3/3] target/arm: Correct exclusive store return value
Date: Fri, 11 Aug 2017 13:53:23 -0700	[thread overview]
Message-ID: <CAKmqyKNoXxHLzemFXqjTYz9CK_TGPHyH=HexWWQbFHT8vpf5CQ@mail.gmail.com> (raw)
In-Reply-To: <CAKmqyKM1p2-9roBs1Lh-7UUvQ+JGW4LWTPbLJ=VWzae2Q2s4uw@mail.gmail.com>

On Fri, Aug 11, 2017 at 1:39 PM, Alistair Francis
<alistair.francis@xilinx.com> wrote:
> On Fri, Aug 11, 2017 at 1:38 PM, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>> On 08/11/2017 01:29 PM, Alistair Francis wrote:
>>> On Fri, Aug 11, 2017 at 1:24 PM, Richard Henderson
>>> <richard.henderson@linaro.org> wrote:
>>>> On 08/11/2017 01:13 PM, Alistair Francis wrote:
>>>>>>> +            tcg_gen_ext_i64(val, val, memop);
>>>>>>
>>>>>> What is this addition intended to accomplish?  Because of the position within
>>>>>> the code, you know that memop contains MO_64, so that this is a no-op.
>>>>>
>>>>> This is when size == 2 so it's a 32bit operation so memop contains MO_32.
>>>>
>>>> It's a paired 32-bit operation, so we're operating on a 64-bit quantity.  So
>>>> extending from 32-bits would be actively wrong.
>>>
>>> From what I can see though, the 32bit memop is carried into the
>>> tcg_gen_atomic_cmpxchg_i64() call so the value returned to tmp is
>>> masked by the 32bit operation.
>>>
>>> Is passing down MO_32 into tcg_gen_atomic_cmpxchg_i64() wrong then as
>>> it ends up as a 64-bit operation?
>>
>> If we're passing MO_32 down to cmpxchg_i64 for this case, you have indeed found
>> a bug.  I'll investigate this further on Monday.
>
> Maybe that is why I'm seeing these failures. I'll have a look as well
> to see if this fixes my problems.

That's it. That wrong mask was causing all my breakages.

I'll send out a new series, thanks for your help.

Thanks,
Alistair

>
> Thanks,
> Alistair
>
>>
>>
>> r~
>>

      reply	other threads:[~2017-08-11 20:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-11 18:19 [Qemu-devel] [RFC v1 0/3] Fixup exclusive store logic Alistair Francis
2017-08-11 18:19 ` [Qemu-devel] [RFC v1 1/3] target/arm: Update the memops for exclusive load Alistair Francis
2017-08-11 19:59   ` Richard Henderson
2017-08-11 18:19 ` [Qemu-devel] [RFC v1 2/3] tcg/tcg-op: Expose the tcg_gen_ext_i* functions Alistair Francis
2017-08-11 20:00   ` Richard Henderson
2017-08-11 18:19 ` [Qemu-devel] [RFC v1 3/3] target/arm: Correct exclusive store return value Alistair Francis
2017-08-11 19:46   ` Richard Henderson
2017-08-11 20:13     ` Alistair Francis
2017-08-11 20:24       ` Richard Henderson
2017-08-11 20:29         ` Alistair Francis
2017-08-11 20:38           ` Richard Henderson
2017-08-11 20:39             ` Alistair Francis
2017-08-11 20:53               ` Alistair Francis [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='CAKmqyKNoXxHLzemFXqjTYz9CK_TGPHyH=HexWWQbFHT8vpf5CQ@mail.gmail.com' \
    --to=alistair.francis@xilinx.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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;
as well as URLs for NNTP newsgroup(s).