From: Alex Bligh Subject: Re: workaround for dom0 crash due to QEMU using O_DIRECT Date: Tue, 09 Jul 2013 16:52:23 +0100 Message-ID: <2539FF7DE82B0E6AD4D1ACB2@nimrod.local> References: <20130708191853.GA4927@phenom.dumpdata.com> <8DEF24E1F5A12D950B781A14@Ximines.local> Reply-To: Alex Bligh Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Diana Crisan , xen-devel@lists.xensource.com, Ian Campbell , Alex Bligh , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org George, --On 9 July 2013 14:39:49 +0100 George Dunlap wrote: > It is a bit weird. :-) But what it actually does is make the > behavior of the bug running on Xen the same as the behavior of the bug > on other systems. On bare metal, the contents of a random page will > be sent during the "retransmit" phase. At the moment, under Xen, it > crashes. This makes it send random data instead. It's not *quite* the same. On other systems the read post I/O complete is 'quite likely' (for some value of 'quite') to return the same page, so the write operation might just write the right data or something approximating it. 'Quite likely' is going to be quite high when it's something in the guest's page cache undergoing normal write out. When virtualised through Xen any such operation is guaranteed to (a) kill dom0 (without the patch) or (b) corrupt the data (without the patch), unless the data happened to be all zeros. Of course there's nothing you can do about this with O_DIRECT switched on, but we shouldn't be under the impression this makes anything safer. I'm wondering whether we could count accesses to this horrible page, and thus detect the bug occurring? -- Alex Bligh