From: Rusty Russell <rusty@rustcorp.com.au>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org, Paul Brook <paul@codesourcery.com>
Subject: [Qemu-devel] Re: [PATCH-RFC 0/3] qemu: memory barriers in virtio
Date: Mon, 4 Jan 2010 12:37:18 +1030 [thread overview]
Message-ID: <201001041237.19177.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20091223163600.GD6588@redhat.com>
On Thu, 24 Dec 2009 03:06:00 am Michael S. Tsirkin wrote:
> On Wed, Dec 23, 2009 at 05:04:19PM +1030, Rusty Russell wrote:
> > It's possible, but I don't know of any missing cases. Certainly *lguest* i
> > is missing barriers, since it's UP, but the core virtio should have them.
>
> Something that Paul Brook pointed out, is that
> using a 16 bit value in C like we do in guest, e.g. with
> ring->avail.idx
> might in theory result in two single byte reads.
>
> If this happens, guest will see a wrong index value.
In the Linux kernel we make atomicity assumptions about fundamental types.
(Specifically pointers).
QEMU may not want to rely on such assumptions however, and make them explicit.
I have sympathy with Paul here.
Cheers,
Rusty.
prev parent reply other threads:[~2010-01-04 2:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 16:18 [Qemu-devel] [PATCH-RFC 0/3] qemu: memory barriers in virtio Michael S. Tsirkin
2009-12-22 11:26 ` [Qemu-devel] " Michael S. Tsirkin
2009-12-22 14:51 ` Anthony Liguori
2009-12-22 16:25 ` Paul Brook
2009-12-22 16:34 ` Michael S. Tsirkin
2009-12-22 22:58 ` Paul Brook
2009-12-22 17:28 ` Avi Kivity
[not found] ` <200912231704.19449.rusty@rustcorp.com.au>
[not found] ` <20091223163600.GD6588@redhat.com>
2010-01-04 2:07 ` 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=201001041237.19177.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=mst@redhat.com \
--cc=paul@codesourcery.com \
--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.