All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Juergen Gross <jgross@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Paul Durrant <Paul.Durrant@citrix.com>,
	Jan Beulich <JBeulich@suse.com>,
	Anthony Perard <anthony.perard@citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"kraxel@redhat.com" <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH v2] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix
Date: Mon, 20 Jun 2016 10:40:37 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1606201040100.2575@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <57678703.4040408@suse.com>

On Mon, 20 Jun 2016, Juergen Gross wrote:
> On 17/06/16 18:10, Stefano Stabellini wrote:
> > On Fri, 17 Jun 2016, Paul Durrant wrote:
> >>> -----Original Message-----
> >>> From: Juergen Gross [mailto:jgross@suse.com]
> >>> Sent: 17 June 2016 11:40
> >>> To: Paul Durrant; Jan Beulich
> >>> Cc: Anthony Perard; xen-devel; sstabellini@kernel.org; qemu-
> >>> devel@nongnu.org; kraxel@redhat.com
> >>> Subject: Re: [Xen-devel] [PATCH v2] xen: fix qdisk BLKIF_OP_DISCARD for
> >>> 32/64 word size mix
> >>>
> >>> On 17/06/16 12:15, Paul Durrant wrote:
> >>>>> -----Original Message-----
> >>>>> From: Xen-devel [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of
> >>>>> Juergen Gross
> >>>>> Sent: 17 June 2016 11:08
> >>>>> To: Paul Durrant; Jan Beulich
> >>>>> Cc: Anthony Perard; xen-devel; sstabellini@kernel.org; qemu-
> >>>>> devel@nongnu.org; kraxel@redhat.com
> >>>>> Subject: Re: [Xen-devel] [PATCH v2] xen: fix qdisk BLKIF_OP_DISCARD for
> >>>>> 32/64 word size mix
> >>>>>
> >>>>> On 17/06/16 11:50, Paul Durrant wrote:
> >>>>>>> -----Original Message-----
> >>>>>>> From: Juergen Gross [mailto:jgross@suse.com]
> >>>>>>> Sent: 17 June 2016 10:46
> >>>>>>> To: Paul Durrant; Jan Beulich
> >>>>>>> Cc: Anthony Perard; xen-devel; sstabellini@kernel.org; qemu-
> >>>>>>> devel@nongnu.org; kraxel@redhat.com
> >>>>>>> Subject: Re: [Xen-devel] [PATCH v2] xen: fix qdisk BLKIF_OP_DISCARD
> >>> for
> >>>>>>> 32/64 word size mix
> >>>>>>>
> >>>>>>> On 17/06/16 11:37, Paul Durrant wrote:
> >>>>>>>>> -----Original Message-----
> >>>>>>>>> From: Xen-devel [mailto:xen-devel-bounces@lists.xen.org] On
> >>> Behalf
> >>>>> Of
> >>>>>>> Jan
> >>>>>>>>> Beulich
> >>>>>>>>> Sent: 17 June 2016 10:26
> >>>>>>>>> To: Juergen Gross
> >>>>>>>>> Cc: Anthony Perard; xen-devel; sstabellini@kernel.org; qemu-
> >>>>>>>>> devel@nongnu.org; kraxel@redhat.com
> >>>>>>>>> Subject: Re: [Xen-devel] [PATCH v2] xen: fix qdisk
> >>> BLKIF_OP_DISCARD
> >>>>> for
> >>>>>>>>> 32/64 word size mix
> >>>>>>>>>
> >>>>>>>>>>>> On 17.06.16 at 11:14, <JGross@suse.com> wrote:
> >>>>>>>>>> In case the word size of the domU and qemu running the qdisk
> >>>>> backend
> >>>>>>>>>> differ BLKIF_OP_DISCARD will not work reliably, as the request
> >>>>>>>>>> structure in the ring have different layouts for different word size.
> >>>>>>>>>>
> >>>>>>>>>> Correct this by copying the request structure in case of different
> >>>>>>>>>> word size element by element in the BLKIF_OP_DISCARD case, too.
> >>>>>>>>>>
> >>>>>>>>>> The easiest way to achieve this is to resync hw/block/xen_blkif.h
> >>> with
> >>>>>>>>>> its original source from the Linux kernel.
> >>>>>>>>>>
> >>>>>>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
> >>>>>>>>>> ---
> >>>>>>>>>> V2: resync with Linux kernel version of hw/block/xen_blkif.h as
> >>>>>>>>>>     suggested by Paul Durrant
> >>>>>>>>>
> >>>>>>>>> Oh, I didn't realize he suggested syncing with the Linux variant.
> >>>>>>>>> Why not with the canonical one? I have to admit that I particularly
> >>>>>>>>> dislike Linux'es strange union-izng, mainly because of it requiring
> >>>>>>>>> this myriad of __attribute__((__packed__)).
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>> Yes, it's truly grotesque and such things should be blown away with
> >>>>>>> extreme prejudice.
> >>>>>>>
> >>>>>>> Sorry, I'm confused now.
> >>>>>>>
> >>>>>>> Do you still mandate for the resync or not?
> >>>>>>>
> >>>>>>> Resyncing with elimination of all the __packed__ stuff seems not to be
> >>>>>>> a proper alternative as this would require a major rework.
> >>>>>>
> >>>>>> Why? Replacing the existing horribleness with the canonical header
> >>> (fixed
> >>>>> for style) might mean a large diff but it should be functionally the same or
> >>>>> something has gone very seriously wrong. If the extra part you need is
> >>> not in
> >>>>> the canonical header then adding this as a second patch seems like a
> >>>>> reasonable plan.
> >>>>>
> >>>>> I think you don't realize that qemu is built using the public headers
> >>>>> from the Xen build environment. So there is no way to resync with the
> >>>>> canonical header as this isn't part of the qemu tree.
> >>>>>
> >>>>
> >>>> Now I'm confused... you're posting a patch to hw/block/xen_blkif.h. That's
> >>> in the QEMU source, right? That's not a Xen public header but is a Linux
> >>> mangled variant of a Xen public header. So, actually, I guess the question is
> >>> why can't this header just go away and QEMU use the canonical header
> >>> directly from Xen?
> >>>
> >>> No, hw/block/xen_blkif.h is based on the Linux header
> >>> drivers/block/xen-blkback/common.h which is an add-on header to the
> >>> canonical-based Linux header include/xen/interface/io/blkif.h
> >>>
> >>>>> The header in question is originating from the Linux one which is an
> >>>>> add-on of the canonical header containing the explicit 32- and 64-bit
> >>>>> variants of the xenbus protocol and the conversion routines between
> >>>>> those.
> >>>>>
> >>>>> It would be possible to add these parts to the canonical header, but
> >>>>> do we really want that?
> >>>>>
> >>>>
> >>>> No, we shouldn't be taking Linux brokenness into the canonical header.
> >>>
> >>> Okay, so then back to the first approach using hw/block/xen_blkif.h as
> >>> today and adapting the style first and then doing the necessary code
> >>> correction?
> >>>
> >>
> >> I guess re-syncing with the Linux header as in your v2 patch is the least worst option then.
> > 
> > As the Linux header is by no means canonical or special, I prefer patch
> > #1 (with the indentation fixed).
> 
> Could you please specify in which way the indentation should be fixed?
> Should I keep the current indentation of the file via tabs or should I
> prepend a patch to change the whole file to qemu style?

Please prepend a patch to fix indentation to match QEMU's style.

  reply	other threads:[~2016-06-20  9:41 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17  9:14 [Qemu-devel] [PATCH v2] xen: fix qdisk BLKIF_OP_DISCARD for 32/64 word size mix Juergen Gross
2016-06-17  9:14 ` Juergen Gross
2016-06-17  9:26 ` Jan Beulich
2016-06-17  9:26 ` [Qemu-devel] [Xen-devel] " Jan Beulich
2016-06-17  9:37   ` Paul Durrant
2016-06-17  9:37   ` [Qemu-devel] [Xen-devel] " Paul Durrant
2016-06-17  9:45     ` Juergen Gross
2016-06-17  9:50       ` Paul Durrant
2016-06-17  9:50       ` [Qemu-devel] [Xen-devel] " Paul Durrant
2016-06-17 10:08         ` Juergen Gross
2016-06-17 10:15           ` Paul Durrant
2016-06-17 10:15             ` Paul Durrant
2016-06-17 10:40             ` [Qemu-devel] [Xen-devel] " Juergen Gross
2016-06-17 10:40               ` Juergen Gross
2016-06-17 10:53               ` Paul Durrant
2016-06-17 10:53               ` [Qemu-devel] [Xen-devel] " Paul Durrant
2016-06-17 16:10                 ` Stefano Stabellini
2016-06-17 16:10                   ` Stefano Stabellini
2016-06-20  6:02                   ` [Qemu-devel] [Xen-devel] " Juergen Gross
2016-06-20  9:40                     ` Stefano Stabellini [this message]
2016-06-20  9:40                     ` Stefano Stabellini
2016-06-20  6:02                   ` Juergen Gross
2016-06-17 10:20           ` Jan Beulich
2016-06-17 10:20           ` [Qemu-devel] [Xen-devel] " Jan Beulich
2016-06-17 10:08         ` Juergen Gross
2016-06-17  9:45     ` Juergen Gross
     [not found] ` <5763DE5D02000078000F5FF8@suse.com>
2016-06-17  9:31   ` [Qemu-devel] [Xen-devel] " Juergen Gross
2016-06-17  9:35     ` Paul Durrant
2016-06-17  9:35     ` [Qemu-devel] [Xen-devel] " Paul Durrant
2016-06-17  9:41     ` Jan Beulich
2016-06-17  9:41     ` [Qemu-devel] [Xen-devel] " Jan Beulich
2016-06-17  9:31   ` Juergen Gross

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.1606201040100.2575@sstabellini-ThinkPad-X260 \
    --to=sstabellini@kernel.org \
    --cc=JBeulich@suse.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=jgross@suse.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.