From: Dario Faggioli <dario.faggioli@citrix.com>
To: Fabio Fantoni <fabio.fantoni@m2r.biz>
Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com,
Stefano.Stabellini@eu.citrix.com, George.Dunlap@eu.citrix.com,
wei.lui2@citrix.com, Ian.Jackson@eu.citrix.com,
qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH v2] libxl: usb2 and usb3 controller support for upstream qemu
Date: Fri, 12 Jul 2013 14:13:17 +0200 [thread overview]
Message-ID: <1373631197.23972.13.camel@Abyss> (raw)
In-Reply-To: <51DFC1C9.4010605@m2r.biz>
[-- Attachment #1: Type: text/plain, Size: 2736 bytes --]
On ven, 2013-07-12 at 10:43 +0200, Fabio Fantoni wrote:
> Il 11/07/2013 17:56, Dario Faggioli ha scritto:
> >> Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
> >>
> >> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> >> index d218a2d..b4c6921 100644
> >> --- a/tools/libxl/libxl_types.idl
> >> +++ b/tools/libxl/libxl_types.idl
> >> @@ -325,6 +325,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
> >> ("serial", string),
> >> ("boot", string),
> >> ("usb", libxl_defbool),
> >> + ("usbversion", integer),
> >> # usbdevice:
> >> # - "tablet" for absolute mouse,
> >> # - "mouse" for PS/2 protocol relative mouse
> >>
> > I believe this calls for a `#define LIBXL_HAVE_USBVERSION' (or something
> > like that) in libxl.h, doesn't it?
>
> Is it necessary even if I just want to apply it to xen 4.4 (as a new
> features) and not backport it to older versions?
>
Although API stability is something I'm not sure I fully master, I would
say, yes it is necessary. :-)
> Or probably I don't understand exactly what is the function of LIBXL_HAVE_*.
>
The point is to allow people to write code suitable for _all_ versions
of libxl. So, imagine, in the super cool toolstack I'm writing on top of
libxl, I want to use your new parameter, if it's there, i.e., if
compiling on top of 4.4, but I also want the code to compile against
libxl 4.3.
With the LIBXL_HAVE_*, I can do something like this:
...
binfo.usb = true;
#ifdef LIBXL_HAVE_BUILDINFO_USBVERSION
binfo.usbversion = 3;
#endif
...
Does that make sense?
> I tried to grep all code for LIBXL_HAVE_* to see an example of use but I
> found only one an I don't understand.
>
Try harder! :-)
http://xenbits.xen.org/gitweb/?p=xen.git&a=search&h=refs%2Fheads%2Fstaging&st=commit&s=LIBXL_HAVE_
http://xenbits.xen.org/gitweb/?p=xen.git&a=search&h=HEAD&st=grep&s=LIBXL_HAVE_
Actually, while at it, given LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST is
added in ac16730d0339d41fd7d1, I'd go for
LIBXL_HAVE_BUILDINFO_USBVERSION for yours, it looks more consistent.
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Fabio Fantoni <fabio.fantoni@m2r.biz>
Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com,
Stefano.Stabellini@eu.citrix.com, George.Dunlap@eu.citrix.com,
wei.lui2@citrix.com, Ian.Jackson@eu.citrix.com,
qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: Re: [PATCH v2] libxl: usb2 and usb3 controller support for upstream qemu
Date: Fri, 12 Jul 2013 14:13:17 +0200 [thread overview]
Message-ID: <1373631197.23972.13.camel@Abyss> (raw)
In-Reply-To: <51DFC1C9.4010605@m2r.biz>
[-- Attachment #1.1: Type: text/plain, Size: 2736 bytes --]
On ven, 2013-07-12 at 10:43 +0200, Fabio Fantoni wrote:
> Il 11/07/2013 17:56, Dario Faggioli ha scritto:
> >> Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
> >>
> >> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> >> index d218a2d..b4c6921 100644
> >> --- a/tools/libxl/libxl_types.idl
> >> +++ b/tools/libxl/libxl_types.idl
> >> @@ -325,6 +325,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
> >> ("serial", string),
> >> ("boot", string),
> >> ("usb", libxl_defbool),
> >> + ("usbversion", integer),
> >> # usbdevice:
> >> # - "tablet" for absolute mouse,
> >> # - "mouse" for PS/2 protocol relative mouse
> >>
> > I believe this calls for a `#define LIBXL_HAVE_USBVERSION' (or something
> > like that) in libxl.h, doesn't it?
>
> Is it necessary even if I just want to apply it to xen 4.4 (as a new
> features) and not backport it to older versions?
>
Although API stability is something I'm not sure I fully master, I would
say, yes it is necessary. :-)
> Or probably I don't understand exactly what is the function of LIBXL_HAVE_*.
>
The point is to allow people to write code suitable for _all_ versions
of libxl. So, imagine, in the super cool toolstack I'm writing on top of
libxl, I want to use your new parameter, if it's there, i.e., if
compiling on top of 4.4, but I also want the code to compile against
libxl 4.3.
With the LIBXL_HAVE_*, I can do something like this:
...
binfo.usb = true;
#ifdef LIBXL_HAVE_BUILDINFO_USBVERSION
binfo.usbversion = 3;
#endif
...
Does that make sense?
> I tried to grep all code for LIBXL_HAVE_* to see an example of use but I
> found only one an I don't understand.
>
Try harder! :-)
http://xenbits.xen.org/gitweb/?p=xen.git&a=search&h=refs%2Fheads%2Fstaging&st=commit&s=LIBXL_HAVE_
http://xenbits.xen.org/gitweb/?p=xen.git&a=search&h=HEAD&st=grep&s=LIBXL_HAVE_
Actually, while at it, given LIBXL_HAVE_BUILDINFO_USBDEVICE_LIST is
added in ac16730d0339d41fd7d1, I'd go for
LIBXL_HAVE_BUILDINFO_USBVERSION for yours, it looks more consistent.
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-07-12 12:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 10:33 [Qemu-devel] [PATCH v2] libxl: usb2 and usb3 controller support for upstream qemu Fabio Fantoni
2013-07-11 10:33 ` Fabio Fantoni
2013-07-11 15:56 ` [Qemu-devel] [Xen-devel] " Dario Faggioli
2013-07-11 15:56 ` Dario Faggioli
2013-07-12 8:43 ` [Qemu-devel] [Xen-devel] " Fabio Fantoni
2013-07-12 8:43 ` Fabio Fantoni
2013-07-12 12:13 ` Dario Faggioli [this message]
2013-07-12 12:13 ` Dario Faggioli
2013-07-12 9:08 ` [Qemu-devel] [Xen-devel] " Wei Liu
2013-07-12 9:08 ` Wei Liu
2013-07-12 9:17 ` [Qemu-devel] " Ian Campbell
2013-07-12 9:17 ` Ian Campbell
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=1373631197.23972.13.camel@Abyss \
--to=dario.faggioli@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=fabio.fantoni@m2r.biz \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wei.lui2@citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.