All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-04-14 22:50 ` Stefano Stabellini
  0 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-04-14 22:50 UTC (permalink / raw)
  To: paul.durrant
  Cc: sstabellini, qemu-devel, anthony.perard, wei.liu2, jgross,
	julien.grall, xen-devel

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.

Please note that up to now we have been unable to disentangle the PV
machine from the i386 emulator in QEMU.  Thus, on arm and arm64 we build
qemu with --target-list=i386-softmmu as we do on x86. Of course, the
xenfv machine cannot work on arm. Only the xenpv machine can be used.
However, the xenfv machine is still included in the build.

This means that we cannot break the xenfv machine build on arm and arm64.


Going into details, "xen: use libxendevicemodel when available" breaks
the build on arm and arm64 even with -DXC_WANT_COMPAT_DEVICEMODEL_API=1.
It breaks 4.8 compatibility which is a regression from QEMU's point of
view.


Why 4.8 compatibility? Because the previous commit:

commit 2a15d804eb0e4f8bc25738b6aec30a0142d5d293
Author: Paul Durrant <paul.durrant@citrix.com>
Date:   Tue Mar 7 10:55:33 2017 +0000

    configure: detect presence of libxendevicemodel

doesn't work properly on arm: Xen 4.9 is not detected. However, that is
not a regression per se.


We cannot break the QEMU build against Xen 4.9 with
-DXC_WANT_COMPAT_DEVICEMODEL_API=1 or older releases. That has to work,
but I guess it won't be too difficult to fix.

The difficulty is how to introduce proper Xen 4.9 and libxendevicemodel
support in QEMU. We either need to fix libxendevicemodel on arm
(although obviously is never going to be actually used at run time, but
it is necessary for the build), or we need to disentangle the xenpv
machine build from the xenfv machine build in QEMU. I prefer the latter
approach, of course.

I haven't dug into what is the problem with libxendevicemodel on arm.
Needless to say, if there is an issue on the Xen side, it might impact
the Xen 4.9 release.


For your information, you can download a free (as in beer) arm64
software model from ARM called "Foundation Model", see the Xen wiki for
instructions:

https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/FastModels

In addition, I think you can purchase access to ARM64 servers from
packet.net.


Thanks,

Stefano


---

In file included from /root/qemu/include/hw/xen/xen_backend.h:4:0,
                 from hw/block/xen_disk.c:27:
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_create_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:46:12: error: implicit declaration of function ‘xc_hvm_create_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
            ^
/root/qemu/include/hw/xen/xen_common.h:46:5: error: nested extern declaration of ‘xc_hvm_create_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_get_ioreq_server_info’:
/root/qemu/include/hw/xen/xen_common.h:55:12: error: implicit declaration of function ‘xc_hvm_get_ioreq_server_info’ [-Werror=implicit-function-declaration]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
            ^
/root/qemu/include/hw/xen/xen_common.h:55:5: error: nested extern declaration of ‘xc_hvm_get_ioreq_server_info’ [-Werror=nested-externs]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_io_range_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:63:12: error: implicit declaration of function ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:63:5: error: nested extern declaration of ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_io_range_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:71:12: error: implicit declaration of function ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:71:5: error: nested extern declaration of ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_pcidev_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:79:12: error: implicit declaration of function ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:79:5: error: nested extern declaration of ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_pcidev_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:87:12: error: implicit declaration of function ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:87:5: error: nested extern declaration of ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_destroy_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:94:12: error: implicit declaration of function ‘xc_hvm_destroy_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
            ^
/root/qemu/include/hw/xen/xen_common.h:94:5: error: nested extern declaration of ‘xc_hvm_destroy_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_ioreq_server_state’:
/root/qemu/include/hw/xen/xen_common.h:100:12: error: implicit declaration of function ‘xc_hvm_set_ioreq_server_state’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
            ^
/root/qemu/include/hw/xen/xen_common.h:100:5: error: nested extern declaration of ‘xc_hvm_set_ioreq_server_state’ [-Werror=nested-externs]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_intx_level’:
/root/qemu/include/hw/xen/xen_common.h:109:12: error: implicit declaration of function ‘xc_hvm_set_pci_intx_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
            ^
  CC      hw/intc/i8259.o
/root/qemu/include/hw/xen/xen_common.h:109:5: error: nested extern declaration of ‘xc_hvm_set_pci_intx_level’ [-Werror=nested-externs]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_isa_irq_level’:
/root/qemu/include/hw/xen/xen_common.h:117:12: error: implicit declaration of function ‘xc_hvm_set_isa_irq_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
            ^
/root/qemu/include/hw/xen/xen_common.h:117:5: error: nested extern declaration of ‘xc_hvm_set_isa_irq_level’ [-Werror=nested-externs]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_link_route’:
/root/qemu/include/hw/xen/xen_common.h:123:12: error: implicit declaration of function ‘xc_hvm_set_pci_link_route’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
            ^
/root/qemu/include/hw/xen/xen_common.h:123:5: error: nested extern declaration of ‘xc_hvm_set_pci_link_route’ [-Werror=nested-externs]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_inject_msi’:
/root/qemu/include/hw/xen/xen_common.h:130:12: error: implicit declaration of function ‘xc_hvm_inject_msi’ [-Werror=implicit-function-declaration]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
            ^
/root/qemu/include/hw/xen/xen_common.h:130:5: error: nested extern declaration of ‘xc_hvm_inject_msi’ [-Werror=nested-externs]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_track_dirty_vram’:
/root/qemu/include/hw/xen/xen_common.h:137:12: error: implicit declaration of function ‘xc_hvm_track_dirty_vram’ [-Werror=implicit-function-declaration]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
            ^
/root/qemu/include/hw/xen/xen_common.h:137:5: error: nested extern declaration of ‘xc_hvm_track_dirty_vram’ [-Werror=nested-externs]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_modified_memory’:
/root/qemu/include/hw/xen/xen_common.h:145:12: error: implicit declaration of function ‘xc_hvm_modified_memory’ [-Werror=implicit-function-declaration]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:145:5: error: nested extern declaration of ‘xc_hvm_modified_memory’ [-Werror=nested-externs]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_mem_type’:
/root/qemu/include/hw/xen/xen_common.h:152:12: error: implicit declaration of function ‘xc_hvm_set_mem_type’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:152:5: error: nested extern declaration of ‘xc_hvm_set_mem_type’ [-Werror=nested-externs]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
     ^
  CC      hw/intc/ioapic_common.o
  CC      hw/intc/intc.o
  CC      hw/ipack/ipack.o
  CC      hw/ipmi/ipmi.o
  CC      hw/ipack/tpci200.o
  CC      hw/ipmi/ipmi_bmc_sim.o
In file included from /root/qemu/include/hw/xen/xen_backend.h:4:0,
                 from hw/char/xen_console.c:29:
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_create_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:46:12: error: implicit declaration of function ‘xc_hvm_create_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
            ^
/root/qemu/include/hw/xen/xen_common.h:46:5: error: nested extern declaration of ‘xc_hvm_create_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_get_ioreq_server_info’:
/root/qemu/include/hw/xen/xen_common.h:55:12: error: implicit declaration of function ‘xc_hvm_get_ioreq_server_info’ [-Werror=implicit-function-declaration]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
            ^
/root/qemu/include/hw/xen/xen_common.h:55:5: error: nested extern declaration of ‘xc_hvm_get_ioreq_server_info’ [-Werror=nested-externs]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
     ^
  CC      hw/ipmi/isa_ipmi_kcs.o
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_io_range_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:63:12: error: implicit declaration of function ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:63:5: error: nested extern declaration of ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_io_range_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:71:12: error: implicit declaration of function ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:71:5: error: nested extern declaration of ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_pcidev_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:79:12: error: implicit declaration of function ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:79:5: error: nested extern declaration of ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_pcidev_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:87:12: error: implicit declaration of function ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:87:5: error: nested extern declaration of ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_destroy_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:94:12: error: implicit declaration of function ‘xc_hvm_destroy_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
            ^
/root/qemu/include/hw/xen/xen_common.h:94:5: error: nested extern declaration of ‘xc_hvm_destroy_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_ioreq_server_state’:
/root/qemu/include/hw/xen/xen_common.h:100:12: error: implicit declaration of function ‘xc_hvm_set_ioreq_server_state’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
            ^
/root/qemu/include/hw/xen/xen_common.h:100:5: error: nested extern declaration of ‘xc_hvm_set_ioreq_server_state’ [-Werror=nested-externs]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_intx_level’:
/root/qemu/include/hw/xen/xen_common.h:109:12: error: implicit declaration of function ‘xc_hvm_set_pci_intx_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
            ^
/root/qemu/include/hw/xen/xen_common.h:109:5: error: nested extern declaration of ‘xc_hvm_set_pci_intx_level’ [-Werror=nested-externs]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_isa_irq_level’:
/root/qemu/include/hw/xen/xen_common.h:117:12: error: implicit declaration of function ‘xc_hvm_set_isa_irq_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
            ^
/root/qemu/include/hw/xen/xen_common.h:117:5: error: nested extern declaration of ‘xc_hvm_set_isa_irq_level’ [-Werror=nested-externs]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_link_route’:
/root/qemu/include/hw/xen/xen_common.h:123:12: error: implicit declaration of function ‘xc_hvm_set_pci_link_route’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
            ^
/root/qemu/include/hw/xen/xen_common.h:123:5: error: nested extern declaration of ‘xc_hvm_set_pci_link_route’ [-Werror=nested-externs]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_inject_msi’:
/root/qemu/include/hw/xen/xen_common.h:130:12: error: implicit declaration of function ‘xc_hvm_inject_msi’ [-Werror=implicit-function-declaration]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
            ^
/root/qemu/include/hw/xen/xen_common.h:130:5: error: nested extern declaration of ‘xc_hvm_inject_msi’ [-Werror=nested-externs]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_track_dirty_vram’:
/root/qemu/include/hw/xen/xen_common.h:137:12: error: implicit declaration of function ‘xc_hvm_track_dirty_vram’ [-Werror=implicit-function-declaration]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
            ^
/root/qemu/include/hw/xen/xen_common.h:137:5: error: nested extern declaration of ‘xc_hvm_track_dirty_vram’ [-Werror=nested-externs]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_modified_memory’:
/root/qemu/include/hw/xen/xen_common.h:145:12: error: implicit declaration of function ‘xc_hvm_modified_memory’ [-Werror=implicit-function-declaration]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:145:5: error: nested extern declaration of ‘xc_hvm_modified_memory’ [-Werror=nested-externs]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_mem_type’:
/root/qemu/include/hw/xen/xen_common.h:152:12: error: implicit declaration of function ‘xc_hvm_set_mem_type’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:152:5: error: nested extern declaration of ‘xc_hvm_set_mem_type’ [-Werror=nested-externs]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
     ^
  CC      hw/ipmi/ipmi_bmc_extern.o
  CC      hw/ipmi/isa_ipmi_bt.o
  CC      hw/mem/pc-dimm.o
  CC      hw/isa/isa-bus.o
  CC      hw/isa/apm.o
  CC      hw/mem/nvdimm.o
  CC      hw/misc/applesmc.o
  CC      hw/misc/debugexit.o
  CC      hw/misc/sga.o
  CC      hw/misc/pc-testdev.o
  CC      hw/misc/pci-testdev.o
  CC      hw/misc/unimp.o
  CC      hw/net/xen_nic.o
  CC      hw/net/ne2000.o
  CC      hw/net/pcnet.o
  CC      hw/net/eepro100.o
  CC      hw/net/pcnet-pci.o
  CC      hw/net/e1000.o
  CC      hw/net/e1000x_common.o
  CC      hw/net/net_rx_pkt.o
  CC      hw/net/net_tx_pkt.o
cc1: all warnings being treated as errors
/root/qemu/rules.mak:69: recipe for target 'hw/char/xen_console.o' failed
make: *** [hw/char/xen_console.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from /root/qemu/include/hw/xen/xen_backend.h:4:0,
                 from hw/display/xenfb.c:32:
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_create_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:46:12: error: implicit declaration of function ‘xc_hvm_create_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
            ^
/root/qemu/include/hw/xen/xen_common.h:46:5: error: nested extern declaration of ‘xc_hvm_create_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_get_ioreq_server_info’:
/root/qemu/include/hw/xen/xen_common.h:55:12: error: implicit declaration of function ‘xc_hvm_get_ioreq_server_info’ [-Werror=implicit-function-declaration]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
            ^
/root/qemu/include/hw/xen/xen_common.h:55:5: error: nested extern declaration of ‘xc_hvm_get_ioreq_server_info’ [-Werror=nested-externs]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_io_range_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:63:12: error: implicit declaration of function ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:63:5: error: nested extern declaration of ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_io_range_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:71:12: error: implicit declaration of function ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:71:5: error: nested extern declaration of ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_pcidev_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:79:12: error: implicit declaration of function ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:79:5: error: nested extern declaration of ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_pcidev_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:87:12: error: implicit declaration of function ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:87:5: error: nested extern declaration of ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_destroy_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:94:12: error: implicit declaration of function ‘xc_hvm_destroy_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
            ^
/root/qemu/include/hw/xen/xen_common.h:94:5: error: nested extern declaration of ‘xc_hvm_destroy_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_ioreq_server_state’:
/root/qemu/include/hw/xen/xen_common.h:100:12: error: implicit declaration of function ‘xc_hvm_set_ioreq_server_state’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
            ^
/root/qemu/include/hw/xen/xen_common.h:100:5: error: nested extern declaration of ‘xc_hvm_set_ioreq_server_state’ [-Werror=nested-externs]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_intx_level’:
/root/qemu/include/hw/xen/xen_common.h:109:12: error: implicit declaration of function ‘xc_hvm_set_pci_intx_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
            ^
/root/qemu/include/hw/xen/xen_common.h:109:5: error: nested extern declaration of ‘xc_hvm_set_pci_intx_level’ [-Werror=nested-externs]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_isa_irq_level’:
/root/qemu/include/hw/xen/xen_common.h:117:12: error: implicit declaration of function ‘xc_hvm_set_isa_irq_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
            ^
/root/qemu/include/hw/xen/xen_common.h:117:5: error: nested extern declaration of ‘xc_hvm_set_isa_irq_level’ [-Werror=nested-externs]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_link_route’:
/root/qemu/include/hw/xen/xen_common.h:123:12: error: implicit declaration of function ‘xc_hvm_set_pci_link_route’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
            ^
/root/qemu/include/hw/xen/xen_common.h:123:5: error: nested extern declaration of ‘xc_hvm_set_pci_link_route’ [-Werror=nested-externs]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_inject_msi’:
/root/qemu/include/hw/xen/xen_common.h:130:12: error: implicit declaration of function ‘xc_hvm_inject_msi’ [-Werror=implicit-function-declaration]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
            ^
/root/qemu/include/hw/xen/xen_common.h:130:5: error: nested extern declaration of ‘xc_hvm_inject_msi’ [-Werror=nested-externs]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_track_dirty_vram’:
/root/qemu/include/hw/xen/xen_common.h:137:12: error: implicit declaration of function ‘xc_hvm_track_dirty_vram’ [-Werror=implicit-function-declaration]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
            ^
/root/qemu/include/hw/xen/xen_common.h:137:5: error: nested extern declaration of ‘xc_hvm_track_dirty_vram’ [-Werror=nested-externs]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_modified_memory’:
/root/qemu/include/hw/xen/xen_common.h:145:12: error: implicit declaration of function ‘xc_hvm_modified_memory’ [-Werror=implicit-function-declaration]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:145:5: error: nested extern declaration of ‘xc_hvm_modified_memory’ [-Werror=nested-externs]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_mem_type’:
/root/qemu/include/hw/xen/xen_common.h:152:12: error: implicit declaration of function ‘xc_hvm_set_mem_type’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:152:5: error: nested extern declaration of ‘xc_hvm_set_mem_type’ [-Werror=nested-externs]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
     ^
In file included from /root/qemu/include/hw/xen/xen_backend.h:4:0,
                 from hw/net/xen_nic.c:31:
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_create_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:46:12: error: implicit declaration of function ‘xc_hvm_create_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
            ^
/root/qemu/include/hw/xen/xen_common.h:46:5: error: nested extern declaration of ‘xc_hvm_create_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_get_ioreq_server_info’:
/root/qemu/include/hw/xen/xen_common.h:55:12: error: implicit declaration of function ‘xc_hvm_get_ioreq_server_info’ [-Werror=implicit-function-declaration]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
            ^
/root/qemu/include/hw/xen/xen_common.h:55:5: error: nested extern declaration of ‘xc_hvm_get_ioreq_server_info’ [-Werror=nested-externs]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_io_range_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:63:12: error: implicit declaration of function ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:63:5: error: nested extern declaration of ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_io_range_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:71:12: error: implicit declaration of function ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:71:5: error: nested extern declaration of ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_pcidev_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:79:12: error: implicit declaration of function ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:79:5: error: nested extern declaration of ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_pcidev_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:87:12: error: implicit declaration of function ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:87:5: error: nested extern declaration of ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_destroy_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:94:12: error: implicit declaration of function ‘xc_hvm_destroy_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
            ^
/root/qemu/include/hw/xen/xen_common.h:94:5: error: nested extern declaration of ‘xc_hvm_destroy_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_ioreq_server_state’:
/root/qemu/include/hw/xen/xen_common.h:100:12: error: implicit declaration of function ‘xc_hvm_set_ioreq_server_state’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
            ^
/root/qemu/include/hw/xen/xen_common.h:100:5: error: nested extern declaration of ‘xc_hvm_set_ioreq_server_state’ [-Werror=nested-externs]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_intx_level’:
/root/qemu/include/hw/xen/xen_common.h:109:12: error: implicit declaration of function ‘xc_hvm_set_pci_intx_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
            ^
/root/qemu/include/hw/xen/xen_common.h:109:5: error: nested extern declaration of ‘xc_hvm_set_pci_intx_level’ [-Werror=nested-externs]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_isa_irq_level’:
/root/qemu/include/hw/xen/xen_common.h:117:12: error: implicit declaration of function ‘xc_hvm_set_isa_irq_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
            ^
/root/qemu/include/hw/xen/xen_common.h:117:5: error: nested extern declaration of ‘xc_hvm_set_isa_irq_level’ [-Werror=nested-externs]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_link_route’:
/root/qemu/include/hw/xen/xen_common.h:123:12: error: implicit declaration of function ‘xc_hvm_set_pci_link_route’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
            ^
/root/qemu/include/hw/xen/xen_common.h:123:5: error: nested extern declaration of ‘xc_hvm_set_pci_link_route’ [-Werror=nested-externs]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_inject_msi’:
/root/qemu/include/hw/xen/xen_common.h:130:12: error: implicit declaration of function ‘xc_hvm_inject_msi’ [-Werror=implicit-function-declaration]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
            ^
/root/qemu/include/hw/xen/xen_common.h:130:5: error: nested extern declaration of ‘xc_hvm_inject_msi’ [-Werror=nested-externs]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_track_dirty_vram’:
/root/qemu/include/hw/xen/xen_common.h:137:12: error: implicit declaration of function ‘xc_hvm_track_dirty_vram’ [-Werror=implicit-function-declaration]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
            ^
/root/qemu/include/hw/xen/xen_common.h:137:5: error: nested extern declaration of ‘xc_hvm_track_dirty_vram’ [-Werror=nested-externs]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_modified_memory’:
/root/qemu/include/hw/xen/xen_common.h:145:12: error: implicit declaration of function ‘xc_hvm_modified_memory’ [-Werror=implicit-function-declaration]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:145:5: error: nested extern declaration of ‘xc_hvm_modified_memory’ [-Werror=nested-externs]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_mem_type’:
/root/qemu/include/hw/xen/xen_common.h:152:12: error: implicit declaration of function ‘xc_hvm_set_mem_type’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:152:5: error: nested extern declaration of ‘xc_hvm_set_mem_type’ [-Werror=nested-externs]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
     ^
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
/root/qemu/rules.mak:69: recipe for target 'hw/block/xen_disk.o' failed
make: *** [hw/block/xen_disk.o] Error 1
/root/qemu/rules.mak:69: recipe for target 'hw/display/xenfb.o' failed
make: *** [hw/display/xenfb.o] Error 1
cc1: all warnings being treated as errors
/root/qemu/rules.mak:69: recipe for target 'hw/net/xen_nic.o' failed
make: *** [hw/net/xen_nic.o] Error 1

^ permalink raw reply	[flat|nested] 36+ messages in thread

* QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-04-14 22:50 ` Stefano Stabellini
  0 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-04-14 22:50 UTC (permalink / raw)
  To: paul.durrant
  Cc: jgross, sstabellini, wei.liu2, qemu-devel, julien.grall,
	anthony.perard, xen-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 37581 bytes --]

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.

