diff mbox

QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel

Message ID alpine.DEB.2.10.1704141734161.23677@sstabellini-ThinkPad-X260
State New
Headers show

Commit Message

Stefano Stabellini April 15, 2017, 12:39 a.m. UTC
On Fri, 14 Apr 2017, Stefano Stabellini wrote:
> Hi Paul,
> 
> The following commit in my qemu "next" branch breaks the build on arm
> and arm64:
> 
> commit 670271647ad15e9d937ced7a72c892349c709216
> Author: Paul Durrant <paul.durrant@citrix.com>
> Date:   Tue Mar 7 10:55:34 2017 +0000
> 
>     xen: use libxendevicemodel when available
> 
> See the appended build log. Sorry for not realizing it sooner.

As I imagined, this bug is easy to solve. It is reproducible on x86 too,
if you pass -DXC_WANT_COMPAT_DEVICEMODEL_API=1 to configure and
forcefully disable Xen 4.9 detection in the configure script.

If QEMU detects xen_ctrl_version = 480, the build will fail against Xen
4.9, even when -DXC_WANT_COMPAT_DEVICEMODEL_API=1 is specified.

The appended patch solves the problem. However, Xen 4.9 detection and
compilation remain broken.

---

Comments

Paul Durrant April 18, 2017, 10 a.m. UTC | #1
> -----Original Message-----
> From: Stefano Stabellini [mailto:sstabellini@kernel.org]
> Sent: 15 April 2017 01:40
> To: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Paul Durrant <Paul.Durrant@citrix.com>; qemu-devel@nongnu.org;
> Anthony Perard <anthony.perard@citrix.com>; Wei Liu
> <wei.liu2@citrix.com>; jgross@suse.com; julien.grall@arm.com; xen-
> devel@lists.xenproject.org
> Subject: Re: QEMU build breakage on ARM against Xen 4.9 caused by
> libxendevicemodel
> 
> On Fri, 14 Apr 2017, Stefano Stabellini wrote:
> > Hi Paul,
> >
> > The following commit in my qemu "next" branch breaks the build on arm
> > and arm64:
> >
> > commit 670271647ad15e9d937ced7a72c892349c709216
> > Author: Paul Durrant <paul.durrant@citrix.com>
> > Date:   Tue Mar 7 10:55:34 2017 +0000
> >
> >     xen: use libxendevicemodel when available
> >
> > See the appended build log. Sorry for not realizing it sooner.
> 
> As I imagined, this bug is easy to solve. It is reproducible on x86 too,
> if you pass -DXC_WANT_COMPAT_DEVICEMODEL_API=1 to configure and
> forcefully disable Xen 4.9 detection in the configure script.
> 
> If QEMU detects xen_ctrl_version = 480, the build will fail against Xen
> 4.9, even when -DXC_WANT_COMPAT_DEVICEMODEL_API=1 is specified.
> 
> The appended patch solves the problem. However, Xen 4.9 detection and
> compilation remain broken.

Ok, that fix looks fine to me.

  Paul

