From: Alex Bligh Subject: Re: workaround for dom0 crash due to QEMU using O_DIRECT Date: Mon, 08 Jul 2013 20:40:22 +0100 Message-ID: <8DEF24E1F5A12D950B781A14@Ximines.local> References: <20130708191853.GA4927@phenom.dumpdata.com> 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: <20130708191853.GA4927@phenom.dumpdata.com> 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: Konrad Rzeszutek Wilk , Stefano Stabellini Cc: dcrisan@flexiant.com, xen-devel@lists.xensource.com, Ian Campbell , Alex Bligh List-Id: xen-devel@lists.xenproject.org --On 8 July 2013 15:18:53 -0400 Konrad Rzeszutek Wilk wrote: >> speaking with Ian about the dom0 kernel crash caused by using O_DIRECT >> in QEMU, we came up with a simple workaround that should turn the crash >> into a data corruption problem (same as native). > > You should for fun also do 0xEE on the 'trade_page' whenever > we update the PTE. That way we can detect the corruption as by default > the trade_page would be 00. Ha ha I've just read the patch. If I read right, what happens is there's a fixed 'junk' page which gets mapped in whenever the granted page gets mapped out. Let's put aside the minor issue here that we've got a kernel patch which doesn't actually fix the kernel's problem :-) Have we not got a danger here that trade_page could end up written to with VM A's data, and this could then find itself in VM B's disk? Or do we know that every access by the kernel after withdrawal of the grant is guaranteed to be a read? In which case making it read only might be safer. Also, our normal config has dom0 with completely fixed memory (no ballooning) I believe. Is that something Diana needs to change when testing this? -- Alex Bligh