Please note that up to now we have been unable to disentangle the PV
machine from the i386 emulator in QEMU.  Thus, on arm and arm64 we build
qemu with --target-list=i386-softmmu as we do on x86. Of course, the
xenfv machine cannot work on arm. Only the xenpv machine can be used.
However, the xenfv machine is still included in the build.

This means that we cannot break the xenfv machine build on arm and arm64.


Going into details, "xen: use libxendevicemodel when available" breaks
the build on arm and arm64 even with -DXC_WANT_COMPAT_DEVICEMODEL_API=1.
It breaks 4.8 compatibility which is a regression from QEMU's point of
view.


Why 4.8 compatibility? Because the previous commit:

commit 2a15d804eb0e4f8bc25738b6aec30a0142d5d293
Author: Paul Durrant <paul.durrant@citrix.com>
Date:   Tue Mar 7 10:55:33 2017 +0000

    configure: detect presence of libxendevicemodel

doesn't work properly on arm: Xen 4.9 is not detected. However, that is
not a regression per se.


We cannot break the QEMU build against Xen 4.9 with
-DXC_WANT_COMPAT_DEVICEMODEL_API=1 or older releases. That has to work,
but I guess it won't be too difficult to fix.

The difficulty is how to introduce proper Xen 4.9 and libxendevicemodel
support in QEMU. We either need to fix libxendevicemodel on arm
(although obviously is never going to be actually used at run time, but
it is necessary for the build), or we need to disentangle the xenpv
machine build from the xenfv machine build in QEMU. I prefer the latter
approach, of course.

I haven't dug into what is the problem with libxendevicemodel on arm.
Needless to say, if there is an issue on the Xen side, it might impact
the Xen 4.9 release.


For your information, you can download a free (as in beer) arm64
software model from ARM called "Foundation Model", see the Xen wiki for
instructions:

https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/FastModels

In addition, I think you can purchase access to ARM64 servers from
packet.net.


Thanks,

Stefano


---

In file included from /root/qemu/include/hw/xen/xen_backend.h:4:0,
                 from hw/block/xen_disk.c:27:
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_create_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:46:12: error: implicit declaration of function ‘xc_hvm_create_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
            ^
/root/qemu/include/hw/xen/xen_common.h:46:5: error: nested extern declaration of ‘xc_hvm_create_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_get_ioreq_server_info’:
/root/qemu/include/hw/xen/xen_common.h:55:12: error: implicit declaration of function ‘xc_hvm_get_ioreq_server_info’ [-Werror=implicit-function-declaration]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
            ^
/root/qemu/include/hw/xen/xen_common.h:55:5: error: nested extern declaration of ‘xc_hvm_get_ioreq_server_info’ [-Werror=nested-externs]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_io_range_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:63:12: error: implicit declaration of function ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:63:5: error: nested extern declaration of ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_io_range_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:71:12: error: implicit declaration of function ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:71:5: error: nested extern declaration of ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_pcidev_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:79:12: error: implicit declaration of function ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:79:5: error: nested extern declaration of ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_pcidev_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:87:12: error: implicit declaration of function ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:87:5: error: nested extern declaration of ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_destroy_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:94:12: error: implicit declaration of function ‘xc_hvm_destroy_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
            ^
/root/qemu/include/hw/xen/xen_common.h:94:5: error: nested extern declaration of ‘xc_hvm_destroy_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_ioreq_server_state’:
/root/qemu/include/hw/xen/xen_common.h:100:12: error: implicit declaration of function ‘xc_hvm_set_ioreq_server_state’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
            ^
/root/qemu/include/hw/xen/xen_common.h:100:5: error: nested extern declaration of ‘xc_hvm_set_ioreq_server_state’ [-Werror=nested-externs]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_intx_level’:
/root/qemu/include/hw/xen/xen_common.h:109:12: error: implicit declaration of function ‘xc_hvm_set_pci_intx_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
            ^
  CC      hw/intc/i8259.o
/root/qemu/include/hw/xen/xen_common.h:109:5: error: nested extern declaration of ‘xc_hvm_set_pci_intx_level’ [-Werror=nested-externs]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_isa_irq_level’:
/root/qemu/include/hw/xen/xen_common.h:117:12: error: implicit declaration of function ‘xc_hvm_set_isa_irq_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
            ^
/root/qemu/include/hw/xen/xen_common.h:117:5: error: nested extern declaration of ‘xc_hvm_set_isa_irq_level’ [-Werror=nested-externs]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_link_route’:
/root/qemu/include/hw/xen/xen_common.h:123:12: error: implicit declaration of function ‘xc_hvm_set_pci_link_route’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
            ^
