From: Ian Campbell Subject: Re: Fatal crash on xen4.2 HVM + qemu-xen dm + NFS Date: Tue, 22 Jan 2013 13:13:20 +0000 Message-ID: <1358860400.3279.363.camel@zakaz.uk.xensource.com> References: <5B4525F296F6ABEB38B0E614@nimrod.local> <50CEFDA602000078000B0B11@nat28.tlf.novell.com> <3B1D0701EAEA6532CEA91EA0@Ximines.local> <77822E2DDAEA8F94631B6A52@Ximines.local> <1358781790.3279.224.camel@zakaz.uk.xensource.com> <1358783420.3279.235.camel@zakaz.uk.xensource.com> <1358787073.3279.257.camel@zakaz.uk.xensource.com> <1358789574.3279.273.camel@zakaz.uk.xensource.com> <1358849116.3279.306.camel@zakaz.uk.xensource.com> <18461AA818974B0D39B5BC2E@nimrod.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <18461AA818974B0D39B5BC2E@nimrod.local> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Alex Bligh Cc: Konrad Wilk , Xen Devel , Jan Beulich , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 2013-01-22 at 13:02 +0000, Alex Bligh wrote: > Ian, > > --On 22 January 2013 10:05:16 +0000 Ian Campbell > wrote: > > > I've never looked inside xen_qdisk so I can't really advise, but that > > sound broadly correct, except you'd want to use gnttab_copy not mmap > > +memcpy. e.g. (totally making up the API because I'm too lazy to go > > look): > > buffer = malloc(SIZE) > > if (writing) > > gnttab_copy_from(buffer, gntref, size) > > > > io->buffer = buffer > > submit(io) > > ... wait for completion: > > if (reading) > > gnttab_copy_to(...) > > free(io->buffer) > > > > Hopefully you get the idea ;-) Sounds like before the ... goes in > > ioreq_map and after the ... goes in ioreq_unmap. > > Thanks. If the O_DIRECT thing doesn't fix it, I'll take a look again. > My initial analysis was that a copy interface wasn't available through > xc_ type functions. I think the underlying /dev/xen/gntdev thing does, but you may need to plumb it through libxc. Ian.