All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Guo <ggang@tilera.com>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu/virtio issue due to non-atomic data access
Date: Fri, 3 May 2013 11:20:59 +0800	[thread overview]
Message-ID: <51832D1B.7050909@tilera.com> (raw)
In-Reply-To: <51823A97.5090505@twiddle.net>

Yes, sounds to be a better idea. I'm wondering whether the final real virtual address for loading in lduw_phys(), etc is aligned also in most cases? given the load address (the input argument with type hwaddr) is required to be aligned (according to the comment). If so we should make the lduw_phys(), etc be the aligned cases by default and add the unaligned versions instead.

Thanks,
Paul

> On 2013-05-02 10:12, Paul Guo wrote:
>> A proper fix for this issue seems to be: Judge whether the address is aligned, do direct loading for the aligned case in ldq_le_p(), etc?
> 
> No, I would think the proper fix would be to change the bits of virtio that are known to access aligned memory to not use the pointer wrapper functions, but to use a normal C memory access followed by leN_to_cpu et al.
> 
> 
> r~

      reply	other threads:[~2013-05-03  3:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02  9:12 [Qemu-devel] qemu/virtio issue due to non-atomic data access Paul Guo
2013-05-02 10:06 ` Richard Henderson
2013-05-03  3:20   ` Paul Guo [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=51832D1B.7050909@tilera.com \
    --to=ggang@tilera.com \
    --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 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.