/root/qemu/include/hw/xen/xen_common.h:123:5: error: nested extern declaration of ‘xc_hvm_set_pci_link_route’ [-Werror=nested-externs]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_inject_msi’:
/root/qemu/include/hw/xen/xen_common.h:130:12: error: implicit declaration of function ‘xc_hvm_inject_msi’ [-Werror=implicit-function-declaration]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
            ^
/root/qemu/include/hw/xen/xen_common.h:130:5: error: nested extern declaration of ‘xc_hvm_inject_msi’ [-Werror=nested-externs]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_track_dirty_vram’:
/root/qemu/include/hw/xen/xen_common.h:137:12: error: implicit declaration of function ‘xc_hvm_track_dirty_vram’ [-Werror=implicit-function-declaration]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
            ^
/root/qemu/include/hw/xen/xen_common.h:137:5: error: nested extern declaration of ‘xc_hvm_track_dirty_vram’ [-Werror=nested-externs]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_modified_memory’:
/root/qemu/include/hw/xen/xen_common.h:145:12: error: implicit declaration of function ‘xc_hvm_modified_memory’ [-Werror=implicit-function-declaration]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:145:5: error: nested extern declaration of ‘xc_hvm_modified_memory’ [-Werror=nested-externs]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_mem_type’:
/root/qemu/include/hw/xen/xen_common.h:152:12: error: implicit declaration of function ‘xc_hvm_set_mem_type’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:152:5: error: nested extern declaration of ‘xc_hvm_set_mem_type’ [-Werror=nested-externs]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
     ^
  CC      hw/intc/ioapic_common.o
  CC      hw/intc/intc.o
  CC      hw/ipack/ipack.o
  CC      hw/ipmi/ipmi.o
  CC      hw/ipack/tpci200.o
  CC      hw/ipmi/ipmi_bmc_sim.o
In file included from /root/qemu/include/hw/xen/xen_backend.h:4:0,
                 from hw/char/xen_console.c:29:
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_create_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:46:12: error: implicit declaration of function ‘xc_hvm_create_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
            ^
/root/qemu/include/hw/xen/xen_common.h:46:5: error: nested extern declaration of ‘xc_hvm_create_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_get_ioreq_server_info’:
/root/qemu/include/hw/xen/xen_common.h:55:12: error: implicit declaration of function ‘xc_hvm_get_ioreq_server_info’ [-Werror=implicit-function-declaration]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
            ^
/root/qemu/include/hw/xen/xen_common.h:55:5: error: nested extern declaration of ‘xc_hvm_get_ioreq_server_info’ [-Werror=nested-externs]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
     ^
  CC      hw/ipmi/isa_ipmi_kcs.o
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_io_range_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:63:12: error: implicit declaration of function ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:63:5: error: nested extern declaration of ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_io_range_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:71:12: error: implicit declaration of function ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:71:5: error: nested extern declaration of ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_pcidev_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:79:12: error: implicit declaration of function ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:79:5: error: nested extern declaration of ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_pcidev_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:87:12: error: implicit declaration of function ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:87:5: error: nested extern declaration of ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_destroy_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:94:12: error: implicit declaration of function ‘xc_hvm_destroy_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
            ^
/root/qemu/include/hw/xen/xen_common.h:94:5: error: nested extern declaration of ‘xc_hvm_destroy_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_ioreq_server_state’:
/root/qemu/include/hw/xen/xen_common.h:100:12: error: implicit declaration of function ‘xc_hvm_set_ioreq_server_state’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
            ^
/root/qemu/include/hw/xen/xen_common.h:100:5: error: nested extern declaration of ‘xc_hvm_set_ioreq_server_state’ [-Werror=nested-externs]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_intx_level’:
/root/qemu/include/hw/xen/xen_common.h:109:12: error: implicit declaration of function ‘xc_hvm_set_pci_intx_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
            ^
/root/qemu/include/hw/xen/xen_common.h:109:5: error: nested extern declaration of ‘xc_hvm_set_pci_intx_level’ [-Werror=nested-externs]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_isa_irq_level’:
/root/qemu/include/hw/xen/xen_common.h:117:12: error: implicit declaration of function ‘xc_hvm_set_isa_irq_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
            ^
/root/qemu/include/hw/xen/xen_common.h:117:5: error: nested extern declaration of ‘xc_hvm_set_isa_irq_level’ [-Werror=nested-externs]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_link_route’:
/root/qemu/include/hw/xen/xen_common.h:123:12: error: implicit declaration of function ‘xc_hvm_set_pci_link_route’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
            ^
/root/qemu/include/hw/xen/xen_common.h:123:5: error: nested extern declaration of ‘xc_hvm_set_pci_link_route’ [-Werror=nested-externs]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_inject_msi’:
/root/qemu/include/hw/xen/xen_common.h:130:12: error: implicit declaration of function ‘xc_hvm_inject_msi’ [-Werror=implicit-function-declaration]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
            ^
/root/qemu/include/hw/xen/xen_common.h:130:5: error: nested extern declaration of ‘xc_hvm_inject_msi’ [-Werror=nested-externs]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_track_dirty_vram’:
/root/qemu/include/hw/xen/xen_common.h:137:12: error: implicit declaration of function ‘xc_hvm_track_dirty_vram’ [-Werror=implicit-function-declaration]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
            ^
/root/qemu/include/hw/xen/xen_common.h:137:5: error: nested extern declaration of ‘xc_hvm_track_dirty_vram’ [-Werror=nested-externs]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_modified_memory’:
/root/qemu/include/hw/xen/xen_common.h:145:12: error: implicit declaration of function ‘xc_hvm_modified_memory’ [-Werror=implicit-function-declaration]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:145:5: error: nested extern declaration of ‘xc_hvm_modified_memory’ [-Werror=nested-externs]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_mem_type’:
/root/qemu/include/hw/xen/xen_common.h:152:12: error: implicit declaration of function ‘xc_hvm_set_mem_type’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:152:5: error: nested extern declaration of ‘xc_hvm_set_mem_type’ [-Werror=nested-externs]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
     ^
  CC      hw/ipmi/ipmi_bmc_extern.o
  CC      hw/ipmi/isa_ipmi_bt.o
  CC      hw/mem/pc-dimm.o
  CC      hw/isa/isa-bus.o
  CC      hw/isa/apm.o
  CC      hw/mem/nvdimm.o
  CC      hw/misc/applesmc.o
  CC      hw/misc/debugexit.o
  CC      hw/misc/sga.o
  CC      hw/misc/pc-testdev.o
  CC      hw/misc/pci-testdev.o
  CC      hw/misc/unimp.o
  CC      hw/net/xen_nic.o
  CC      hw/net/ne2000.o
  CC      hw/net/pcnet.o
  CC      hw/net/eepro100.o
  CC      hw/net/pcnet-pci.o
  CC      hw/net/e1000.o
  CC      hw/net/e1000x_common.o
  CC      hw/net/net_rx_pkt.o
  CC      hw/net/net_tx_pkt.o
