qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH-RFC 0/3] qemu: memory barriers in virtio


From: Rusty Russell
Subject: [Qemu-devel] Re: [PATCH-RFC 0/3] qemu: memory barriers in virtio
Date: Mon, 4 Jan 2010 12:37:18 +1030
User-agent: KMail/1.12.2 (Linux/2.6.31-16-generic; KDE/4.3.2; i686; ; )

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]