Patchwork [Xen-devel] Re: [Qemu-devel] [PATCH V11 00/15] Xen device model support

login
register
mail settings
Submitter Alexander Graf
Date March 22, 2011, 3:52 p.m.
Message ID <4D88C5DA.7020909@suse.de>
Download mbox | patch
Permalink /patch/87939/
State New
Headers show

Comments

Alexander Graf - March 22, 2011, 3:52 p.m.
On 03/22/2011 04:40 PM, Alexander Graf wrote:
> On 03/22/2011 03:47 PM, Anthony PERARD wrote:
>> On Tue, Mar 22, 2011 at 14:23, Alexander Graf<agraf@suse.de>  wrote:
>>> On 03/01/2011 07:35 PM, anthony.perard@citrix.com wrote:
>>>> From: Anthony PERARD<anthony.perard@citrix.com>
>>>>
>>>> Hi all,
>>>>
>>>> Here is the few change since the V10:
>>>>
>>>>    - Add braces for blocks with single statement in the clean-up 
>>>> patch;
>>>>    - the patch that builds Xen only for x86 have been removed, 
>>>> instead,
>>>>      xen_domainbuild is built with libhw and other Xen files are 
>>>> built for
>>>> i386
>>>>      target only;
>>>>    - the redirection structure with function pointer have been 
>>>> removed,
>>>> instead,
>>>>      there are few #define or static inline function use for the
>>>> compatibility;
>>> ARGH!
>>>
>>> The point of the redirection structure was so I can plug in with 
>>> xenner and
>>> replace all the xen calls with in-qemu versions. If you remove it, 
>>> I'll have
>>> to put it back in in the xenner patch set :(.
>>>
>>> We need some sort of abstraction between calling xs_ functions and 
>>> actually
>>> calling them. Wrapping all xs_ calls in static inlines would be fine 
>>> for
>>> that, as would the indirect calling table.
>> As my series doesn't change a lot of things in the xen code, I think
>> it is better than you put it back in your patch set.
>
> Hrm. This is on a SLES11SP1 system w/ Xen 4.0.1.
>
>
> Alex
>
>
> agraf@toonie:/dev/shm> git clone 
> git://xenbits.xen.org/people/aperard/qemu-dm.git
> Initialized empty Git repository in /dev/shm/qemu-dm/.git/
> remote: Counting objects: 74570, done.
> remote: Compressing objects: 100% (15699/15699), done.
> remote: Total 74570 (delta 59960), reused 73357 (delta 58769)
> Receiving objects: 100% (74570/74570), 22.24 MiB | 1296 KiB/s, done.
> Resolving deltas: 100% (59960/59960), done.
> agraf@toonie:/dev/shm/qemu-dm> git checkout origin/qemu-dm-v11
> Note: moving to "origin/qemu-dm-v11" which isn't a local branch
> If you want to create a new branch from this checkout, you may do so
> (now or later) by using -b with the checkout command again. Example:
>   git checkout -b <new_branch_name>
> HEAD is now at 47d548f... xen: Add Xen hypercall for sleep state in 
> the cmos_s3 callback.
> agraf@toonie:/dev/shm/qemu-dm> ./configure --target-list=x86_64-softmmu
> make -j
> Install prefix    /usr/local
> BIOS directory    /usr/local/share/qemu
> binary directory  /usr/local/bin
> config directory  /usr/local/etc
> Manual directory  /usr/local/share/man
> ELF interp prefix /usr/gnemul/qemu-%M
> Source path       /dev/shm/qemu-dm
> C compiler        gcc
> Host C compiler   gcc
> CFLAGS            -O2 -g
> QEMU_CFLAGS       -Werror -m64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE 
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes 
> -Wredundant-decls -Wall -Wundef -Wendif-labels -Wwrite-strings 
> -Wmissing-prototypes -fno-strict-aliasing  -fstack-protector-all 
> -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security 
> -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration 
> -Wold-style-definition -Wtype-limits
> LDFLAGS           -Wl,--warn-common -m64 -g
> make              make
> install           install
> host CPU          x86_64
> host big endian   no
> target list       x86_64-softmmu
> tcg debug enabled no
> Mon debug enabled no
> gprof enabled     no
> sparse enabled    no
> strip binaries    yes
> profiler          no
> static build      no
> -Werror enabled   yes
> SDL support       yes
> curses support    yes
> curl support      yes
> check support     no
> mingw32 support   no
> Audio drivers     oss
> Extra audio cards ac97 es1370 sb16 hda
> Block whitelist
> Mixer emulation   no
> VNC TLS support   no
> VNC SASL support  no
> VNC JPEG support  yes
> VNC PNG support   yes
> VNC thread        no
> xen support       yes
> brlapi support    no
> bluez  support    no
> Documentation     yes
> NPTL support      yes
> GUEST_BASE        yes
> PIE user targets  no
> vde support       no
> IO thread         no
> Linux AIO support no
> ATTR/XATTR support yes
> Install blobs     yes
> KVM support       yes
> fdt support       no
> preadv support    yes
> fdatasync         yes
> madvise           yes
> posix_madvise     yes
> uuid support      yes
> vhost-net support no
> Trace backend     nop
> Trace output file trace-<pid>
> spice support     no
> rbd support       no
> xfsctl support    no
> agraf@toonie:/dev/shm/qemu-dm> make -j
>   GEN   x86_64-softmmu/config-devices.mak
>   GEN   config-all-devices.mak
>   GEN   qemu-options.texi
>   GEN   qemu-img-cmds.texi
>   GEN   qemu-monitor.texi
>   GEN   qemu-nbd.8
>   GEN   qemu-tech.html
>   GEN   config-host.h
>   GEN   QMP/qmp-commands.txt
>   GEN   trace.h
>   GEN   qemu-options.def
>   GEN   trace.c
>   GEN   qemu-img-cmds.h
>   GEN   qemu-img.1
>   AS    optionrom/multiboot.o
>   AS    optionrom/linuxboot.o
>   Building optionrom/linuxboot.img
>   Building optionrom/multiboot.img
>   Building optionrom/linuxboot.raw
>   Building optionrom/multiboot.raw
>   Signing optionrom/multiboot.bin
>   Signing optionrom/linuxboot.bin
>   GEN   qemu-doc.html
>   GEN   qemu.1
>   CC    qemu-nbd.o
>   CC    qemu-tool.o
>   CC    qemu-error.o
>   CC    osdep.o
>   CC    oslib-posix.o
>   CC    trace.o
>   CC    cutils.o
>   CC    qemu-option.o
>   CC    module.o
>   CC    nbd.o
>   CC    block.o
>   CC    qemu-malloc.o
>   CC    cache-utils.o
>   CC    aio.o
>   CC    aes.o
>   CC    qemu-config.o
>   CC    posix-aio-compat.o
>   CC    block/raw.o
>   CC    block/cow.o
>   CC    block/qcow.o
>   CC    block/vdi.o
>   CC    block/vmdk.o
>   CC    block/cloop.o
>   CC    block/dmg.o
>   CC    block/bochs.o
>   CC    block/vpc.o
>   CC    block/vvfat.o
>   CC    block/qcow2.o
>   CC    block/qcow2-refcount.o
>   CC    block/qcow2-cluster.o
>   CC    block/qcow2-snapshot.o
>   CC    block/qcow2-cache.o
>   CC    block/qed.o
>   CC    block/qed-gencb.o
>   CC    block/qed-l2-cache.o
>   CC    block/qed-table.o
>   CC    block/qed-cluster.o
>   CC    block/qed-check.o
>   CC    block/parallels.o
>   CC    block/nbd.o
>   CC    block/blkdebug.o
>   CC    block/sheepdog.o
>   CC    block/blkverify.o
>   CC    block/raw-posix.o
>   CC    block/curl.o
>   CC    qint.o
>   CC    qstring.o
>   CC    qdict.o
>   CC    qlist.o
>   CC    qfloat.o
>   CC    qbool.o
>   CC    qjson.o
>   CC    json-lexer.o
>   CC    json-streamer.o
>   CC    json-parser.o
>   CC    qerror.o
>   CC    qemu-timer-common.o
>   CC    qemu-img.o
>   CC    qemu-io.o
>   CC    cmd.o
>   CC    blockdev.o
>   CC    net.o
>   CC    libhw64/vl.o
>   CC    libhw64/virtio.o
>   CC    libhw64/loader.o
>   CC    net/queue.o
>   CC    libhw64/virtio-console.o
>   CC    libhw64/fw_cfg.o
>   CC    net/checksum.o
>   CC    net/util.o
>   CC    libhw64/pci.o
>   CC    net/socket.o
>   CC    libhw64/pci_bridge.o
>   CC    libhw64/msix.o
>   CC    net/dump.o
>   CC    libhw64/msi.o
>   CC    libhw64/pci_host.o
>   CC    libhw64/pcie_host.o
>   CC    libhw64/ioh3420.o
>   CC    net/tap.o
>   CC    libhw64/xio3130_upstream.o
>   CC    net/tap-linux.o
>   CC    fsdev/qemu-fsdev.o
>   CC    net/slirp.o
>   CC    libhw64/xio3130_downstream.o
>   CC    libhw64/watchdog.o
>   CC    libhw64/serial.o
>   CC    libhw64/parallel.o
>   CC    readline.o
>   CC    console.o
>   CC    libhw64/i8254.o
>   CC    libhw64/pcspk.o
>   CC    cursor.o
>   CC    libhw64/pckbd.o
>   CC    async.o
>   CC    os-posix.o
>   CC    tcg-runtime.o
>   CC    host-utils.o
>   CC    irq.o
>   CC    libhw64/usb-uhci.o
>   CC    libhw64/usb-ohci.o
>   CC    ioport.o
>   CC    libhw64/fdc.o
>   CC    libhw64/acpi.o
>   CC    libhw64/acpi_piix4.o
>   CC    input.o
>   CC    libhw64/pm_smbus.o
>   CC    libhw64/apm.o
>   CC    i2c.o
>   CC    libhw64/dma.o
>   CC    smbus.o
>   CC    libhw64/hpet.o
>   CC    smbus_eeprom.o
>   CC    libhw64/applesmc.o
>   CC    eeprom93xx.o
>   CC    libhw64/wdt_i6300esb.o
>   CC    scsi-disk.o
>   CC    libhw64/pcie.o
>   CC    cdrom.o
>   CC    scsi-generic.o
>   CC    libhw64/pcie_aer.o
>   CC    libhw64/pcie_port.o
>   CC    scsi-bus.o
>   CC    usb.o
>   CC    libhw64/ne2000.o
>   CC    usb-hub.o
>   CC    usb-linux.o
>   CC    libhw64/eepro100.o
>   CC    usb-hid.o
>   CC    usb-msd.o
>   CC    usb-wacom.o
>   CC    libhw64/pcnet-pci.o
>   CC    usb-serial.o
>   CC    usb-net.o
>   CC    libhw64/pcnet.o
>   CC    usb-bus.o
>   CC    usb-desc.o
>   CC    libhw64/e1000.o
>   CC    libhw64/rtl8139.o
>   CC    bt.o
>   CC    libhw64/ne2000-isa.o
>   CC    libhw64/ide/core.o
>   CC    libhw64/ide/qdev.o
>   CC    bt-host.o
>   CC    libhw64/ide/pci.o
>   CC    bt-vhci.o
>   CC    libhw64/ide/isa.o
>   CC    bt-l2cap.o
>   CC    bt-sdp.o
>   CC    libhw64/ide/piix.o
>   CC    bt-hci.o
>   CC    bt-hid.o
>   CC    usb-bt.o
>   CC    libhw64/ide/ahci.o
>   CC    bt-hci-csr.o
>   CC    buffered_file.o
>   CC    libhw64/ide/ich.o
>   CC    migration.o
>   CC    migration-tcp.o
>   CC    qemu-sockets.o
>   CC    libhw64/lsi53c895a.o
>   CC    qemu-char.o
>   CC    libhw64/dma-helpers.o
>   CC    savevm.o
>   CC    msmouse.o
>   CC    libhw64/sysbus.o
>   CC    libhw64/isa-bus.o
>   CC    libhw64/qdev-addr.o
>   CC    ps2.o
>   CC    libhw64/vga-pci.o
>   CC    qdev.o
>   CC    libhw64/vga-isa.o
>   CC    qdev-properties.o
>   CC    block-migration.o
>   CC    libhw64/vmware_vga.o
>   CC    pflib.o
>   CC    libhw64/xen_domainbuild.o
>   CC    libhw64/sb16.o
>   CC    bitmap.o
>   CC    bitops.o
>   CC    libhw64/es1370.o
>   CC    migration-exec.o
>   CC    migration-unix.o
>   CC    libhw64/ac97.o
>   CC    migration-fd.o
>   CC    audio/audio.o
>   CC    libhw64/intel-hda.o
>   CC    audio/noaudio.o
>   CC    libhw64/hda-audio.o
>   CC    libhw64/virtio-9p-debug.o
>   CC    audio/wavaudio.o
>   CC    libhw64/virtio-9p-local.o
>   CC    audio/mixeng.o
>   CC    audio/sdlaudio.o
>   CC    libhw64/virtio-9p-xattr.o
>   CC    audio/ossaudio.o
>   CC    libhw64/virtio-9p-xattr-user.o
>   CC    libhw64/virtio-9p-posix-acl.o
>   CC    audio/wavcapture.o
>   CC    ui/keymaps.o
>   CC    ui/sdl.o
>   CC    ui/sdl_zoom.o
>   CC    ui/x_keymap.o
>   CC    ui/curses.o
>   CC    ui/vnc.o
>   CC    ui/d3des.o
>   CC    ui/vnc-enc-zlib.o
>   CC    ui/vnc-enc-hextile.o
>   CC    ui/vnc-enc-tight.o
>   CC    ui/vnc-palette.o
>   CC    ui/vnc-enc-zrle.o
>   CC    ui/vnc-jobs-sync.o
>   CC    iov.o
>   CC    acl.o
>   CC    compatfd.o
>   CC    notify.o
>   CC    event_notifier.o
>   CC    qemu-timer.o
>   CC    slirp/cksum.o
>   CC    slirp/if.o
>   CC    slirp/ip_icmp.o
>   CC    slirp/ip_input.o
>   CC    slirp/ip_output.o
>   CC    slirp/slirp.o
>   CC    slirp/mbuf.o
>   CC    slirp/misc.o
>   CC    slirp/sbuf.o
>   CC    slirp/socket.o
>   CC    slirp/tcp_input.o
>   CC    slirp/tcp_output.o
>   CC    slirp/tcp_subr.o
>   CC    slirp/tcp_timer.o
>   CC    slirp/udp.o
>   CC    slirp/bootp.o
>   CC    slirp/tftp.o
>   CC    xen_backend.o
>   CC    xen_devconfig.o
>   CC    xen_console.o
>   CC    xenfb.o
>   CC    xen_disk.o
>   CC    xen_nic.o
>   CC    libdis/i386-dis.o
>   LINK  qemu-nbd
>   LINK  qemu-img
>   LINK  qemu-io
> rm multiboot.o linuxboot.raw linuxboot.img multiboot.raw multiboot.img 
> linuxboot.o
>   GEN   config-target.h
>   GEN   x86_64-softmmu/qmp-commands.h
>   GEN   x86_64-softmmu/hmp-commands.h
>   CC    x86_64-softmmu/arch_init.o
>   CC    x86_64-softmmu/cpus.o
>   CC    x86_64-softmmu/gdbstub.o
>   CC    x86_64-softmmu/virtio-pci.o
>   CC    x86_64-softmmu/vhost_net.o
>   CC    x86_64-softmmu/machine.o
>   CC    x86_64-softmmu/balloon.o
>   CC    x86_64-softmmu/virtio-blk.o
>   CC    x86_64-softmmu/virtio-balloon.o
>   CC    x86_64-softmmu/virtio-net.o
>   CC    x86_64-softmmu/virtio-serial-bus.o
>   CC    x86_64-softmmu/rwhandler.o
>   CC    x86_64-softmmu/virtio-9p.o
>   CC    x86_64-softmmu/kvm.o
>   CC    x86_64-softmmu/kvm-all.o
>   CC    x86_64-softmmu/xen-stub.o
>   CC    x86_64-softmmu/ivshmem.o
>   CC    x86_64-softmmu/exec.o
>   CC    x86_64-softmmu/translate-all.o
>   CC    x86_64-softmmu/cpu-exec.o
>   CC    x86_64-softmmu/translate.o
>   CC    x86_64-softmmu/tcg/tcg.o
>   CC    x86_64-softmmu/fpu/softfloat-native.o
>   CC    x86_64-softmmu/op_helper.o
>   CC    x86_64-softmmu/helper.o
>   CC    x86_64-softmmu/cpuid.o
>   CC    x86_64-softmmu/disas.o
>   CC    x86_64-softmmu/xen_machine_pv.o
>   CC    x86_64-softmmu/xen-all.o
>   CC    x86_64-softmmu/xen-mapcache.o
>   CC    x86_64-softmmu/xen_platform.o
>   CC    x86_64-softmmu/vga.o
>   CC    x86_64-softmmu/mc146818rtc.o
>   CC    x86_64-softmmu/i8259.o
>   CC    x86_64-softmmu/pc.o
>   CC    x86_64-softmmu/cirrus_vga.o
>   CC    x86_64-softmmu/apic.o
>   CC    x86_64-softmmu/ioapic.o
>   CC    x86_64-softmmu/piix_pci.o
>   CC    x86_64-softmmu/vmport.o
>   CC    x86_64-softmmu/device-hotplug.o
>   CC    x86_64-softmmu/pci-hotplug.o
>   CC    x86_64-softmmu/smbios.o
>   CC    x86_64-softmmu/wdt_ib700.o
>   CC    x86_64-softmmu/debugcon.o
>   CC    x86_64-softmmu/multiboot.o
>   CC    x86_64-softmmu/pc_piix.o
>   CC    x86_64-softmmu/kvmclock.o
>   CC    x86_64-softmmu/monitor.o
>   LINK  x86_64-softmmu/qemu-system-x86_64
> xen-all.o: In function `xen_pci_slot_get_pirq':
> /dev/shm/qemu-dm/xen-all.c:67: multiple definition of 
> `xen_pci_slot_get_pirq'
> xen-stub.o:/dev/shm/qemu-dm/xen-stub.c:13: first defined here
> xen-all.o: In function `xen_init':
> /dev/shm/qemu-dm/xen-all.c:488: multiple definition of `xen_init'
> xen-stub.o:/dev/shm/qemu-dm/xen-stub.c:43: first defined here
> xen-all.o: In function `xen_ram_alloc':
> /dev/shm/qemu-dm/xen-all.c:152: multiple definition of `xen_ram_alloc'
> xen-stub.o:/dev/shm/qemu-dm/xen-stub.c:30: first defined here
> xen-all.o: In function `xen_interrupt_controller_init':
> /dev/shm/qemu-dm/xen-all.c:110: multiple definition of 
> `xen_interrupt_controller_init'
> xen-stub.o:/dev/shm/qemu-dm/xen-stub.c:34: first defined here
> xen-all.o: In function `xen_cmos_set_s3_resume':
> /dev/shm/qemu-dm/xen-all.c:95: multiple definition of 
> `xen_cmos_set_s3_resume'
> xen-stub.o:/dev/shm/qemu-dm/xen-stub.c:26: first defined here
> xen-all.o: In function `xen_piix_pci_write_config_client':
> /dev/shm/qemu-dm/xen-all.c:78: multiple definition of 
> `xen_piix_pci_write_config_client'
> xen-stub.o:/dev/shm/qemu-dm/xen-stub.c:22: first defined here
> xen-all.o: In function `xen_piix3_set_irq':
> /dev/shm/qemu-dm/xen-all.c:72: multiple definition of `xen_piix3_set_irq'
> xen-stub.o:/dev/shm/qemu-dm/xen-stub.c:18: first defined here
> xen_platform.o: In function `pci_xen_platform_init':
> /dev/shm/qemu-dm/hw/xen_platform.c:327: multiple definition of 
> `pci_xen_platform_init'
> xen-stub.o:/dev/shm/qemu-dm/xen-stub.c:39: first defined here
> collect2: ld returned 1 exit status
> make[1]: *** [qemu-system-x86_64] Error 1
> make: *** [subdir-x86_64-softmmu] Error 2


This should be the correct fix:
Anthony PERARD - March 22, 2011, 5:22 p.m.
On Tue, 22 Mar 2011, Alexander Graf wrote:

> On 03/22/2011 04:40 PM, Alexander Graf wrote:
> > make[1]: *** [qemu-system-x86_64] Error 1
>
>
> This should be the correct fix:
>
>
> diff --git a/Makefile.target b/Makefile.target
> index c0db745..91bbf39 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -212,10 +212,11 @@ endif
>   # xen backend driver support
>   obj-i386-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
>
> -ifeq ($(TARGET_ARCH), i386)
> -CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y)
> +ifeq ($(TARGET_BASE_ARCH),i386)
> +  CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)