cc1: all warnings being treated as errors
/root/qemu/rules.mak:69: recipe for target 'hw/char/xen_console.o' failed
make: *** [hw/char/xen_console.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from /root/qemu/include/hw/xen/xen_backend.h:4:0,
                 from hw/display/xenfb.c:32:
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_create_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:46:12: error: implicit declaration of function ‘xc_hvm_create_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
            ^
/root/qemu/include/hw/xen/xen_common.h:46:5: error: nested extern declaration of ‘xc_hvm_create_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_get_ioreq_server_info’:
/root/qemu/include/hw/xen/xen_common.h:55:12: error: implicit declaration of function ‘xc_hvm_get_ioreq_server_info’ [-Werror=implicit-function-declaration]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
            ^
/root/qemu/include/hw/xen/xen_common.h:55:5: error: nested extern declaration of ‘xc_hvm_get_ioreq_server_info’ [-Werror=nested-externs]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_io_range_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:63:12: error: implicit declaration of function ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:63:5: error: nested extern declaration of ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_io_range_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:71:12: error: implicit declaration of function ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:71:5: error: nested extern declaration of ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_pcidev_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:79:12: error: implicit declaration of function ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:79:5: error: nested extern declaration of ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_pcidev_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:87:12: error: implicit declaration of function ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:87:5: error: nested extern declaration of ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_destroy_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:94:12: error: implicit declaration of function ‘xc_hvm_destroy_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
            ^
/root/qemu/include/hw/xen/xen_common.h:94:5: error: nested extern declaration of ‘xc_hvm_destroy_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_ioreq_server_state’:
/root/qemu/include/hw/xen/xen_common.h:100:12: error: implicit declaration of function ‘xc_hvm_set_ioreq_server_state’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
            ^
/root/qemu/include/hw/xen/xen_common.h:100:5: error: nested extern declaration of ‘xc_hvm_set_ioreq_server_state’ [-Werror=nested-externs]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_intx_level’:
/root/qemu/include/hw/xen/xen_common.h:109:12: error: implicit declaration of function ‘xc_hvm_set_pci_intx_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
            ^
/root/qemu/include/hw/xen/xen_common.h:109:5: error: nested extern declaration of ‘xc_hvm_set_pci_intx_level’ [-Werror=nested-externs]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_isa_irq_level’:
/root/qemu/include/hw/xen/xen_common.h:117:12: error: implicit declaration of function ‘xc_hvm_set_isa_irq_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
            ^
/root/qemu/include/hw/xen/xen_common.h:117:5: error: nested extern declaration of ‘xc_hvm_set_isa_irq_level’ [-Werror=nested-externs]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_link_route’:
/root/qemu/include/hw/xen/xen_common.h:123:12: error: implicit declaration of function ‘xc_hvm_set_pci_link_route’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
            ^
/root/qemu/include/hw/xen/xen_common.h:123:5: error: nested extern declaration of ‘xc_hvm_set_pci_link_route’ [-Werror=nested-externs]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_inject_msi’:
/root/qemu/include/hw/xen/xen_common.h:130:12: error: implicit declaration of function ‘xc_hvm_inject_msi’ [-Werror=implicit-function-declaration]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
            ^
/root/qemu/include/hw/xen/xen_common.h:130:5: error: nested extern declaration of ‘xc_hvm_inject_msi’ [-Werror=nested-externs]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_track_dirty_vram’:
/root/qemu/include/hw/xen/xen_common.h:137:12: error: implicit declaration of function ‘xc_hvm_track_dirty_vram’ [-Werror=implicit-function-declaration]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
            ^
/root/qemu/include/hw/xen/xen_common.h:137:5: error: nested extern declaration of ‘xc_hvm_track_dirty_vram’ [-Werror=nested-externs]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_modified_memory’:
/root/qemu/include/hw/xen/xen_common.h:145:12: error: implicit declaration of function ‘xc_hvm_modified_memory’ [-Werror=implicit-function-declaration]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:145:5: error: nested extern declaration of ‘xc_hvm_modified_memory’ [-Werror=nested-externs]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_mem_type’:
/root/qemu/include/hw/xen/xen_common.h:152:12: error: implicit declaration of function ‘xc_hvm_set_mem_type’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:152:5: error: nested extern declaration of ‘xc_hvm_set_mem_type’ [-Werror=nested-externs]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
     ^
In file included from /root/qemu/include/hw/xen/xen_backend.h:4:0,
                 from hw/net/xen_nic.c:31:
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_create_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:46:12: error: implicit declaration of function ‘xc_hvm_create_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
            ^
/root/qemu/include/hw/xen/xen_common.h:46:5: error: nested extern declaration of ‘xc_hvm_create_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_create_ioreq_server(dmod, domid, handle_bufioreq,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_get_ioreq_server_info’:
/root/qemu/include/hw/xen/xen_common.h:55:12: error: implicit declaration of function ‘xc_hvm_get_ioreq_server_info’ [-Werror=implicit-function-declaration]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
            ^
/root/qemu/include/hw/xen/xen_common.h:55:5: error: nested extern declaration of ‘xc_hvm_get_ioreq_server_info’ [-Werror=nested-externs]
     return xc_hvm_get_ioreq_server_info(dmod, domid, id, ioreq_pfn,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_io_range_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:63:12: error: implicit declaration of function ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:63:5: error: nested extern declaration of ‘xc_hvm_map_io_range_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_io_range_to_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_io_range_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:71:12: error: implicit declaration of function ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
            ^
/root/qemu/include/hw/xen/xen_common.h:71:5: error: nested extern declaration of ‘xc_hvm_unmap_io_range_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_io_range_from_ioreq_server(dmod, domid, id, is_mmio,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_map_pcidev_to_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:79:12: error: implicit declaration of function ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:79:5: error: nested extern declaration of ‘xc_hvm_map_pcidev_to_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_map_pcidev_to_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_unmap_pcidev_from_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:87:12: error: implicit declaration of function ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
            ^
/root/qemu/include/hw/xen/xen_common.h:87:5: error: nested extern declaration of ‘xc_hvm_unmap_pcidev_from_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_unmap_pcidev_from_ioreq_server(dmod, domid, id, segment,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_destroy_ioreq_server’:
/root/qemu/include/hw/xen/xen_common.h:94:12: error: implicit declaration of function ‘xc_hvm_destroy_ioreq_server’ [-Werror=implicit-function-declaration]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
            ^
/root/qemu/include/hw/xen/xen_common.h:94:5: error: nested extern declaration of ‘xc_hvm_destroy_ioreq_server’ [-Werror=nested-externs]
     return xc_hvm_destroy_ioreq_server(dmod, domid, id);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_ioreq_server_state’:
/root/qemu/include/hw/xen/xen_common.h:100:12: error: implicit declaration of function ‘xc_hvm_set_ioreq_server_state’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
            ^
/root/qemu/include/hw/xen/xen_common.h:100:5: error: nested extern declaration of ‘xc_hvm_set_ioreq_server_state’ [-Werror=nested-externs]
     return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_intx_level’:
/root/qemu/include/hw/xen/xen_common.h:109:12: error: implicit declaration of function ‘xc_hvm_set_pci_intx_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
            ^
/root/qemu/include/hw/xen/xen_common.h:109:5: error: nested extern declaration of ‘xc_hvm_set_pci_intx_level’ [-Werror=nested-externs]
     return xc_hvm_set_pci_intx_level(dmod, domid, segment, bus, device,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_isa_irq_level’:
/root/qemu/include/hw/xen/xen_common.h:117:12: error: implicit declaration of function ‘xc_hvm_set_isa_irq_level’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
            ^
/root/qemu/include/hw/xen/xen_common.h:117:5: error: nested extern declaration of ‘xc_hvm_set_isa_irq_level’ [-Werror=nested-externs]
     return xc_hvm_set_isa_irq_level(dmod, domid, irq, level);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_pci_link_route’:
/root/qemu/include/hw/xen/xen_common.h:123:12: error: implicit declaration of function ‘xc_hvm_set_pci_link_route’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
            ^
/root/qemu/include/hw/xen/xen_common.h:123:5: error: nested extern declaration of ‘xc_hvm_set_pci_link_route’ [-Werror=nested-externs]
     return xc_hvm_set_pci_link_route(dmod, domid, link, irq);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_inject_msi’:
/root/qemu/include/hw/xen/xen_common.h:130:12: error: implicit declaration of function ‘xc_hvm_inject_msi’ [-Werror=implicit-function-declaration]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
            ^
/root/qemu/include/hw/xen/xen_common.h:130:5: error: nested extern declaration of ‘xc_hvm_inject_msi’ [-Werror=nested-externs]
     return xc_hvm_inject_msi(dmod, domid, msi_addr, msi_data);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_track_dirty_vram’:
/root/qemu/include/hw/xen/xen_common.h:137:12: error: implicit declaration of function ‘xc_hvm_track_dirty_vram’ [-Werror=implicit-function-declaration]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
            ^
/root/qemu/include/hw/xen/xen_common.h:137:5: error: nested extern declaration of ‘xc_hvm_track_dirty_vram’ [-Werror=nested-externs]
     return xc_hvm_track_dirty_vram(dmod, domid, first_pfn, nr,
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_modified_memory’:
/root/qemu/include/hw/xen/xen_common.h:145:12: error: implicit declaration of function ‘xc_hvm_modified_memory’ [-Werror=implicit-function-declaration]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:145:5: error: nested extern declaration of ‘xc_hvm_modified_memory’ [-Werror=nested-externs]
     return xc_hvm_modified_memory(dmod, domid, first_pfn, nr);
     ^
/root/qemu/include/hw/xen/xen_common.h: In function ‘xendevicemodel_set_mem_type’:
/root/qemu/include/hw/xen/xen_common.h:152:12: error: implicit declaration of function ‘xc_hvm_set_mem_type’ [-Werror=implicit-function-declaration]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
            ^
/root/qemu/include/hw/xen/xen_common.h:152:5: error: nested extern declaration of ‘xc_hvm_set_mem_type’ [-Werror=nested-externs]
     return xc_hvm_set_mem_type(dmod, domid, mem_type, first_pfn, nr);
     ^
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
/root/qemu/rules.mak:69: recipe for target 'hw/block/xen_disk.o' failed
make: *** [hw/block/xen_disk.o] Error 1
/root/qemu/rules.mak:69: recipe for target 'hw/display/xenfb.o' failed
make: *** [hw/display/xenfb.o] Error 1
cc1: all warnings being treated as errors
/root/qemu/rules.mak:69: recipe for target 'hw/net/xen_nic.o' failed
make: *** [hw/net/xen_nic.o] Error 1

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-04-14 22:50 ` Stefano Stabellini
@ 2017-04-15  0:39   ` Stefano Stabellini
  -1 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-04-15  0:39 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: paul.durrant, qemu-devel, anthony.perard, wei.liu2, jgross,
	julien.grall, xen-devel

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.

---

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

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-04-15  0:39   ` Stefano Stabellini
  0 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-04-15  0:39 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: jgross, wei.liu2, qemu-devel, julien.grall, paul.durrant,
	anthony.perard, xen-devel

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.

---

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


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

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-04-15  0:39   ` Stefano Stabellini
@ 2017-04-18 10:00     ` Paul Durrant
  -1 siblings, 0 replies; 36+ messages in thread
From: Paul Durrant @ 2017-04-18 10:00 UTC (permalink / raw)
  To: 'Stefano Stabellini'
  Cc: qemu-devel, Anthony Perard, Wei Liu, jgross, julien.grall, xen-devel

> -----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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-04-18 10:00     ` Paul Durrant
  0 siblings, 0 replies; 36+ messages in thread
From: Paul Durrant @ 2017-04-18 10:00 UTC (permalink / raw)
  To: 'Stefano Stabellini'
  Cc: jgross, Wei Liu, qemu-devel, julien.grall, Anthony Perard, xen-devel

> -----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


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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-04-18 10:00     ` Paul Durrant
@ 2017-04-18 17:40       ` Stefano Stabellini
  -1 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-04-18 17:40 UTC (permalink / raw)
  To: Paul Durrant
  Cc: 'Stefano Stabellini',
	qemu-devel, Anthony Perard, Wei Liu, jgross, julien.grall,
	xen-devel

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
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-04-18 17:40       ` Stefano Stabellini
  0 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-04-18 17:40 UTC (permalink / raw)
  To: Paul Durrant
  Cc: jgross, 'Stefano Stabellini',
	Wei Liu, qemu-devel, julien.grall, Anthony Perard, xen-devel

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
> 

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-04-18 17:40       ` Stefano Stabellini
@ 2017-04-19  8:43         ` Paul Durrant
  -1 siblings, 0 replies; 36+ messages in thread
From: Paul Durrant @ 2017-04-19  8:43 UTC (permalink / raw)
  To: 'Stefano Stabellini'
  Cc: qemu-devel, Anthony Perard, Wei Liu, jgross, julien.grall, xen-devel

> -----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
> >

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-04-19  8:43         ` Paul Durrant
  0 siblings, 0 replies; 36+ messages in thread
From: Paul Durrant @ 2017-04-19  8:43 UTC (permalink / raw)
  To: 'Stefano Stabellini'
  Cc: jgross, Wei Liu, qemu-devel, julien.grall, Anthony Perard, xen-devel

> -----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
> >

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-04-19  8:43         ` Paul Durrant
@ 2017-04-19 23:02           ` Stefano Stabellini
  -1 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-04-19 23:02 UTC (permalink / raw)
  To: Paul Durrant
  Cc: 'Stefano Stabellini',
	qemu-devel, Anthony Perard, Wei Liu, jgross, julien.grall,
	xen-devel

On Wed, 19 Apr 2017, Paul Durrant wrote:
> > -----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.

I managed to find the time to do some debugging. You are right that is
not anything major. The bug is due to a missing -lxencall in the QEMU
configure script, I wonder why it works on x86.

diff --git a/configure b/configure
index 99d6cbc..363a126 100755
--- a/configure
+++ b/configure
@@ -2027,9 +2027,9 @@ int main(void) {
   return 0;
 }
 EOF
-        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
+        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel -lxencall"
       then
-      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
+      xen_stable_libs="$xen_stable_libs -lxendevicemodel -lxencall"
       xen_ctrl_version=40900
       xen=yes
     elif

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-04-19 23:02           ` Stefano Stabellini
  0 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-04-19 23:02 UTC (permalink / raw)
  To: Paul Durrant
  Cc: jgross, 'Stefano Stabellini',
	Wei Liu, qemu-devel, julien.grall, Anthony Perard, xen-devel

On Wed, 19 Apr 2017, Paul Durrant wrote:
> > -----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.

I managed to find the time to do some debugging. You are right that is
not anything major. The bug is due to a missing -lxencall in the QEMU
configure script, I wonder why it works on x86.

diff --git a/configure b/configure
index 99d6cbc..363a126 100755
--- a/configure
+++ b/configure
@@ -2027,9 +2027,9 @@ int main(void) {
   return 0;
 }
 EOF
-        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
+        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel -lxencall"
       then
-      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
+      xen_stable_libs="$xen_stable_libs -lxendevicemodel -lxencall"
       xen_ctrl_version=40900
       xen=yes
     elif

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

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-04-19 23:02           ` Stefano Stabellini
@ 2017-04-20  8:02             ` Paul Durrant
  -1 siblings, 0 replies; 36+ messages in thread
From: Paul Durrant @ 2017-04-20  8:02 UTC (permalink / raw)
  To: 'Stefano Stabellini'
  Cc: qemu-devel, Anthony Perard, Wei Liu, jgross, julien.grall, xen-devel

> -----Original Message-----
> From: Stefano Stabellini [mailto:sstabellini@kernel.org]
> Sent: 20 April 2017 00:02
> 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 Wed, 19 Apr 2017, Paul Durrant wrote:
> > > -----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.
> 
> I managed to find the time to do some debugging. You are right that is
> not anything major. The bug is due to a missing -lxencall in the QEMU
> configure script, I wonder why it works on x86.

Yes, that's weird. libxendevicemodel does depend on libxencall for the case when the privcmd driver in dom0 does not support the new DM_OP ioctl, but that dependency should be there regardless of architecture.

> 
> diff --git a/configure b/configure
> index 99d6cbc..363a126 100755
> --- a/configure
> +++ b/configure
> @@ -2027,9 +2027,9 @@ int main(void) {
>    return 0;
>  }
>  EOF
> -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> +        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel -
> lxencall"
>        then
> -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> +      xen_stable_libs="$xen_stable_libs -lxendevicemodel -lxencall"
>        xen_ctrl_version=40900
>        xen=yes
>      elif

I think xencall should be part of the base xen_stable_libs anyway.

Cheers,

   Paul

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-04-20  8:02             ` Paul Durrant
  0 siblings, 0 replies; 36+ messages in thread
From: Paul Durrant @ 2017-04-20  8:02 UTC (permalink / raw)
  To: 'Stefano Stabellini'
  Cc: jgross, Wei Liu, qemu-devel, julien.grall, Anthony Perard, xen-devel

> -----Original Message-----
> From: Stefano Stabellini [mailto:sstabellini@kernel.org]
> Sent: 20 April 2017 00:02
> 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 Wed, 19 Apr 2017, Paul Durrant wrote:
> > > -----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.
> 
> I managed to find the time to do some debugging. You are right that is
> not anything major. The bug is due to a missing -lxencall in the QEMU
> configure script, I wonder why it works on x86.

Yes, that's weird. libxendevicemodel does depend on libxencall for the case when the privcmd driver in dom0 does not support the new DM_OP ioctl, but that dependency should be there regardless of architecture.

> 
> diff --git a/configure b/configure
> index 99d6cbc..363a126 100755
> --- a/configure
> +++ b/configure
> @@ -2027,9 +2027,9 @@ int main(void) {
>    return 0;
>  }
>  EOF
> -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> +        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel -
> lxencall"
>        then
> -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> +      xen_stable_libs="$xen_stable_libs -lxendevicemodel -lxencall"
>        xen_ctrl_version=40900
>        xen=yes
>      elif

I think xencall should be part of the base xen_stable_libs anyway.

Cheers,

   Paul

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-04-20  8:02             ` Paul Durrant
@ 2017-04-20 18:05               ` Stefano Stabellini
  -1 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-04-20 18:05 UTC (permalink / raw)
  To: Paul Durrant
  Cc: 'Stefano Stabellini',
	qemu-devel, Anthony Perard, Wei Liu, jgross, julien.grall,
	xen-devel

On Thu, 20 Apr 2017, Paul Durrant wrote:
> > -----Original Message-----
> > From: Stefano Stabellini [mailto:sstabellini@kernel.org]
> > Sent: 20 April 2017 00:02
> > 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 Wed, 19 Apr 2017, Paul Durrant wrote:
> > > > -----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.
> > 
> > I managed to find the time to do some debugging. You are right that is
> > not anything major. The bug is due to a missing -lxencall in the QEMU
> > configure script, I wonder why it works on x86.
> 
> Yes, that's weird. libxendevicemodel does depend on libxencall for the case when the privcmd driver in dom0 does not support the new DM_OP ioctl, but that dependency should be there regardless of architecture.
> 
> > 
> > diff --git a/configure b/configure
> > index 99d6cbc..363a126 100755
> > --- a/configure
> > +++ b/configure
> > @@ -2027,9 +2027,9 @@ int main(void) {
> >    return 0;
> >  }
> >  EOF
> > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > +        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel -
> > lxencall"
> >        then
> > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > +      xen_stable_libs="$xen_stable_libs -lxendevicemodel -lxencall"
> >        xen_ctrl_version=40900
> >        xen=yes
> >      elif
> 
> I think xencall should be part of the base xen_stable_libs anyway.

Yes, you are right. However I noticed that -lxencall needs to come after
-lxendevicemodel. So, I'll have to move -lxendevicemodel before
$xen_stable_libs, see below. I'll merge this patch into "configure:
detect presence of libxendevicemodel", if that's OK.

diff --git a/configure b/configure
index 99d6cbc..3133ef8 100755
--- a/configure
+++ b/configure
@@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
   else
 
     xen_libs="-lxenstore -lxenctrl -lxenguest"
-    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
+    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
 
     # First we test whether Xen headers and libraries are available.
     # If no, we are done and there is no Xen support.
@@ -2027,9 +2027,9 @@ int main(void) {
   return 0;
 }
 EOF
-        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
+        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
       then
-      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
+      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
       xen_ctrl_version=40900
       xen=yes
     elif

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-04-20 18:05               ` Stefano Stabellini
  0 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-04-20 18:05 UTC (permalink / raw)
  To: Paul Durrant
  Cc: jgross, 'Stefano Stabellini',
	Wei Liu, qemu-devel, julien.grall, Anthony Perard, xen-devel

On Thu, 20 Apr 2017, Paul Durrant wrote:
> > -----Original Message-----
> > From: Stefano Stabellini [mailto:sstabellini@kernel.org]
> > Sent: 20 April 2017 00:02
> > 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 Wed, 19 Apr 2017, Paul Durrant wrote:
> > > > -----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.
> > 
> > I managed to find the time to do some debugging. You are right that is
> > not anything major. The bug is due to a missing -lxencall in the QEMU
> > configure script, I wonder why it works on x86.
> 
> Yes, that's weird. libxendevicemodel does depend on libxencall for the case when the privcmd driver in dom0 does not support the new DM_OP ioctl, but that dependency should be there regardless of architecture.
> 
> > 
> > diff --git a/configure b/configure
> > index 99d6cbc..363a126 100755
> > --- a/configure
> > +++ b/configure
> > @@ -2027,9 +2027,9 @@ int main(void) {
> >    return 0;
> >  }
> >  EOF
> > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > +        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel -
> > lxencall"
> >        then
> > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > +      xen_stable_libs="$xen_stable_libs -lxendevicemodel -lxencall"
> >        xen_ctrl_version=40900
> >        xen=yes
> >      elif
> 
> I think xencall should be part of the base xen_stable_libs anyway.

Yes, you are right. However I noticed that -lxencall needs to come after
-lxendevicemodel. So, I'll have to move -lxendevicemodel before
$xen_stable_libs, see below. I'll merge this patch into "configure:
detect presence of libxendevicemodel", if that's OK.

diff --git a/configure b/configure
index 99d6cbc..3133ef8 100755
--- a/configure
+++ b/configure
@@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
   else
 
     xen_libs="-lxenstore -lxenctrl -lxenguest"
-    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
+    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
 
     # First we test whether Xen headers and libraries are available.
     # If no, we are done and there is no Xen support.
@@ -2027,9 +2027,9 @@ int main(void) {
   return 0;
 }
 EOF
-        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
+        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
       then
-      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
+      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
       xen_ctrl_version=40900
       xen=yes
     elif


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

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-04-20 18:05               ` Stefano Stabellini
@ 2017-04-21  8:29                 ` Paul Durrant
  -1 siblings, 0 replies; 36+ messages in thread
From: Paul Durrant @ 2017-04-21  8:29 UTC (permalink / raw)
  To: 'Stefano Stabellini'
  Cc: qemu-devel, Anthony Perard, Wei Liu, jgross, julien.grall, xen-devel

> -----Original Message-----
[snip]
> >
> > I think xencall should be part of the base xen_stable_libs anyway.
> 
> Yes, you are right. However I noticed that -lxencall needs to come after
> -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> $xen_stable_libs, see below. I'll merge this patch into "configure:
> detect presence of libxendevicemodel", if that's OK.
> 

Sure.

> diff --git a/configure b/configure
> index 99d6cbc..3133ef8 100755
> --- a/configure
> +++ b/configure
> @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
>    else
> 
>      xen_libs="-lxenstore -lxenctrl -lxenguest"
> -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> 
>      # First we test whether Xen headers and libraries are available.
>      # If no, we are done and there is no Xen support.
> @@ -2027,9 +2027,9 @@ int main(void) {
>    return 0;
>  }
>  EOF
> -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
>        then
> -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
>        xen_ctrl_version=40900
>        xen=yes
>      elif

LGTM.

Cheers,

  Paul

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-04-21  8:29                 ` Paul Durrant
  0 siblings, 0 replies; 36+ messages in thread
From: Paul Durrant @ 2017-04-21  8:29 UTC (permalink / raw)
  To: 'Stefano Stabellini'
  Cc: jgross, Wei Liu, qemu-devel, julien.grall, Anthony Perard, xen-devel

> -----Original Message-----
[snip]
> >
> > I think xencall should be part of the base xen_stable_libs anyway.
> 
> Yes, you are right. However I noticed that -lxencall needs to come after
> -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> $xen_stable_libs, see below. I'll merge this patch into "configure:
> detect presence of libxendevicemodel", if that's OK.
> 

Sure.

> diff --git a/configure b/configure
> index 99d6cbc..3133ef8 100755
> --- a/configure
> +++ b/configure
> @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
>    else
> 
>      xen_libs="-lxenstore -lxenctrl -lxenguest"
> -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> 
>      # First we test whether Xen headers and libraries are available.
>      # If no, we are done and there is no Xen support.
> @@ -2027,9 +2027,9 @@ int main(void) {
>    return 0;
>  }
>  EOF
> -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
>        then
> -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
>        xen_ctrl_version=40900
>        xen=yes
>      elif

LGTM.

Cheers,

  Paul

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-04-20 18:05               ` Stefano Stabellini
@ 2017-05-03 16:48                 ` Anthony PERARD
  -1 siblings, 0 replies; 36+ messages in thread
From: Anthony PERARD @ 2017-05-03 16:48 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: Paul Durrant, qemu-devel, Wei Liu, xen-devel

On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> On Thu, 20 Apr 2017, Paul Durrant wrote:
> > I think xencall should be part of the base xen_stable_libs anyway.
> 
> Yes, you are right. However I noticed that -lxencall needs to come after
> -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> $xen_stable_libs, see below. I'll merge this patch into "configure:
> detect presence of libxendevicemodel", if that's OK.
> 
> diff --git a/configure b/configure
> index 99d6cbc..3133ef8 100755
> --- a/configure
> +++ b/configure
> @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
>    else
>  
>      xen_libs="-lxenstore -lxenctrl -lxenguest"
> -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
>  
>      # First we test whether Xen headers and libraries are available.
>      # If no, we are done and there is no Xen support.
> @@ -2027,9 +2027,9 @@ int main(void) {
>    return 0;
>  }
>  EOF
> -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
>        then
> -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
>        xen_ctrl_version=40900
>        xen=yes
>      elif

Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
qemu-mainline branch fail.)

That's because -lxencall is not found because -L$path_to_libxencall is
missing in xen.git.

But I've notice something else, libxendevicemodel.so is not linked
against libxencall, that might be the root of the issues on arm.
(libxenctrl.so is linked against libxencall.)

Thought?


We probably need this patch in xen:

diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
index 55626a5049..81fa5a4ac4 100644
--- a/tools/libs/devicemodel/Makefile
+++ b/tools/libs/devicemodel/Makefile
@@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
        $(SYMLINK_SHLIB) $< $@
 
 libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
-       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
+       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
 
 .PHONY: install
 install: build

-- 
Anthony PERARD

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-05-03 16:48                 ` Anthony PERARD
  0 siblings, 0 replies; 36+ messages in thread
From: Anthony PERARD @ 2017-05-03 16:48 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel, Paul Durrant, Wei Liu, qemu-devel

On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> On Thu, 20 Apr 2017, Paul Durrant wrote:
> > I think xencall should be part of the base xen_stable_libs anyway.
> 
> Yes, you are right. However I noticed that -lxencall needs to come after
> -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> $xen_stable_libs, see below. I'll merge this patch into "configure:
> detect presence of libxendevicemodel", if that's OK.
> 
> diff --git a/configure b/configure
> index 99d6cbc..3133ef8 100755
> --- a/configure
> +++ b/configure
> @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
>    else
>  
>      xen_libs="-lxenstore -lxenctrl -lxenguest"
> -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
>  
>      # First we test whether Xen headers and libraries are available.
>      # If no, we are done and there is no Xen support.
> @@ -2027,9 +2027,9 @@ int main(void) {
>    return 0;
>  }
>  EOF
> -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
>        then
> -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
>        xen_ctrl_version=40900
>        xen=yes
>      elif

Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
qemu-mainline branch fail.)

That's because -lxencall is not found because -L$path_to_libxencall is
missing in xen.git.

But I've notice something else, libxendevicemodel.so is not linked
against libxencall, that might be the root of the issues on arm.
(libxenctrl.so is linked against libxencall.)

Thought?


We probably need this patch in xen:

diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
index 55626a5049..81fa5a4ac4 100644
--- a/tools/libs/devicemodel/Makefile
+++ b/tools/libs/devicemodel/Makefile
@@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
        $(SYMLINK_SHLIB) $< $@
 
 libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
-       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
+       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
 
 .PHONY: install
 install: build

-- 
Anthony PERARD

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

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-05-03 16:48                 ` Anthony PERARD
@ 2017-05-03 16:52                   ` Wei Liu
  -1 siblings, 0 replies; 36+ messages in thread
From: Wei Liu @ 2017-05-03 16:52 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: Stefano Stabellini, Paul Durrant, qemu-devel, Wei Liu, xen-devel

On Wed, May 03, 2017 at 05:48:38PM +0100, Anthony PERARD wrote:
> On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > I think xencall should be part of the base xen_stable_libs anyway.
> > 
> > Yes, you are right. However I noticed that -lxencall needs to come after
> > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > detect presence of libxendevicemodel", if that's OK.
> > 
> > diff --git a/configure b/configure
> > index 99d6cbc..3133ef8 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> >    else
> >  
> >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> >  
> >      # First we test whether Xen headers and libraries are available.
> >      # If no, we are done and there is no Xen support.
> > @@ -2027,9 +2027,9 @@ int main(void) {
> >    return 0;
> >  }
> >  EOF
> > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> >        then
> > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> >        xen_ctrl_version=40900
> >        xen=yes
> >      elif
> 
> Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> qemu-mainline branch fail.)
> 
> That's because -lxencall is not found because -L$path_to_libxencall is
> missing in xen.git.
> 
> But I've notice something else, libxendevicemodel.so is not linked
> against libxencall, that might be the root of the issues on arm.
> (libxenctrl.so is linked against libxencall.)
> 
> Thought?
> 
> 
> We probably need this patch in xen:
> 
> diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
> index 55626a5049..81fa5a4ac4 100644
> --- a/tools/libs/devicemodel/Makefile
> +++ b/tools/libs/devicemodel/Makefile
> @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
>         $(SYMLINK_SHLIB) $< $@
>  
>  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
>  

Isn't the dependency already encoded in tools/Rules.mk?

>  .PHONY: install
>  install: build
> 
> -- 
> Anthony PERARD

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-05-03 16:52                   ` Wei Liu
  0 siblings, 0 replies; 36+ messages in thread
From: Wei Liu @ 2017-05-03 16:52 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: xen-devel, Stefano Stabellini, Wei Liu, qemu-devel, Paul Durrant

On Wed, May 03, 2017 at 05:48:38PM +0100, Anthony PERARD wrote:
> On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > I think xencall should be part of the base xen_stable_libs anyway.
> > 
> > Yes, you are right. However I noticed that -lxencall needs to come after
> > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > detect presence of libxendevicemodel", if that's OK.
> > 
> > diff --git a/configure b/configure
> > index 99d6cbc..3133ef8 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> >    else
> >  
> >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> >  
> >      # First we test whether Xen headers and libraries are available.
> >      # If no, we are done and there is no Xen support.
> > @@ -2027,9 +2027,9 @@ int main(void) {
> >    return 0;
> >  }
> >  EOF
> > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> >        then
> > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> >        xen_ctrl_version=40900
> >        xen=yes
> >      elif
> 
> Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> qemu-mainline branch fail.)
> 
> That's because -lxencall is not found because -L$path_to_libxencall is
> missing in xen.git.
> 
> But I've notice something else, libxendevicemodel.so is not linked
> against libxencall, that might be the root of the issues on arm.
> (libxenctrl.so is linked against libxencall.)
> 
> Thought?
> 
> 
> We probably need this patch in xen:
> 
> diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
> index 55626a5049..81fa5a4ac4 100644
> --- a/tools/libs/devicemodel/Makefile
> +++ b/tools/libs/devicemodel/Makefile
> @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
>         $(SYMLINK_SHLIB) $< $@
>  
>  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
>  

Isn't the dependency already encoded in tools/Rules.mk?

>  .PHONY: install
>  install: build
> 
> -- 
> Anthony PERARD

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-05-03 16:48                 ` Anthony PERARD
@ 2017-05-03 16:52                   ` Paul Durrant
  -1 siblings, 0 replies; 36+ messages in thread
From: Paul Durrant @ 2017-05-03 16:52 UTC (permalink / raw)
  To: Anthony Perard, Stefano Stabellini; +Cc: qemu-devel, Wei Liu, xen-devel

> -----Original Message-----
> From: Anthony PERARD [mailto:anthony.perard@citrix.com]
> Sent: 03 May 2017 17:49
> To: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Paul Durrant <Paul.Durrant@citrix.com>; qemu-devel@nongnu.org; Wei
> Liu <wei.liu2@citrix.com>; xen-devel@lists.xenproject.org
> Subject: Re: QEMU build breakage on ARM against Xen 4.9 caused by
> libxendevicemodel
> 
> On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > I think xencall should be part of the base xen_stable_libs anyway.
> >
> > Yes, you are right. However I noticed that -lxencall needs to come after
> > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > detect presence of libxendevicemodel", if that's OK.
> >
> > diff --git a/configure b/configure
> > index 99d6cbc..3133ef8 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> >    else
> >
> >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -
> lxenevtchn"
> >
> >      # First we test whether Xen headers and libraries are available.
> >      # If no, we are done and there is no Xen support.
> > @@ -2027,9 +2027,9 @@ int main(void) {
> >    return 0;
> >  }
> >  EOF
> > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> >        then
> > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> >        xen_ctrl_version=40900
> >        xen=yes
> >      elif
> 
> Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> qemu-mainline branch fail.)
> 
> That's because -lxencall is not found because -L$path_to_libxencall is
> missing in xen.git.
> 
> But I've notice something else, libxendevicemodel.so is not linked
> against libxencall, that might be the root of the issues on arm.
> (libxenctrl.so is linked against libxencall.)
> 
> Thought?
> 

That's definitely an oversight. It should be linked against libxencall.

  Paul

> 
> We probably need this patch in xen:
> 
> diff --git a/tools/libs/devicemodel/Makefile
> b/tools/libs/devicemodel/Makefile
> index 55626a5049..81fa5a4ac4 100644
> --- a/tools/libs/devicemodel/Makefile
> +++ b/tools/libs/devicemodel/Makefile
> @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR):
> libxendevicemodel.so.$(MAJOR).$(MINOR)
>         $(SYMLINK_SHLIB) $< $@
> 
>  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
> libxendevicemodel.map
> -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -
> Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS)
> $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -
> Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS)
> $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
> 
>  .PHONY: install
>  install: build
> 
> --
> Anthony PERARD

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-05-03 16:52                   ` Paul Durrant
  0 siblings, 0 replies; 36+ messages in thread
From: Paul Durrant @ 2017-05-03 16:52 UTC (permalink / raw)
  To: Anthony Perard, Stefano Stabellini; +Cc: xen-devel, Wei Liu, qemu-devel

> -----Original Message-----
> From: Anthony PERARD [mailto:anthony.perard@citrix.com]
> Sent: 03 May 2017 17:49
> To: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Paul Durrant <Paul.Durrant@citrix.com>; qemu-devel@nongnu.org; Wei
> Liu <wei.liu2@citrix.com>; xen-devel@lists.xenproject.org
> Subject: Re: QEMU build breakage on ARM against Xen 4.9 caused by
> libxendevicemodel
> 
> On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > I think xencall should be part of the base xen_stable_libs anyway.
> >
> > Yes, you are right. However I noticed that -lxencall needs to come after
> > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > detect presence of libxendevicemodel", if that's OK.
> >
> > diff --git a/configure b/configure
> > index 99d6cbc..3133ef8 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> >    else
> >
> >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -
> lxenevtchn"
> >
> >      # First we test whether Xen headers and libraries are available.
> >      # If no, we are done and there is no Xen support.
> > @@ -2027,9 +2027,9 @@ int main(void) {
> >    return 0;
> >  }
> >  EOF
> > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> >        then
> > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> >        xen_ctrl_version=40900
> >        xen=yes
> >      elif
> 
> Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> qemu-mainline branch fail.)
> 
> That's because -lxencall is not found because -L$path_to_libxencall is
> missing in xen.git.
> 
> But I've notice something else, libxendevicemodel.so is not linked
> against libxencall, that might be the root of the issues on arm.
> (libxenctrl.so is linked against libxencall.)
> 
> Thought?
> 

That's definitely an oversight. It should be linked against libxencall.

  Paul

> 
> We probably need this patch in xen:
> 
> diff --git a/tools/libs/devicemodel/Makefile
> b/tools/libs/devicemodel/Makefile
> index 55626a5049..81fa5a4ac4 100644
> --- a/tools/libs/devicemodel/Makefile
> +++ b/tools/libs/devicemodel/Makefile
> @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR):
> libxendevicemodel.so.$(MAJOR).$(MINOR)
>         $(SYMLINK_SHLIB) $< $@
> 
>  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
> libxendevicemodel.map
> -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -
> Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS)
> $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -
> Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS)
> $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
> 
>  .PHONY: install
>  install: build
> 
> --
> Anthony PERARD

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-05-03 16:52                   ` Wei Liu
@ 2017-05-03 16:55                     ` Anthony PERARD
  -1 siblings, 0 replies; 36+ messages in thread
From: Anthony PERARD @ 2017-05-03 16:55 UTC (permalink / raw)
  To: Wei Liu; +Cc: Stefano Stabellini, Paul Durrant, qemu-devel, xen-devel

On Wed, May 03, 2017 at 05:52:07PM +0100, Wei Liu wrote:
> On Wed, May 03, 2017 at 05:48:38PM +0100, Anthony PERARD wrote:
> > On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > > I think xencall should be part of the base xen_stable_libs anyway.
> > > 
> > > Yes, you are right. However I noticed that -lxencall needs to come after
> > > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > > detect presence of libxendevicemodel", if that's OK.
> > > 
> > > diff --git a/configure b/configure
> > > index 99d6cbc..3133ef8 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> > >    else
> > >  
> > >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> > >  
> > >      # First we test whether Xen headers and libraries are available.
> > >      # If no, we are done and there is no Xen support.
> > > @@ -2027,9 +2027,9 @@ int main(void) {
> > >    return 0;
> > >  }
> > >  EOF
> > > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> > >        then
> > > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> > >        xen_ctrl_version=40900
> > >        xen=yes
> > >      elif
> > 
> > Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> > qemu-mainline branch fail.)
> > 
> > That's because -lxencall is not found because -L$path_to_libxencall is
> > missing in xen.git.
> > 
> > But I've notice something else, libxendevicemodel.so is not linked
> > against libxencall, that might be the root of the issues on arm.
> > (libxenctrl.so is linked against libxencall.)
> > 
> > Thought?
> > 
> > 
> > We probably need this patch in xen:
> > 
> > diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
> > index 55626a5049..81fa5a4ac4 100644
> > --- a/tools/libs/devicemodel/Makefile
> > +++ b/tools/libs/devicemodel/Makefile
> > @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
> >         $(SYMLINK_SHLIB) $< $@
> >  
> >  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> > -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> > +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
> >  
> 
> Isn't the dependency already encoded in tools/Rules.mk?

How? Which makefile variable would include -lxencall in the abrove line?

Also ldd libxendevicemodel.so does not list libxencall.so.

-- 
Anthony PERARD

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-05-03 16:55                     ` Anthony PERARD
  0 siblings, 0 replies; 36+ messages in thread
From: Anthony PERARD @ 2017-05-03 16:55 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Stefano Stabellini, qemu-devel, Paul Durrant

On Wed, May 03, 2017 at 05:52:07PM +0100, Wei Liu wrote:
> On Wed, May 03, 2017 at 05:48:38PM +0100, Anthony PERARD wrote:
> > On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > > I think xencall should be part of the base xen_stable_libs anyway.
> > > 
> > > Yes, you are right. However I noticed that -lxencall needs to come after
> > > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > > detect presence of libxendevicemodel", if that's OK.
> > > 
> > > diff --git a/configure b/configure
> > > index 99d6cbc..3133ef8 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> > >    else
> > >  
> > >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> > >  
> > >      # First we test whether Xen headers and libraries are available.
> > >      # If no, we are done and there is no Xen support.
> > > @@ -2027,9 +2027,9 @@ int main(void) {
> > >    return 0;
> > >  }
> > >  EOF
> > > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> > >        then
> > > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> > >        xen_ctrl_version=40900
> > >        xen=yes
> > >      elif
> > 
> > Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> > qemu-mainline branch fail.)
> > 
> > That's because -lxencall is not found because -L$path_to_libxencall is
> > missing in xen.git.
> > 
> > But I've notice something else, libxendevicemodel.so is not linked
> > against libxencall, that might be the root of the issues on arm.
> > (libxenctrl.so is linked against libxencall.)
> > 
> > Thought?
> > 
> > 
> > We probably need this patch in xen:
> > 
> > diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
> > index 55626a5049..81fa5a4ac4 100644
> > --- a/tools/libs/devicemodel/Makefile
> > +++ b/tools/libs/devicemodel/Makefile
> > @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
> >         $(SYMLINK_SHLIB) $< $@
> >  
> >  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> > -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> > +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
> >  
> 
> Isn't the dependency already encoded in tools/Rules.mk?

