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

Re: [Xen-devel] Fatal crash on xen4.2 HVM + qemu-xen dm + NFS

On Mon, 2013-01-21 at 18:14 +0000, Alex Bligh wrote:
> Ian,
> --On 21 January 2013 17:32:54 +0000 Ian Campbell <Ian.Campbell@xxxxxxxxxx> 
> wrote:
> > You would also need to malloc/free the buffer you are copying to/from. I
> > don't know how hard that is within qemu.
> I think it's ioreq_map and ioreq_unmap within hw/xen_disk.c. I had
> foolishly assumed xc would do the grant copy, but it looks like
> as you say I need malloc/free (or mmap equivalents) + memcpy.
> Is this a useful approach to try?

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
        buffer = malloc(SIZE)
        if (writing)
                gnttab_copy_from(buffer, gntref, size) 

        io->buffer = buffer
... wait for completion:
        if (reading)

Hopefully you get the idea ;-) Sounds like before the ... goes in
ioreq_map and after the ... goes in ioreq_unmap.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.