From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NN65X-0002t2-Hu for qemu-devel@nongnu.org; Tue, 22 Dec 2009 09:51:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NN65S-0002s9-O9 for qemu-devel@nongnu.org; Tue, 22 Dec 2009 09:51:51 -0500 Received: from [199.232.76.173] (port=40990 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NN65S-0002s6-LG for qemu-devel@nongnu.org; Tue, 22 Dec 2009 09:51:46 -0500 Received: from mail-yx0-f188.google.com ([209.85.210.188]:33703) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NN65S-0000NT-CC for qemu-devel@nongnu.org; Tue, 22 Dec 2009 09:51:46 -0500 Received: by yxe26 with SMTP id 26so5980806yxe.4 for ; Tue, 22 Dec 2009 06:51:45 -0800 (PST) Message-ID: <4B30DCFF.8050305@codemonkey.ws> Date: Tue, 22 Dec 2009 08:51:43 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <20091208161818.GA32188@redhat.com> <20091222112601.GA16053@redhat.com> In-Reply-To: <20091222112601.GA16053@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH-RFC 0/3] qemu: memory barriers in virtio List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Rusty Russell , qemu-devel@nongnu.org, Paul Brook On 12/22/2009 05:26 AM, Michael S. Tsirkin wrote: > On Tue, Dec 08, 2009 at 06:18:18PM +0200, Michael S. Tsirkin wrote: > >> The following fixes a class of long-standing bugs in qemu: >> when kvm is enabled, guest might access device structures >> in memory while they are updated by qemu on another CPU. >> In this scenario, memory barriers are necessary to prevent >> host CPU from reordering memory accesses, which might confuse >> the guest. >> >> This patch only fixes virtio, but other emulated devices >> might have a similar bug. They'll need to be discovered >> and addressed case by case. >> >> This is still under test ... meanwhile: any early feedback/flames? >> >> > Any comments on this one? > The patch works fine in my testing, and even though > it did not fix a crash that I hoped it will fix, > it seems required for correctness... Right? > It's definitely better than what we have. Rusty mentioned something to me a bit ago about the barriers for virtio in the kernel needing some work. I've been meaning to ask him about it in the context of this patch. Rusty, am I remembering correctly or have I been sipping too much eggnog? :-) Regards, Anthony Liguori