How? Which makefile variable would include -lxencall in the abrove line?

Also ldd libxendevicemodel.so does not list libxencall.so.

-- 
Anthony PERARD

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-05-03 16:48                 ` Anthony PERARD
@ 2017-05-03 17:20                   ` Stefano Stabellini
  -1 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-05-03 17:20 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: Stefano Stabellini, Paul Durrant, qemu-devel, Wei Liu, xen-devel

On Wed, 3 May 2017, Anthony PERARD wrote:
> On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > I think xencall should be part of the base xen_stable_libs anyway.
> > 
> > Yes, you are right. However I noticed that -lxencall needs to come after
> > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > detect presence of libxendevicemodel", if that's OK.
> > 
> > diff --git a/configure b/configure
> > index 99d6cbc..3133ef8 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> >    else
> >  
> >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> >  
> >      # First we test whether Xen headers and libraries are available.
> >      # If no, we are done and there is no Xen support.
> > @@ -2027,9 +2027,9 @@ int main(void) {
> >    return 0;
> >  }
> >  EOF
> > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> >        then
> > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> >        xen_ctrl_version=40900
> >        xen=yes
> >      elif
> 
> Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> qemu-mainline branch fail.)
> 
> That's because -lxencall is not found because -L$path_to_libxencall is
> missing in xen.git.
> 
> But I've notice something else, libxendevicemodel.so is not linked
> against libxencall, that might be the root of the issues on arm.
> (libxenctrl.so is linked against libxencall.)
> 
> Thought?
> 
> 
> We probably need this patch in xen:

