All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: David Gibson <david@gibson.dropbear.id.au>, qemu-devel@nongnu.org
Cc: aik@ozlabs.ru, agraf@suse.de, Benjamin Herrenschmidt <benh@au.ibm.com>
Subject: Re: [Qemu-devel] Missing barriers in hw/virtio.c
Date: Mon, 29 Aug 2011 12:13:47 +0930	[thread overview]
Message-ID: <87ipph2azg.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20110826054008.GL2308@yookeroo.fritz.box>

On Fri, 26 Aug 2011 15:40:08 +1000, David Gibson <david@gibson.dropbear.id.au> wrote:
> Near the top of hw/virtio.c we have this:
> 
> /* QEMU doesn't strictly need write barriers since everything runs in
>  * lock-step.  We'll leave the calls to wmb() in though to make it
>  obvious for
>  * KVM or if kqemu gets SMP support.
>  * In any case, we must prevent the compiler from reordering the code.
>  * TODO: we likely need some rmb()/mb() as well.
>  */
> 
> #define wmb() __asm__ __volatile__("": : :"memory")
> 
> 
> However, as far as I can tell when using both kvm and io-thread, the
> assertion that barriers aren't necessary just isn't true.  Although it
> probably works on x86 with its strongly ordered model.

That looks very much like it's cribbed from the original lguest code.

Very wrong, please fix!

Thanks,
Rusty.

      parent reply	other threads:[~2011-08-29  5:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26  5:40 [Qemu-devel] Missing barriers in hw/virtio.c David Gibson
2011-08-26  6:28 ` Paolo Bonzini
2011-08-29  2:43 ` Rusty Russell [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=87ipph2azg.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=benh@au.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.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 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.