xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: Greg Kurz <groug@kaod.org>,
	qemu-devel@nongnu.org, Stefano Stabellini <stefano@aporeto.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	anthony.perard@citrix.com, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v4 1/8] xen: import ring.h from xen
Date: Mon, 27 Mar 2017 14:41:29 +0200	[thread overview]
Message-ID: <d02897ba-88c6-f92e-ccf5-afab3c584f75@suse.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1703241030391.8001@sstabellini-ThinkPad-X260>

On 24/03/17 18:37, Stefano Stabellini wrote:
> On Fri, 24 Mar 2017, Juergen Gross wrote:
>> On 23/03/17 19:22, Stefano Stabellini wrote:
>>> On Thu, 23 Mar 2017, Paolo Bonzini wrote:
>>>> On 23/03/2017 14:55, Juergen Gross wrote:
>>>>> On 23/03/17 14:00, Greg Kurz wrote:
>>>>>> On Mon, 20 Mar 2017 11:19:05 -0700
>>>>>> Stefano Stabellini <sstabellini@kernel.org> wrote:
>>>>>>
>>>>>>> Do not use the ring.h header installed on the system. Instead, import
>>>>>>> the header into the QEMU codebase. This avoids problems when QEMU is
>>>>>>> built against a Xen version too old to provide all the ring macros.
>>>>>>>
>>>>>>> Signed-off-by: Stefano Stabellini <stefano@aporeto.com>
>>>>>>> Reviewed-by: Greg Kurz <groug@kaod.org>
>>>>>>> CC: anthony.perard@citrix.com
>>>>>>> CC: jgross@suse.com
>>>>>>> ---
>>>>>>> NB: The new macros have not been committed to Xen yet. Do not apply this
>>>>>>> patch until they do.
>>>>>>> ---
>>>>>>
>>>>>> Looking at your other series for the kernel part of this feature:
>>>>>>
>>>>>> https://lkml.org/lkml/2017/3/22/761
>>>>>>
>>>>>> I realize that the ring.h header from Xen also exists in the kernel tree... 
>>>>>>
>>>>>> Shouldn't all the code that can be used in both kernel and userspace go to a
>>>>>> header file under include/uapi in the kernel tree ? And then we would import
>>>>>> it under include/standard-headers/linux in the QEMU tree and we could keep it
>>>>>> in sync using scripts/update-linux-headers.sh.
>>>>>>
>>>>>> Cc'ing Paolo for insights.
>>>>>
>>>>> As Xen isn't part of the kernel we don't want that. You can use and/or
>>>>> build qemu with xen-9pfs backend support on an old Linux kernel without
>>>>> the related frontend.
>>>>
>>>> As long as the header changes rarely, I guess it's fine not to go
>>>> through update-linux-headers.sh.
>>>
>>> Very rarely, last time ring.h was changed was 2015, and to introduce a
>>> new macro (which we don't necessarily need in QEMU).
>>>
>>>
>>>>> OTOH I don't see the advantage of not using the headers from Xen. This
>>>>> is working for qdisk and pvusb backends and for all the Xen libraries.
>>>>> Do you expect the 9pfs backend to be used for a qemu version built
>>>>> against a Xen version not supporting that backend?
>>>
>>> Yes, I think that is entirely possible: Xen and QEMU versions can mix
>>> and match.
>>>
>>> Keeping in mind that the 9pfs backend has actually no build dependencies
>>> on Xen, except for these new ring.h macros, we have the following
>>> options:
>>>
>>> 1) we build the 9pfs backend only for Xen >= 4.9, because of the new
>>>    macros in ring.h that we need
>>
>> Right. You have sent 9pfs support patches for Xen tools. So obviously
>> you need a proper Xen version to use 9pfs. Why not build qemu against
>> it? Do you really expect a new Xen being used with an old qemu while
>> wanting to use new features? That makes no sense for me.
>  
> Tools support is needed to setup the frontend/backend connection as
> usual, but that's not a requirement for building the 9pfs backend. In
> fact, the backend doesn't need any tools support for it to work. The
> macro themselves are just a convenience - the backend would work just
> fine without them. Why restrict the QEMU build gratuitously?

You are duplicating a header without any real benefit I can see. This
is adding future work for keeping both versions of the header in sync.

In which scenario would you want qemu to support xen-9pfs without being
built against a Xen version supporting xen-9pfs?

I am not completely against copying the header, I just don't see an
advantage for any distro or user in doing it.


Juergen


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

  reply	other threads:[~2017-03-27 12:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 18:18 [PATCH v4 0/8] xen/9pfs: introduce the Xen 9pfs backend Stefano Stabellini
2017-03-21 10:20 ` Greg Kurz
2017-03-21 20:14   ` [Qemu-devel] " Stefano Stabellini
2017-03-22  8:47     ` Greg Kurz
2017-03-22 18:32       ` Stefano Stabellini
2017-03-23  8:34         ` Greg Kurz
2017-03-23 16:49           ` Stefano Stabellini
     [not found] ` <1490033952-26735-1-git-send-email-sstabellini@kernel.org>
     [not found]   ` <20170323140005.6b0853b3@bahia.lan>
     [not found]     ` <15207674-c5cd-3874-7ac9-5b23cdac8888@suse.com>
     [not found]       ` <28db5816-2ed9-0d92-a15d-af47b58a9da1@redhat.com>
     [not found]         ` <alpine.DEB.2.10.1703230953120.8001@sstabellini-ThinkPad-X260>
2017-03-24  6:02           ` [PATCH v4 1/8] xen: import ring.h from xen Juergen Gross
2017-03-24 17:37             ` Stefano Stabellini
2017-03-27 12:41               ` Juergen Gross [this message]
2017-03-27 22:48                 ` Stefano Stabellini
2017-03-28  6:02                   ` Juergen Gross
2017-03-28 23:54                     ` Stefano Stabellini
2017-03-29  5:46                       ` Juergen Gross
2017-03-29  8:06                       ` Paolo Bonzini
2017-03-29 18:42                         ` Stefano Stabellini

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=d02897ba-88c6-f92e-ccf5-afab3c584f75@suse.com \
    --to=jgross@suse.com \
    --cc=anthony.perard@citrix.com \
    --cc=groug@kaod.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=stefano@aporeto.com \
    --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 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).