We also need to add -L$path_to_libxencall and -I$path_to_libxencall to
tools/Makefile:subdir-all-qemu-xen-dir.


> diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
> index 55626a5049..81fa5a4ac4 100644
> --- a/tools/libs/devicemodel/Makefile
> +++ b/tools/libs/devicemodel/Makefile
> @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
>         $(SYMLINK_SHLIB) $< $@
>  
>  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
>  
>  .PHONY: install
>  install: build
> 
> -- 
> Anthony PERARD
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-05-03 17:20                   ` Stefano Stabellini
  0 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-05-03 17:20 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: xen-devel, Stefano Stabellini, Wei Liu, qemu-devel, Paul Durrant

On Wed, 3 May 2017, Anthony PERARD wrote:
> On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > I think xencall should be part of the base xen_stable_libs anyway.
> > 
> > Yes, you are right. However I noticed that -lxencall needs to come after
> > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > detect presence of libxendevicemodel", if that's OK.
> > 
> > diff --git a/configure b/configure
> > index 99d6cbc..3133ef8 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> >    else
> >  
> >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> >  
> >      # First we test whether Xen headers and libraries are available.
> >      # If no, we are done and there is no Xen support.
> > @@ -2027,9 +2027,9 @@ int main(void) {
> >    return 0;
> >  }
> >  EOF
> > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> >        then
> > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> >        xen_ctrl_version=40900
> >        xen=yes
> >      elif
> 
> Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> qemu-mainline branch fail.)
> 
> That's because -lxencall is not found because -L$path_to_libxencall is
> missing in xen.git.
> 
> But I've notice something else, libxendevicemodel.so is not linked
> against libxencall, that might be the root of the issues on arm.
> (libxenctrl.so is linked against libxencall.)
> 
> Thought?
> 
> 
> We probably need this patch in xen:

We also need to add -L$path_to_libxencall and -I$path_to_libxencall to
tools/Makefile:subdir-all-qemu-xen-dir.


> diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
> index 55626a5049..81fa5a4ac4 100644
> --- a/tools/libs/devicemodel/Makefile
> +++ b/tools/libs/devicemodel/Makefile
> @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
>         $(SYMLINK_SHLIB) $< $@
>  
>  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
>  
>  .PHONY: install
>  install: build
> 
> -- 
> Anthony PERARD
> 

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-05-03 17:20                   ` Stefano Stabellini
@ 2017-05-03 17:51                     ` Anthony PERARD
  -1 siblings, 0 replies; 36+ messages in thread
From: Anthony PERARD @ 2017-05-03 17:51 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: Paul Durrant, qemu-devel, Wei Liu, xen-devel

On Wed, May 03, 2017 at 10:20:59AM -0700, Stefano Stabellini wrote:
> On Wed, 3 May 2017, Anthony PERARD wrote:
> > On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > > I think xencall should be part of the base xen_stable_libs anyway.
> > > 
> > > Yes, you are right. However I noticed that -lxencall needs to come after
> > > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > > detect presence of libxendevicemodel", if that's OK.
> > > 
> > > diff --git a/configure b/configure
> > > index 99d6cbc..3133ef8 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> > >    else
> > >  
> > >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> > >  
> > >      # First we test whether Xen headers and libraries are available.
> > >      # If no, we are done and there is no Xen support.
> > > @@ -2027,9 +2027,9 @@ int main(void) {
> > >    return 0;
> > >  }
> > >  EOF
> > > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> > >        then
> > > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> > >        xen_ctrl_version=40900
> > >        xen=yes
> > >      elif
> > 
> > Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> > qemu-mainline branch fail.)
> > 
> > That's because -lxencall is not found because -L$path_to_libxencall is
> > missing in xen.git.
> > 
> > But I've notice something else, libxendevicemodel.so is not linked
> > against libxencall, that might be the root of the issues on arm.
> > (libxenctrl.so is linked against libxencall.)
> > 
> > Thought?
> > 
> > 
> > We probably need this patch in xen:
> 
> We also need to add -L$path_to_libxencall and -I$path_to_libxencall to
> tools/Makefile:subdir-all-qemu-xen-dir.

I don't think that needed because:
for -I, QEMU does not use anything from xencall, and any other includes
does not use xencall.h.

for -L, I think that would be usefull only if QEMU is built staticly.

Also, I don't think -lxencall is needed at all, if libxendevicemodel is
fixed. libxencall will only be a runtime dependency.


> > diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
> > index 55626a5049..81fa5a4ac4 100644
> > --- a/tools/libs/devicemodel/Makefile
> > +++ b/tools/libs/devicemodel/Makefile
> > @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
> >         $(SYMLINK_SHLIB) $< $@
> >  
> >  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> > -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> > +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
> >  
> >  .PHONY: install
> >  install: build
> > 
> > -- 
> > Anthony PERARD
> > 

-- 
Anthony PERARD

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-05-03 17:51                     ` Anthony PERARD
  0 siblings, 0 replies; 36+ messages in thread