with 's/KVM/XEN/g'
;)

>   else
> -CONFIG_NO_XEN = y
> +  CONFIG_XEN =
> +  CONFIG_NO_XEN = y
>   endif
>   # xen support
>   CONFIG_NO_XEN_MAPCACHE = $(if $(subst n,,$(CONFIG_XEN_MAPCACHE)),n,y)

Yep, this is the fix.

Could you use this fix and continue to review ? or did I need to resend
the all patch series ?

Regards,
Alexander Graf - March 22, 2011, 5:23 p.m.
On 03/22/2011 06:22 PM, Anthony PERARD wrote:
> On Tue, 22 Mar 2011, Alexander Graf wrote:
>
>> On 03/22/2011 04:40 PM, Alexander Graf wrote:
>>> make[1]: *** [qemu-system-x86_64] Error 1
>>
>> This should be the correct fix:
>>
>>
>> diff --git a/Makefile.target b/Makefile.target
>> index c0db745..91bbf39 100644
>> --- a/Makefile.target
>> +++ b/Makefile.target
>> @@ -212,10 +212,11 @@ endif
>>    # xen backend driver support
>>    obj-i386-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
>>
>> -ifeq ($(TARGET_ARCH), i386)
>> -CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y)
>> +ifeq ($(TARGET_BASE_ARCH),i386)
>> +  CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
> with 's/KVM/XEN/g'
> ;)
>
>>    else
>> -CONFIG_NO_XEN = y
>> +  CONFIG_XEN =
>> +  CONFIG_NO_XEN = y
>>    endif
>>    # xen support
>>    CONFIG_NO_XEN_MAPCACHE = $(if $(subst n,,$(CONFIG_XEN_MAPCACHE)),n,y)
> Yep, this is the fix.
>
> Could you use this fix and continue to review ? or did I need to resend
> the all patch series ?

No, I'm still at it. It takes much longer than I expected :)


Alex

Patch

diff --git a/Makefile.target b/Makefile.target
index c0db745..91bbf39 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -212,10 +212,11 @@  endif
  # xen backend driver support
  obj-i386-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o

-ifeq ($(TARGET_ARCH), i386)
-CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y)
+ifeq ($(TARGET_BASE_ARCH),i386)
+  CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
  else
-CONFIG_NO_XEN = y
+  CONFIG_XEN =
+  CONFIG_NO_XEN = y
  endif
  # xen support
  CONFIG_NO_XEN_MAPCACHE = $(if $(subst n,,$(CONFIG_XEN_MAPCACHE)),n,y)