* potential problem with qdisk backend
@ 2016-05-06 11:41 Juergen Gross
2016-05-11 13:53 ` Juergen Gross
2016-05-13 15:42 ` Jan Beulich
0 siblings, 2 replies; 4+ messages in thread
From: Juergen Gross @ 2016-05-06 11:41 UTC (permalink / raw)
To: xen-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: potential problem with qdisk backend
2016-05-06 11:41 potential problem with qdisk backend Juergen Gross
@ 2016-05-11 13:53 ` Juergen Gross
2016-05-16 11:59 ` Stefano Stabellini
2016-05-13 15:42 ` Jan Beulich
1 sibling, 1 reply; 4+ messages in thread
From: Juergen Gross @ 2016-05-11 13:53 UTC (permalink / raw)
To: xen-devel, Stefano Stabellini, Anthony PERARD,
Konrad Rzeszutek Wilk, Roger Pau Monné
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: potential problem with qdisk backend
2016-05-06 11:41 potential problem with qdisk backend Juergen Gross
2016-05-11 13:53 ` Juergen Gross
@ 2016-05-13 15:42 ` Jan Beulich
1 sibling, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2016-05-13 15:42 UTC (permalink / raw)
To: Juergen Gross; +Cc: xen-devel
>>> On 06.05.16 at 13:41, <JGross@suse.com> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: potential problem with qdisk backend
2016-05-11 13:53 ` Juergen Gross
@ 2016-05-16 11:59 ` Stefano Stabellini
0 siblings, 0 replies; 4+ messages in thread
From: Stefano Stabellini @ 2016-05-16 11:59 UTC (permalink / raw)
To: Juergen Gross
Cc: Anthony PERARD, Stefano Stabellini, Roger Pau Monné, xen-devel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-16 11:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-06 11:41 potential problem with qdisk backend Juergen Gross
2016-05-11 13:53 ` Juergen Gross
2016-05-16 11:59 ` Stefano Stabellini
2016-05-13 15:42 ` Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).