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

Re: [Xen-devel] potential problem with qdisk backend



On Wed, 11 May 2016, Juergen Gross wrote:
> On 06/05/16 13:41, Juergen Gross wrote:
> > Looking at the qdisk backend implementation I wondered whether
> > blkif_get_x86_32_req() is really correct, especially for the
> > BLKIF_OP_DISCARD case. The Linux kernel based blk backend seems to
> > distinguish 32- and 64-bit layouts of blkif_request_discard while
> > qemu treats them to be the same.
> > 
> > Am I completely wrong here?
> 
> Adding some maintainers.
 
Yes, it seems to me that the internal alignment of the fields in struct
blkif_request_discard (as declared by xen/include/public/io/blkif.h)
differs between x86_32 and x86_64. The two different alignments are both
specified explicitly in Linux, by using __packed__ and explicit
padding.

On the other hand QEMU uses Xen's declaration of struct
blkif_request_discard without paying attention to the word size in the
guest. As a consequence it will work correctly only if the guest bitness
and the dom0 bitness match.

The discard struct should have two implementations in QEMU, like
blkif_x86_32_request and blkif_x86_64_request.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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