> 
> ---
> 
> diff --git a/include/hw/xen/xen_common.h
> b/include/hw/xen/xen_common.h
> index 274accc..b1f5f53 100644
> --- a/include/hw/xen/xen_common.h
> +++ b/include/hw/xen/xen_common.h
> @@ -9,7 +9,6 @@
>  #undef XC_WANT_COMPAT_EVTCHN_API
>  #undef XC_WANT_COMPAT_GNTTAB_API
>  #undef XC_WANT_COMPAT_MAP_FOREIGN_API
> -#undef XC_WANT_COMPAT_DEVICEMODEL_API
> 
>  #include <xenctrl.h>
>  #include <xenstore.h>
> @@ -154,6 +153,7 @@ static inline int xendevicemodel_set_mem_type(
> 
>  #else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 490 */
> 
> +#undef XC_WANT_COMPAT_DEVICEMODEL_API
>  #include <xendevicemodel.h>
> 
>  #endif
Stefano Stabellini April 18, 2017, 5:40 p.m. UTC | #2
On Tue, 18 Apr 2017, Paul Durrant wrote:
> > -----Original Message-----
> > From: Stefano Stabellini [mailto:sstabellini@kernel.org]
> > Sent: 15 April 2017 01:40
> > To: Stefano Stabellini <sstabellini@kernel.org>
> > Cc: Paul Durrant <Paul.Durrant@citrix.com>; qemu-devel@nongnu.org;
> > Anthony Perard <anthony.perard@citrix.com>; Wei Liu
> > <wei.liu2@citrix.com>; jgross@suse.com; julien.grall@arm.com; xen-
> > devel@lists.xenproject.org
> > Subject: Re: QEMU build breakage on ARM against Xen 4.9 caused by
> > libxendevicemodel
> > 
> > On Fri, 14 Apr 2017, Stefano Stabellini wrote:
> > > Hi Paul,
> > >
> > > The following commit in my qemu "next" branch breaks the build on arm
> > > and arm64:
> > >
> > > commit 670271647ad15e9d937ced7a72c892349c709216
> > > Author: Paul Durrant <paul.durrant@citrix.com>
> > > Date:   Tue Mar 7 10:55:34 2017 +0000
> > >
> > >     xen: use libxendevicemodel when available
> > >
> > > See the appended build log. Sorry for not realizing it sooner.
> > 
> > As I imagined, this bug is easy to solve. It is reproducible on x86 too,
> > if you pass -DXC_WANT_COMPAT_DEVICEMODEL_API=1 to configure and
> > forcefully disable Xen 4.9 detection in the configure script.
> > 
> > If QEMU detects xen_ctrl_version = 480, the build will fail against Xen
> > 4.9, even when -DXC_WANT_COMPAT_DEVICEMODEL_API=1 is specified.
> > 
> > The appended patch solves the problem. However, Xen 4.9 detection and
> > compilation remain broken.
> 
> Ok, that fix looks fine to me.

I merged this change into "use libxendevicemodel when available" in my
next branch.

Are you going to take care of getting the QEMU build on ARM to work
against Xen 4.9 (properly detecting 4.9, without
-DXC_WANT_COMPAT_DEVICEMODEL_API=1)?


> > 
> > ---
> > 
> > diff --git a/include/hw/xen/xen_common.h
> > b/include/hw/xen/xen_common.h
> > index 274accc..b1f5f53 100644
> > --- a/include/hw/xen/xen_common.h
> > +++ b/include/hw/xen/xen_common.h
> > @@ -9,7 +9,6 @@
> >  #undef XC_WANT_COMPAT_EVTCHN_API
> >  #undef XC_WANT_COMPAT_GNTTAB_API
> >  #undef XC_WANT_COMPAT_MAP_FOREIGN_API
> > -#undef XC_WANT_COMPAT_DEVICEMODEL_API
> > 
> >  #include <xenctrl.h>
> >  #include <xenstore.h>
> > @@ -154,6 +153,7 @@ static inline int xendevicemodel_set_mem_type(
> > 
> >  #else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 490 */
> > 
> > +#undef XC_WANT_COMPAT_DEVICEMODEL_API
> >  #include <xendevicemodel.h>
> > 
> >  #endif
>
Paul Durrant April 19, 2017, 8:43 a.m. UTC | #3
> -----Original Message-----
> From: Stefano Stabellini [mailto:sstabellini@kernel.org]
> Sent: 18 April 2017 18:41
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: 'Stefano Stabellini' <sstabellini@kernel.org>; qemu-devel@nongnu.org;
> Anthony Perard <anthony.perard@citrix.com>; Wei Liu
> <wei.liu2@citrix.com>; jgross@suse.com; julien.grall@arm.com; xen-
> devel@lists.xenproject.org
> Subject: RE: QEMU build breakage on ARM against Xen 4.9 caused by
> libxendevicemodel
> 
> On Tue, 18 Apr 2017, Paul Durrant wrote:
> > > -----Original Message-----
> > > From: Stefano Stabellini [mailto:sstabellini@kernel.org]
> > > Sent: 15 April 2017 01:40
> > > To: Stefano Stabellini <sstabellini@kernel.org>
> > > Cc: Paul Durrant <Paul.Durrant@citrix.com>; qemu-devel@nongnu.org;
> > > Anthony Perard <anthony.perard@citrix.com>; Wei Liu
> > > <wei.liu2@citrix.com>; jgross@suse.com; julien.grall@arm.com; xen-
> > > devel@lists.xenproject.org
> > > Subject: Re: QEMU build breakage on ARM against Xen 4.9 caused by
> > > libxendevicemodel
> > >
> > > On Fri, 14 Apr 2017, Stefano Stabellini wrote:
> > > > Hi Paul,
> > > >
> > > > The following commit in my qemu "next" branch breaks the build on
> arm
> > > > and arm64:
> > > >
> > > > commit 670271647ad15e9d937ced7a72c892349c709216
> > > > Author: Paul Durrant <paul.durrant@citrix.com>
> > > > Date:   Tue Mar 7 10:55:34 2017 +0000
> > > >
> > > >     xen: use libxendevicemodel when available
> > > >
> > > > See the appended build log. Sorry for not realizing it sooner.
> > >
> > > As I imagined, this bug is easy to solve. It is reproducible on x86 too,
> > > if you pass -DXC_WANT_COMPAT_DEVICEMODEL_API=1 to configure
> and
> > > forcefully disable Xen 4.9 detection in the configure script.
> > >
> > > If QEMU detects xen_ctrl_version = 480, the build will fail against Xen
> > > 4.9, even when -DXC_WANT_COMPAT_DEVICEMODEL_API=1 is
> specified.
> > >
> > > The appended patch solves the problem. However, Xen 4.9 detection
> and
> > > compilation remain broken.
> >
> > Ok, that fix looks fine to me.
> 
> I merged this change into "use libxendevicemodel when available" in my
> next branch.
> 
> Are you going to take care of getting the QEMU build on ARM to work
> against Xen 4.9 (properly detecting 4.9, without
> -DXC_WANT_COMPAT_DEVICEMODEL_API=1)?
> 

I can take a look once I get access to some h/w. Since the 4.9 detection should merely be based upon the presence of libxendevicemodel, I can't really imagine why ARM should behave any differently to x86.

  Paul

> 
> > >
> > > ---
> > >
> > > diff --git a/include/hw/xen/xen_common.h
> > > b/include/hw/xen/xen_common.h
> > > index 274accc..b1f5f53 100644
> > > --- a/include/hw/xen/xen_common.h
> > > +++ b/include/hw/xen/xen_common.h
> > > @@ -9,7 +9,6 @@
> > >  #undef XC_WANT_COMPAT_EVTCHN_API
> > >  #undef XC_WANT_COMPAT_GNTTAB_API
> > >  #undef XC_WANT_COMPAT_MAP_FOREIGN_API
> > > -#undef XC_WANT_COMPAT_DEVICEMODEL_API
> > >
> > >  #include <xenctrl.h>
> > >  #include <xenstore.h>
> > > @@ -154,6 +153,7 @@ static inline int xendevicemodel_set_mem_type(
> > >
> > >  #else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 490 */
> > >
> > > +#undef XC_WANT_COMPAT_DEVICEMODEL_API
> > >  #include <xendevicemodel.h>
> > >
> > >  #endif
> >
diff mbox

Patch

diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h
index 274accc..b1f5f53 100644
--- a/include/hw/xen/xen_common.h
+++ b/include/hw/xen/xen_common.h
@@ -9,7 +9,6 @@ 
 #undef XC_WANT_COMPAT_EVTCHN_API
 #undef XC_WANT_COMPAT_GNTTAB_API
 #undef XC_WANT_COMPAT_MAP_FOREIGN_API
-#undef XC_WANT_COMPAT_DEVICEMODEL_API

 #include <xenctrl.h>
 #include <xenstore.h>
@@ -154,6 +153,7 @@  static inline int xendevicemodel_set_mem_type(

 #else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 490 */

+#undef XC_WANT_COMPAT_DEVICEMODEL_API
 #include <xendevicemodel.h>

 #endif