From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckp3e-0005TC-IB for qemu-devel@nongnu.org; Mon, 06 Mar 2017 04:36:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckp3b-0008HE-95 for qemu-devel@nongnu.org; Mon, 06 Mar 2017 04:35:58 -0500 Received: from smtp.ctxuk.citrix.com ([185.25.65.24]:40592 helo=SMTP.EU.CITRIX.COM) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1ckp3a-0008Gh-PH for qemu-devel@nongnu.org; Mon, 06 Mar 2017 04:35:55 -0500 From: Paul Durrant Date: Mon, 6 Mar 2017 09:35:51 +0000 Message-ID: <31427779196840b3b31171ec9deda91f@AMSPEX02CL03.citrite.net> References: <1488452986-24501-1-git-send-email-paul.durrant@citrix.com> <1488452986-24501-6-git-send-email-paul.durrant@citrix.com> <05365905529b4fd78ff67989743a8dfb@AMSPEX02CL03.citrite.net> <1636138fa3a948229a4630fe48d5a079@AMSPEX02CL03.citrite.net> In-Reply-To: <1636138fa3a948229a4630fe48d5a079@AMSPEX02CL03.citrite.net> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2 5/5] xen: use libxendevicemodel when available List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Durrant , 'Stefano Stabellini' Cc: Anthony Perard , "xen-devel@lists.xenproject.org" , "qemu-devel@nongnu.org" > -----Original Message----- > From: Qemu-devel [mailto:qemu-devel- > bounces+paul.durrant=3Dcitrix.com@nongnu.org] On Behalf Of Paul Durrant > Sent: 06 March 2017 09:15 > To: 'Stefano Stabellini' > Cc: Anthony Perard ; xen- > devel@lists.xenproject.org; qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] [PATCH v2 5/5] xen: use libxendevicemodel when > available >=20 > > -----Original Message----- > > From: Stefano Stabellini [mailto:sstabellini@kernel.org] > > Sent: 03 March 2017 20:43 > > To: Stefano Stabellini > > Cc: Paul Durrant ; xen- > devel@lists.xenproject.org; > > qemu-devel@nongnu.org; Anthony Perard > > Subject: RE: [PATCH v2 5/5] xen: use libxendevicemodel when available > > > > On Fri, 3 Mar 2017, Stefano Stabellini wrote: > > > On Fri, 3 Mar 2017, Paul Durrant wrote: > > > > > -----Original Message----- > > > > > From: Stefano Stabellini [mailto:sstabellini@kernel.org] > > > > > Sent: 02 March 2017 22:50 > > > > > To: Paul Durrant > > > > > Cc: xen-devel@lists.xenproject.org; qemu-devel@nongnu.org; > Stefano > > > > > Stabellini ; Anthony Perard > > > > > > > > > > Subject: Re: [PATCH v2 5/5] xen: use libxendevicemodel when > available > > > > > > > > > > On Thu, 2 Mar 2017, Paul Durrant wrote: > > > > > > This patch modifies the wrapper functions in xen_common.h to us= e > > the > > > > > > new xendevicemodel interface if it is available along with > > compatibility > > > > > > code to use the old libxenctrl interface if it is not. > > > > > > > > > > > > Signed-off-by: Paul Durrant > > > > > > --- > > > > > > Cc: Stefano Stabellini > > > > > > Cc: Anthony Perard > > > > > > > > > > > > v2: > > > > > > - Add a compat define for xenforeignmemory_close() since this i= s > > now > > > > > > used. > > > > > > --- > > > > > > include/hw/xen/xen_common.h | 115 > > > > > +++++++++++++++++++++++++++++++------------- > > > > > > xen-common.c | 8 +++ > > > > > > 2 files changed, 90 insertions(+), 33 deletions(-) > > > > > > > > > > > > diff --git a/include/hw/xen/xen_common.h > > > > > b/include/hw/xen/xen_common.h > > > > > > index 31cf25f..48444e5 100644 > > > > > > --- a/include/hw/xen/xen_common.h > > > > > > +++ b/include/hw/xen/xen_common.h > > > > > > @@ -9,6 +9,7 @@ > > > > > > #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 > > > > > > #include > > > > > > @@ -26,48 +27,95 @@ extern xc_interface *xen_xc; > > > > > > * We don't support Xen prior to 4.2.0. > > > > > > */ > > > > > > > > > > > > +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 490 > > > > > > + > > > > > > +typedef xc_interface xendevicemodel_handle; > > > > > > + > > > > > > +#define xendevicemodel_open(l, f) xen_xc > > > > > > + > > > > > > +#define xendevicemodel_map_io_range_to_ioreq_server \ > > > > > > + xc_hvm_map_io_range_to_ioreq_server > > > > > > +#define xendevicemodel_unmap_io_range_from_ioreq_server \ > > > > > > + xc_hvm_unmap_io_range_from_ioreq_server > > > > > > +#define xendevicemodel_map_pcidev_to_ioreq_server \ > > > > > > + xc_hvm_map_pcidev_to_ioreq_server > > > > > > +#define xendevicemodel_unmap_pcidev_from_ioreq_server \ > > > > > > + xc_hvm_unmap_pcidev_from_ioreq_server > > > > > > +#define xendevicemodel_create_ioreq_server \ > > > > > > + xc_hvm_create_ioreq_server > > > > > > +#define xendevicemodel_destroy_ioreq_server \ > > > > > > + xc_hvm_destroy_ioreq_server > > > > > > +#define xendevicemodel_get_ioreq_server_info \ > > > > > > + xc_hvm_get_ioreq_server_info > > > > > > +#define xendevicemodel_set_ioreq_server_state \ > > > > > > + xc_hvm_set_ioreq_server_state > > > > > > +#define xendevicemodel_set_pci_intx_level \ > > > > > > + xc_hvm_set_pci_intx_level > > > > > > +#define xendevicemodel_set_pci_link_route \ > > > > > > + xc_hvm_set_pci_link_route > > > > > > +#define xendevicemodel_set_isa_irq_level \ > > > > > > + xc_hvm_set_isa_irq_level > > > > > > +#define xendevicemodel_inject_msi \ > > > > > > + xc_hvm_inject_msi > > > > > > +#define xendevicemodel_set_mem_type \ > > > > > > + xc_hvm_set_mem_type > > > > > > +#define xendevicemodel_track_dirty_vram \ > > > > > > + xc_hvm_track_dirty_vram > > > > > > +#define xendevicemodel_modified_memory \ > > > > > > + xc_hvm_modified_memory > > > > > > > > > > It does build correctly now for Xen < 4.9, however it breaks agai= nst > > > > > xen-unstable: > > > > > > > > > > ERROR: configure test passed without -Werror but failed with - > Werror. > > > > > This is probably a bug in the configure script. The fail= ing command > > > > > will be at the bottom of config.log. > > > > > You can run configure with --disable-werror to bypass th= is check. > > > > > > > > > > and config.log says: > > > > > > > > > > config-temp/qemu-conf.c: In function 'main': > > > > > config-temp/qemu-conf.c:32:3: error: implicit declaration of fu= nction > > > > > 'xc_hvm_set_mem_type' [-Werror=3Dimplicit-function-declaration] > > > > > config-temp/qemu-conf.c:32:3: error: nested extern declaration = of > > > > > 'xc_hvm_set_mem_type' [-Werror=3Dnested-externs] > > > > > config-temp/qemu-conf.c:34:3: error: implicit declaration of fu= nction > > > > > 'xc_hvm_inject_msi' [-Werror=3Dimplicit-function-declaration] > > > > > config-temp/qemu-conf.c:34:3: error: nested extern declaration = of > > > > > 'xc_hvm_inject_msi' [-Werror=3Dnested-externs] > > > > > config-temp/qemu-conf.c:35:3: error: implicit declaration of fu= nction > > > > > 'xc_hvm_create_ioreq_server' [-Werror=3Dimplicit-function- > declaration] > > > > > config-temp/qemu-conf.c:35:3: error: nested extern declaration = of > > > > > 'xc_hvm_create_ioreq_server' [-Werror=3Dnested-externs] > > > > > > > > > > > > > > > With -DXC_WANT_COMPAT_DEVICEMODEL_API=3D1: > > > > > > > > > > In file included from /local/qemu- > > > > > upstream/include/hw/xen/xen_backend.h:4:0, > > > > > from hw/block/xen_disk.c:27: > > > > > /local/qemu-upstream/include/hw/xen/xen_common.h: In function > > > > > 'xen_set_mem_type': > > > > > /local/qemu-upstream/include/hw/xen/xen_common.h:78:5: error: > > implicit > > > > > declaration of function 'xc_hvm_set_mem_type' [-Werror=3Dimplicit= - > > function- > > > > > declaration] > > > > > > > > > > > > > Ah... Do you have Anthony's patch? > > > > > > > > > > > http://xenbits.xen.org/gitweb/?p=3Dxen.git;a=3Dcommit;h=3D9970e98ace48574= 701 > > f7e2286fb67090481a3fec > > > > > > > > I suspect that may be the problem you're seeing above. > > > > > > Yes, I do have it. I am still having build troubles with v5 too. I am > > > > I meant v3 > > > > > > > attaching my build test script: feel free to use it to test the build= of > > > a single QEMU branch against multiple Xen versions. It requires one X= en > > > repository checked out and built for each Xen version. I have just > > > added the Xen 4.9 tests, so they might be wrong somehow, but the > others > > > are known to work. >=20 > Your script is lacking Anthony's fix. You need to patch your 4.9 configur= e > clause accordingly. I.e. you need - > I$(XEN_ROOT)/tools/libs/devicemodel/include and - > L$(XEN_ROOT)/tools/libs/devicemodel in the --extra-cflags. Sorry, I meant the latter in --extra-ldflags and I notice you do actually h= ave that. It's just the -I that's missing. Paul >=20 > Paul