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@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] potential problem with qdisk backend
>>> On 06.05.16 at 13:41,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. I agree, this can't work well. Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] potential problem with qdisk backend
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. Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
[Xen-devel] potential problem with qdisk backend
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? Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel