xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Juergen Gross <jgross@suse.com>
Cc: "Anthony PERARD" <anthony.perard@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: potential problem with qdisk backend
Date: Mon, 16 May 2016 12:59:04 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1605161250490.2494@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <5733395D.5060905@suse.com>

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

  reply	other threads:[~2016-05-16 11:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-05-13 15:42 ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.10.1605161250490.2494@sstabellini-ThinkPad-X260 \
    --to=sstabellini@kernel.org \
    --cc=anthony.perard@citrix.com \
    --cc=jgross@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).