From: Anthony PERARD @ 2017-05-03 17:51 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel, Paul Durrant, Wei Liu, qemu-devel

On Wed, May 03, 2017 at 10:20:59AM -0700, Stefano Stabellini wrote:
> On Wed, 3 May 2017, Anthony PERARD wrote:
> > On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > > I think xencall should be part of the base xen_stable_libs anyway.
> > > 
> > > Yes, you are right. However I noticed that -lxencall needs to come after
> > > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > > detect presence of libxendevicemodel", if that's OK.
> > > 
> > > diff --git a/configure b/configure
> > > index 99d6cbc..3133ef8 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> > >    else
> > >  
> > >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> > >  
> > >      # First we test whether Xen headers and libraries are available.
> > >      # If no, we are done and there is no Xen support.
> > > @@ -2027,9 +2027,9 @@ int main(void) {
> > >    return 0;
> > >  }
> > >  EOF
> > > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> > >        then
> > > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> > >        xen_ctrl_version=40900
> > >        xen=yes
> > >      elif
> > 
> > Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> > qemu-mainline branch fail.)
> > 
> > That's because -lxencall is not found because -L$path_to_libxencall is
> > missing in xen.git.
> > 
> > But I've notice something else, libxendevicemodel.so is not linked
> > against libxencall, that might be the root of the issues on arm.
> > (libxenctrl.so is linked against libxencall.)
> > 
> > Thought?
> > 
> > 
> > We probably need this patch in xen:
> 
> We also need to add -L$path_to_libxencall and -I$path_to_libxencall to
> tools/Makefile:subdir-all-qemu-xen-dir.

I don't think that needed because:
for -I, QEMU does not use anything from xencall, and any other includes
does not use xencall.h.

for -L, I think that would be usefull only if QEMU is built staticly.

Also, I don't think -lxencall is needed at all, if libxendevicemodel is
fixed. libxencall will only be a runtime dependency.


> > diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
> > index 55626a5049..81fa5a4ac4 100644
> > --- a/tools/libs/devicemodel/Makefile
> > +++ b/tools/libs/devicemodel/Makefile
> > @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
> >         $(SYMLINK_SHLIB) $< $@
> >  
> >  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> > -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> > +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
> >  
> >  .PHONY: install
> >  install: build
> > 
> > -- 
> > Anthony PERARD
> > 

-- 
Anthony PERARD

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-05-03 17:51                     ` Anthony PERARD
@ 2017-05-03 20:30                       ` Stefano Stabellini
  -1 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-05-03 20:30 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: Stefano Stabellini, Paul Durrant, qemu-devel, Wei Liu, xen-devel

On Wed, 3 May 2017, Anthony PERARD wrote:
> On Wed, May 03, 2017 at 10:20:59AM -0700, Stefano Stabellini wrote:
> > On Wed, 3 May 2017, Anthony PERARD wrote:
> > > On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > > > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > > > I think xencall should be part of the base xen_stable_libs anyway.
> > > > 
> > > > Yes, you are right. However I noticed that -lxencall needs to come after
> > > > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > > > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > > > detect presence of libxendevicemodel", if that's OK.
> > > > 
> > > > diff --git a/configure b/configure
> > > > index 99d6cbc..3133ef8 100755
> > > > --- a/configure
> > > > +++ b/configure
> > > > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> > > >    else
> > > >  
> > > >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > > > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > > > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> > > >  
> > > >      # First we test whether Xen headers and libraries are available.
> > > >      # If no, we are done and there is no Xen support.
> > > > @@ -2027,9 +2027,9 @@ int main(void) {
> > > >    return 0;
> > > >  }
> > > >  EOF
> > > > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > > > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> > > >        then
> > > > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > > > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> > > >        xen_ctrl_version=40900
> > > >        xen=yes
> > > >      elif
> > > 
> > > Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> > > qemu-mainline branch fail.)
> > > 
> > > That's because -lxencall is not found because -L$path_to_libxencall is
> > > missing in xen.git.
> > > 
> > > But I've notice something else, libxendevicemodel.so is not linked
> > > against libxencall, that might be the root of the issues on arm.
> > > (libxenctrl.so is linked against libxencall.)
> > > 
> > > Thought?
> > > 
> > > 
> > > We probably need this patch in xen:
> > 
> > We also need to add -L$path_to_libxencall and -I$path_to_libxencall to
> > tools/Makefile:subdir-all-qemu-xen-dir.
> 
> I don't think that needed because:
> for -I, QEMU does not use anything from xencall, and any other includes
> does not use xencall.h.
> 
> for -L, I think that would be usefull only if QEMU is built staticly.
> 
> Also, I don't think -lxencall is needed at all, if libxendevicemodel is
> fixed. libxencall will only be a runtime dependency.

I tried the patch below: on ARM, if I remove -L$DIR/tools/libs/call, the
QEMU configure script detects Xen 4.7 instead of 4.9. If I also remove
-Wl,-rpath-link=$DIR/tools/libs/call, it cannot detect Xen at all.

You are right that we can avoid -I and -l, but I think we need both -L
and -Wl,-rpath-link for tools/libs/call.


> > > diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
> > > index 55626a5049..81fa5a4ac4 100644
> > > --- a/tools/libs/devicemodel/Makefile
> > > +++ b/tools/libs/devicemodel/Makefile
> > > @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
> > >         $(SYMLINK_SHLIB) $< $@
> > >  
> > >  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> > > -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> > > +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
> > >  
> > >  .PHONY: install
> > >  install: build
> > > 
> > > -- 
> > > Anthony PERARD
> > > 
> 
> -- 
> Anthony PERARD
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-05-03 20:30                       ` Stefano Stabellini
  0 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-05-03 20:30 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: xen-devel, Stefano Stabellini, Wei Liu, qemu-devel, Paul Durrant

On Wed, 3 May 2017, Anthony PERARD wrote:
> On Wed, May 03, 2017 at 10:20:59AM -0700, Stefano Stabellini wrote:
> > On Wed, 3 May 2017, Anthony PERARD wrote:
> > > On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > > > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > > > I think xencall should be part of the base xen_stable_libs anyway.
> > > > 
> > > > Yes, you are right. However I noticed that -lxencall needs to come after
> > > > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > > > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > > > detect presence of libxendevicemodel", if that's OK.
> > > > 
> > > > diff --git a/configure b/configure
> > > > index 99d6cbc..3133ef8 100755
> > > > --- a/configure
> > > > +++ b/configure
> > > > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> > > >    else
> > > >  
> > > >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > > > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > > > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> > > >  
> > > >      # First we test whether Xen headers and libraries are available.
> > > >      # If no, we are done and there is no Xen support.
> > > > @@ -2027,9 +2027,9 @@ int main(void) {
> > > >    return 0;
> > > >  }
> > > >  EOF
> > > > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > > > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> > > >        then
> > > > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > > > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> > > >        xen_ctrl_version=40900
> > > >        xen=yes
> > > >      elif
> > > 
> > > Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> > > qemu-mainline branch fail.)
> > > 
> > > That's because -lxencall is not found because -L$path_to_libxencall is
> > > missing in xen.git.
> > > 
> > > But I've notice something else, libxendevicemodel.so is not linked
> > > against libxencall, that might be the root of the issues on arm.
> > > (libxenctrl.so is linked against libxencall.)
> > > 
> > > Thought?
> > > 
> > > 
> > > We probably need this patch in xen:
> > 
> > We also need to add -L$path_to_libxencall and -I$path_to_libxencall to
> > tools/Makefile:subdir-all-qemu-xen-dir.
> 
> I don't think that needed because:
> for -I, QEMU does not use anything from xencall, and any other includes
> does not use xencall.h.
> 
> for -L, I think that would be usefull only if QEMU is built staticly.
> 
> Also, I don't think -lxencall is needed at all, if libxendevicemodel is
> fixed. libxencall will only be a runtime dependency.

I tried the patch below: on ARM, if I remove -L$DIR/tools/libs/call, the
QEMU configure script detects Xen 4.7 instead of 4.9. If I also remove
-Wl,-rpath-link=$DIR/tools/libs/call, it cannot detect Xen at all.

You are right that we can avoid -I and -l, but I think we need both -L
and -Wl,-rpath-link for tools/libs/call.


> > > diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
> > > index 55626a5049..81fa5a4ac4 100644
> > > --- a/tools/libs/devicemodel/Makefile
> > > +++ b/tools/libs/devicemodel/Makefile
> > > @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
> > >         $(SYMLINK_SHLIB) $< $@
> > >  
> > >  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> > > -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> > > +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
> > >  
> > >  .PHONY: install
> > >  install: build
> > > 
> > > -- 
> > > Anthony PERARD
> > > 
> 
> -- 
> Anthony PERARD
> 

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-05-03 20:30                       ` Stefano Stabellini
@ 2017-05-03 20:38                         ` Stefano Stabellini
  -1 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-05-03 20:38 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Anthony PERARD, Paul Durrant, qemu-devel, Wei Liu, xen-devel

On Wed, 3 May 2017, Stefano Stabellini wrote:
> On Wed, 3 May 2017, Anthony PERARD wrote:
> > On Wed, May 03, 2017 at 10:20:59AM -0700, Stefano Stabellini wrote:
> > > On Wed, 3 May 2017, Anthony PERARD wrote:
> > > > On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > > > > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > > > > I think xencall should be part of the base xen_stable_libs anyway.
> > > > > 
> > > > > Yes, you are right. However I noticed that -lxencall needs to come after
> > > > > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > > > > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > > > > detect presence of libxendevicemodel", if that's OK.
> > > > > 
> > > > > diff --git a/configure b/configure
> > > > > index 99d6cbc..3133ef8 100755
> > > > > --- a/configure
> > > > > +++ b/configure
> > > > > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> > > > >    else
> > > > >  
> > > > >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > > > > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > > > > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> > > > >  
> > > > >      # First we test whether Xen headers and libraries are available.
> > > > >      # If no, we are done and there is no Xen support.
> > > > > @@ -2027,9 +2027,9 @@ int main(void) {
> > > > >    return 0;
> > > > >  }
> > > > >  EOF
> > > > > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > > > > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> > > > >        then
> > > > > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > > > > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> > > > >        xen_ctrl_version=40900
> > > > >        xen=yes
> > > > >      elif
> > > > 
> > > > Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> > > > qemu-mainline branch fail.)
> > > > 
> > > > That's because -lxencall is not found because -L$path_to_libxencall is
> > > > missing in xen.git.
> > > > 
> > > > But I've notice something else, libxendevicemodel.so is not linked
> > > > against libxencall, that might be the root of the issues on arm.
> > > > (libxenctrl.so is linked against libxencall.)
> > > > 
> > > > Thought?
> > > > 
> > > > 
> > > > We probably need this patch in xen:
> > > 
> > > We also need to add -L$path_to_libxencall and -I$path_to_libxencall to
> > > tools/Makefile:subdir-all-qemu-xen-dir.
> > 
> > I don't think that needed because:
> > for -I, QEMU does not use anything from xencall, and any other includes
> > does not use xencall.h.
> > 
> > for -L, I think that would be usefull only if QEMU is built staticly.
> > 
> > Also, I don't think -lxencall is needed at all, if libxendevicemodel is
> > fixed. libxencall will only be a runtime dependency.
> 
> I tried the patch below: on ARM, if I remove -L$DIR/tools/libs/call, the
> QEMU configure script detects Xen 4.7 instead of 4.9. If I also remove
> -Wl,-rpath-link=$DIR/tools/libs/call, it cannot detect Xen at all.
> 
> You are right that we can avoid -I and -l, but I think we need both -L
> and -Wl,-rpath-link for tools/libs/call.

Correction: the need for -L$DIR/tools/libs/call comes from -lxencall in
the QEMU configure script. If I remove -lxencall from configure, then it
works OK without it (as it should). But
-Wl,-rpath-link=$DIR/tools/libs/call is still required, otherwise the
xencall library cannot be found and loaded.


> > > > diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
> > > > index 55626a5049..81fa5a4ac4 100644
> > > > --- a/tools/libs/devicemodel/Makefile
> > > > +++ b/tools/libs/devicemodel/Makefile
> > > > @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
> > > >         $(SYMLINK_SHLIB) $< $@
> > > >  
> > > >  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> > > > -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> > > > +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
> > > >  
> > > >  .PHONY: install
> > > >  install: build
> > > > 
> > > > -- 
> > > > Anthony PERARD
> > > > 
> > 
> > -- 
> > Anthony PERARD
> > 
> 

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-05-03 20:38                         ` Stefano Stabellini
  0 siblings, 0 replies; 36+ messages in thread
From: Stefano Stabellini @ 2017-05-03 20:38 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Anthony PERARD, xen-devel, Paul Durrant, Wei Liu, qemu-devel

On Wed, 3 May 2017, Stefano Stabellini wrote:
> On Wed, 3 May 2017, Anthony PERARD wrote:
> > On Wed, May 03, 2017 at 10:20:59AM -0700, Stefano Stabellini wrote:
> > > On Wed, 3 May 2017, Anthony PERARD wrote:
> > > > On Thu, Apr 20, 2017 at 11:05:33AM -0700, Stefano Stabellini wrote:
> > > > > On Thu, 20 Apr 2017, Paul Durrant wrote:
> > > > > > I think xencall should be part of the base xen_stable_libs anyway.
> > > > > 
> > > > > Yes, you are right. However I noticed that -lxencall needs to come after
> > > > > -lxendevicemodel. So, I'll have to move -lxendevicemodel before
> > > > > $xen_stable_libs, see below. I'll merge this patch into "configure:
> > > > > detect presence of libxendevicemodel", if that's OK.
> > > > > 
> > > > > diff --git a/configure b/configure
> > > > > index 99d6cbc..3133ef8 100755
> > > > > --- a/configure
> > > > > +++ b/configure
> > > > > @@ -1992,7 +1992,7 @@ if test "$xen" != "no" ; then
> > > > >    else
> > > > >  
> > > > >      xen_libs="-lxenstore -lxenctrl -lxenguest"
> > > > > -    xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
> > > > > +    xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn"
> > > > >  
> > > > >      # First we test whether Xen headers and libraries are available.
> > > > >      # If no, we are done and there is no Xen support.
> > > > > @@ -2027,9 +2027,9 @@ int main(void) {
> > > > >    return 0;
> > > > >  }
> > > > >  EOF
> > > > > -        compile_prog "" "$xen_libs $xen_stable_libs -lxendevicemodel"
> > > > > +        compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> > > > >        then
> > > > > -      xen_stable_libs="$xen_stable_libs -lxendevicemodel"
> > > > > +      xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> > > > >        xen_ctrl_version=40900
> > > > >        xen=yes
> > > > >      elif
> > > > 
> > > > Hey, now that this patch is merged, xen.git fail to build QEMU. (osstest
> > > > qemu-mainline branch fail.)
> > > > 
> > > > That's because -lxencall is not found because -L$path_to_libxencall is
> > > > missing in xen.git.
> > > > 
> > > > But I've notice something else, libxendevicemodel.so is not linked
> > > > against libxencall, that might be the root of the issues on arm.
> > > > (libxenctrl.so is linked against libxencall.)
> > > > 
> > > > Thought?
> > > > 
> > > > 
> > > > We probably need this patch in xen:
> > > 
> > > We also need to add -L$path_to_libxencall and -I$path_to_libxencall to
> > > tools/Makefile:subdir-all-qemu-xen-dir.
> > 
> > I don't think that needed because:
> > for -I, QEMU does not use anything from xencall, and any other includes
> > does not use xencall.h.
> > 
> > for -L, I think that would be usefull only if QEMU is built staticly.
> > 
> > Also, I don't think -lxencall is needed at all, if libxendevicemodel is
> > fixed. libxencall will only be a runtime dependency.
> 
> I tried the patch below: on ARM, if I remove -L$DIR/tools/libs/call, the
> QEMU configure script detects Xen 4.7 instead of 4.9. If I also remove
> -Wl,-rpath-link=$DIR/tools/libs/call, it cannot detect Xen at all.
> 
> You are right that we can avoid -I and -l, but I think we need both -L
> and -Wl,-rpath-link for tools/libs/call.

Correction: the need for -L$DIR/tools/libs/call comes from -lxencall in
the QEMU configure script. If I remove -lxencall from configure, then it
works OK without it (as it should). But
-Wl,-rpath-link=$DIR/tools/libs/call is still required, otherwise the
xencall library cannot be found and loaded.


> > > > diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
> > > > index 55626a5049..81fa5a4ac4 100644
> > > > --- a/tools/libs/devicemodel/Makefile
> > > > +++ b/tools/libs/devicemodel/Makefile
> > > > @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
> > > >         $(SYMLINK_SHLIB) $< $@
> > > >  
> > > >  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> > > > -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> > > > +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
> > > >  
> > > >  .PHONY: install
> > > >  install: build
> > > > 
> > > > -- 
> > > > Anthony PERARD
> > > > 
> > 
> > -- 
> > Anthony PERARD
> > 
> 

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
  2017-05-03 16:55                     ` Anthony PERARD
@ 2017-05-04 11:08                       ` Wei Liu
  -1 siblings, 0 replies; 36+ messages in thread
From: Wei Liu @ 2017-05-04 11:08 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: Wei Liu, Stefano Stabellini, Paul Durrant, qemu-devel, xen-devel

On Wed, May 03, 2017 at 05:55:36PM +0100, Anthony PERARD wrote:
> > > --- a/tools/libs/devicemodel/Makefile
> > > +++ b/tools/libs/devicemodel/Makefile
> > > @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
> > >         $(SYMLINK_SHLIB) $< $@
> > >  
> > >  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> > > -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> > > +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
> > >  
> > 
> > Isn't the dependency already encoded in tools/Rules.mk?
> 
> How? Which makefile variable would include -lxencall in the abrove line?
> 

I was thinking about SHDEPS_* in Rules.mk. That's for something else.

And you're right. We should fix it here.

Wei.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel
@ 2017-05-04 11:08                       ` Wei Liu
  0 siblings, 0 replies; 36+ messages in thread
From: Wei Liu @ 2017-05-04 11:08 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: xen-devel, Stefano Stabellini, Wei Liu, qemu-devel, Paul Durrant

On Wed, May 03, 2017 at 05:55:36PM +0100, Anthony PERARD wrote:
> > > --- a/tools/libs/devicemodel/Makefile
> > > +++ b/tools/libs/devicemodel/Makefile
> > > @@ -63,7 +63,7 @@ libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
> > >         $(SYMLINK_SHLIB) $< $@
> > >  
> > >  libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
> > > -       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
> > > +       $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(LDLIBS_libxencall) $(APPEND_LDFLAGS)
> > >  
> > 
> > Isn't the dependency already encoded in tools/Rules.mk?
> 
> How? Which makefile variable would include -lxencall in the abrove line?
> 

I was thinking about SHDEPS_* in Rules.mk. That's for something else.

And you're right. We should fix it here.

Wei.

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2017-05-04 11:09 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-14 22:50 [Qemu-devel] QEMU build breakage on ARM against Xen 4.9 caused by libxendevicemodel Stefano Stabellini
2017-04-14 22:50 ` Stefano Stabellini
2017-04-15  0:39 ` [Qemu-devel] " Stefano Stabellini
2017-04-15  0:39   ` Stefano Stabellini
2017-04-18 10:00   ` [Qemu-devel] " Paul Durrant
2017-04-18 10:00     ` Paul Durrant
2017-04-18 17:40     ` [Qemu-devel] " Stefano Stabellini
2017-04-18 17:40       ` Stefano Stabellini
2017-04-19  8:43       ` [Qemu-devel] " Paul Durrant
2017-04-19  8:43         ` Paul Durrant
2017-04-19 23:02         ` [Qemu-devel] " Stefano Stabellini
2017-04-19 23:02           ` Stefano Stabellini
2017-04-20  8:02           ` [Qemu-devel] " Paul Durrant
2017-04-20  8:02             ` Paul Durrant
2017-04-20 18:05             ` [Qemu-devel] " Stefano Stabellini
2017-04-20 18:05               ` Stefano Stabellini
2017-04-21  8:29               ` [Qemu-devel] " Paul Durrant
2017-04-21  8:29                 ` Paul Durrant
2017-05-03 16:48               ` [Qemu-devel] " Anthony PERARD
2017-05-03 16:48                 ` Anthony PERARD
2017-05-03 16:52                 ` [Qemu-devel] " Wei Liu
2017-05-03 16:52                   ` Wei Liu
2017-05-03 16:55                   ` [Qemu-devel] " Anthony PERARD
2017-05-03 16:55                     ` Anthony PERARD
2017-05-04 11:08                     ` [Qemu-devel] " Wei Liu
2017-05-04 11:08                       ` Wei Liu
2017-05-03 16:52                 ` [Qemu-devel] " Paul Durrant
2017-05-03 16:52                   ` Paul Durrant
2017-05-03 17:20                 ` [Qemu-devel] " Stefano Stabellini
2017-05-03 17:20                   ` Stefano Stabellini
2017-05-03 17:51                   ` [Qemu-devel] " Anthony PERARD
2017-05-03 17:51                     ` Anthony PERARD
2017-05-03 20:30                     ` [Qemu-devel] " Stefano Stabellini
2017-05-03 20:30                       ` Stefano Stabellini
2017-05-03 20:38                       ` [Qemu-devel] " Stefano Stabellini
2017-05-03 20:38                         ` Stefano Stabellini

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.