Permalink
Switch branches/tags
Commits on Jan 6, 2013
  1. target-ppc: Error out for -cpu host on unknown PVR

    afaerber committed Dec 18, 2012
    Previously we silently exited, with subclasses we got an opcode warning.
    Instead, explicitly tell the user what's wrong.
    
    An indication for this is -cpu ? showing "host" with an all-zero PVR.
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  2. target-ppc: Slim conversion of model definitions to QOM subclasses

    afaerber committed Dec 18, 2012
    Since the model list is highly macrofied, keep ppc_def_t for now and
    save a pointer to it in PowerPCCPUClass. This results in a flat list of
    subclasses including aliases, to be refined later.
    
    Move cpu_ppc_init() to translate_init.c and drop helper.c.
    Long-term the idea is to turn translate_init.c into a standalone cpu.c.
    
    Inline cpu_ppc_usable() into type registration.
    
    Split cpu_ppc_register() in two by code movement into the initfn and
    by turning the remaining part into a realizefn.
    Move qemu_init_vcpu() call into the new realizefn and adapt
    create_ppc_opcodes() to return an Error.
    
    Change ppc_find_by_pvr() -> ppc_cpu_class_by_pvr().
    Change ppc_find_by_name() -> ppc_cpu_class_by_name().
    
    Turn -cpu host into its own subclass. This requires to move the
    kvm_enabled() check in ppc_cpu_class_by_name() to avoid the class being
    found via the normal name lookup in the !kvm_enabled() case.
    Turn kvmppc_host_cpu_def() into the class_init and add an initfn that
    asserts KVM is in fact enabled.
    
    Implement -cpu ? and the QMP equivalent in terms of subclasses.
    This newly exposes -cpu host to the user, ordered last for -cpu ?.
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  3. virtio-pci: replace byte swap hack

    blueswirl committed Apr 14, 2012
    Remove byte swaps by declaring the config space
    as native endian.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
  4. tests: add gcov support

    blueswirl committed May 1, 2012
    Add support for compiling for GCOV test coverage, enabled
    with '--enable-gcov' during configure.
    
    Test coverage will be reported after each test.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Commits on Jan 5, 2013
  1. hw/i386: Fix broken build for non POSIX hosts

    stweil committed with blueswirl Jan 5, 2013
    pc-testdev.c cannot be compiled with MinGW (and other non POSIX hosts):
    
      CC    i386-softmmu/hw/i386/../pc-testdev.o
    qemu/hw/i386/../pc-testdev.c:38:22: warning: sys/mman.h: file not found
    qemu/hw/i386/../pc-testdev.c: In function ‘test_flush_page’:
    qemu/hw/i386/../pc-testdev.c:103: warning: implicit declaration of function ‘mprotect’
    ...
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
  2. softfloat: Implement uint64_to_float128

    rth7680 committed with blueswirl Dec 31, 2012
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Richard Henderson <rth@twiddle.net>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
  3. softfloat: Fix uint64_to_float64

    rth7680 committed with blueswirl Dec 31, 2012
    The interface to normalizeRoundAndPackFloat64 requires that the
    high bit be clear.  Perform one shift-right-and-jam if needed.
    
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Richard Henderson <rth@twiddle.net>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Commits on Jan 4, 2013
  1. Merge remote-tracking branch 'stefanha/trivial-patches' into staging

    Anthony Liguori committed Jan 4, 2013
    * stefanha/trivial-patches:
      spice: drop incorrect vm_change_state_handler() opaque
      linux-user/syscall.c: remove forward declarations
      hw/mcf5206: Reduce size of lookup table
      Remove --sparc_cpu option from the configure list
      pseries: Remove unneeded include statement (fixes MinGW builds)
      pc_sysfw: Check for qemu_find_file() failure
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  2. Merge remote-tracking branch 'kraxel/testdev.1' into staging

    Anthony Liguori committed Jan 4, 2013
    * kraxel/testdev.1:
      pc: remove bochs bios debug ports
      hw: Add test device for unittests execution
      add isa-debug-exit device.
      switch debugcon to memory api
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  3. Merge remote-tracking branch 'kraxel/acpi.2' into staging

    Anthony Liguori committed Jan 4, 2013
    * kraxel/acpi.2:
      apci: assign memory regions to ich9 lpc device
      apci: assign memory regions to piix4 acpi device
      acpi: autoload dsdt
      configure: also symlink *.aml files
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  4. spice: drop incorrect vm_change_state_handler() opaque

    Stefan Hajnoczi committed Dec 19, 2012
    The spice_server pointer is a global variable and
    vm_change_state_handler() therefore does not use its opaque parameter.
    
    The vm change state handler is added with a pointer to the spice_server
    pointer.  This is useless and we probably would not want 2 levels of
    pointers.
    
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Uri Lublin <uril@redhat.com>
  5. linux-user/syscall.c: remove forward declarations

    John Spencer committed with Stefan Hajnoczi Dec 25, 2012
    instead use the correct headers that define these functions.
    
    Requested-by: Stefan Weil <sw@weilnetz.de>
    Signed-off-by: John Spencer <maillist-qemu@barfooze.de>
    Reviewed-by: Amos Kong <kongjianjun@gmail.com>
    Reviewed-by: Stefan Weil <sw@weilnetz.de>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  6. hw/mcf5206: Reduce size of lookup table

    stweil committed with Stefan Hajnoczi Dec 22, 2012
    This typically reduces the size from 512 bytes to 128 bytes.
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  7. Remove --sparc_cpu option from the configure list

    陳韋任 (Wei-Ren Chen) committed with Stefan Hajnoczi Dec 20, 2012
      commit 9b9c37c always assume sparcv9,
    the others are no longer supported. Remove --sparc_cpu option from the
    configure list.
    
    Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  8. pseries: Remove unneeded include statement (fixes MinGW builds)

    stweil committed with Stefan Hajnoczi Dec 20, 2012
    sys/mman.h is not needed (tested on Linux) and unavailable for MinGW,
    so remove it.
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  9. pc_sysfw: Check for qemu_find_file() failure

    Markus Armbruster committed with Stefan Hajnoczi Dec 5, 2012
    pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happily
    creates a drive without a medium.
    
    When pc_system_flash_init() asks for its size, bdrv_getlength() fails
    with -ENOMEDIUM, which isn't checked either.  It fails relatively
    cleanly only because -ENOMEDIUM isn't a multiple of 4096:
    
        $ qemu-system-x86_64 -S -vnc :0 -bios nonexistant
        qemu: PC system firmware (pflash) must be a multiple of 0x1000
        [Exit 1 ]
    
    Fix by handling the qemu_find_file() failure.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  10. pc: remove bochs bios debug ports

    kraxel committed Dec 11, 2012
    Prehistoric leftover, zap it.  We poweroff via acpi these days.
    
    And having a port (0x501,0x502) where any random guest write will make
    qemu exit -- with no way to turn it off -- is a bad joke anyway.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  11. hw: Add test device for unittests execution

    lmr committed with kraxel Dec 13, 2012
    Add a test device which supports the kvmctl ioports,
    so one can run the KVM unittest suite.
    
    Intended Usage:
    
    qemu-system-x86_64 -nographic \
        -device pc-testdev \
        -device isa-debug-exit,iobase=0xf4,iosize=0x04 \
        -kernel /path/to/kvm/unittests/msr.flat
    
    Where msr.flat is one of the KVM unittests, present on a
    separate repo,
    
    git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git
    
    [ kraxel: more memory api + qom fixes ]
    
    CC: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
    Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  12. add isa-debug-exit device.

    kraxel committed Dec 12, 2012
    When present it makes qemu exit on any write.
    Mapped to port 0x501 by default.
    
    Without this patch Anthony doesn't allow me to
    remove the bochs bios debug ports because his
    test suite uses this.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  13. switch debugcon to memory api

    kraxel committed Dec 12, 2012
    Also some QOM glue while being at it.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  14. apci: assign memory regions to ich9 lpc device

    kraxel committed Dec 11, 2012
    Get rid of get_system_io() usage.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  15. apci: assign memory regions to piix4 acpi device

    kraxel committed Dec 11, 2012
    Get rid of get_system_io() usage.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  16. acpi: autoload dsdt

    kraxel committed Dec 3, 2012
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  17. configure: also symlink *.aml files

    kraxel committed Dec 3, 2012
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Commits on Jan 3, 2013
  1. pty: unbreak libvirt

    kraxel committed with Anthony Liguori Jan 3, 2013
    Commit 5865021 breaks libvirt pty
    support because it tried to figure the pts name from stderr output.
    
    Fix this by moving the label to the end of the line, this way the
    libvirt parser does still recognise the message.  libvirt looks
    for "char device redirected to ${ptsname}<whitespace>".
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  2. dataplane: use linux-headers/ for virtio includes

    Stefan Hajnoczi committed with Anthony Liguori Jan 3, 2013
    The hw/dataplane/vring.c code includes linux/virtio_ring.h.  Ensure that
    we use linux-headers/ instead of the system-wide headers, which may be
    out-of-date on older distros.
    
    This resolves the following build error on Debian 6:
    
      CC    hw/dataplane/vring.o
    cc1: warnings being treated as errors
    hw/dataplane/vring.c: In function 'vring_enable_notification':
    hw/dataplane/vring.c:71: error: implicit declaration of function 'vring_avail_event'
    hw/dataplane/vring.c:71: error: nested extern declaration of 'vring_avail_event'
    hw/dataplane/vring.c:71: error: lvalue required as left operand of assignment
    
    Note that we now build dataplane/ for each target instead of only once.
    There is no way around this since linux-headers/ is only available for
    per-target objects - and it's how virtio, vfio, kvm, and friends are
    built.
    
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Jan 2, 2013
  1. configure: Write new file "config-all-disas.mak" when running configure

    stweil committed with Anthony Liguori Jan 1, 2013
    Incremental builds added new lines to that file each time when configure
    was run.
    
    Now a new file with a comment line is written.
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  2. tci: Fix broken builds with TCG interpreter

    stweil committed with Anthony Liguori Jan 1, 2013
    TCI no longer compiled after commit 76cad71.
    
    The TCI disassembler depends on data structures which are different for
    each QEMU target, so it cannot be compiled as a universal-obj today.
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  3. savevm.c: cleanup system includes

    Michael Tokarev committed with Anthony Liguori Dec 31, 2012
    savevm.c suffers from the same problem as some other files.
    Some years ago savevm.c was created from vl.c, moving some
    code from there into a separate file.  At that time, all
    includes were just copied from vl.c to savevm.c, without
    checking which ones are needed and which are not.
    
    But actually most of that stuff is _not_ needed.  More, some
    stuff is wrong, for example, *BSD #ifdef'ery around <util.h>
    vs <libutil.h> - for one, it fails to build on Debian/kFreebsd.
    
    Just remove all this.  Maybe there's a possibility to clean
    it up further - like removing <windows.h> (and maybe including
    winsock.h for htons etc), and maybe it's possible to remove
    some internal #includes too, but I didn't check this.
    
    While at it, remove duplicate #include of qemu/timer.h.
    
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  4. disallow -daemonize usage of stdio (curses display, -nographic, -seri…

    Michael Tokarev committed with Anthony Liguori Dec 30, 2012
    …al stdio etc)
    
    Curses display requires stdin/out to stay on the terminal,
    so -daemonize makes no sense in this case.  Instead of
    leaving display uninitialized like is done since 995ee2b,
    explicitly detect this case earlier and error out.
    
    -nographic can actually be used with -daemonize, by redirecting
    everything to a null device, but the problem is that according
    to documentation and historical behavour, -nographic redirects
    guest ports to stdin/out, which, again, makes no sense in case
    of -daemonize.  Since -nographic is a legacy option, don't bother
    fixing this case (to allow -nographic and -daemonize by redirecting
    guest ports to null instead of stdin/out in this case), but disallow
    it completely instead, to stop garbling host terminal.
    
    If no display display needed and user wants to use -nographic,
    the right way to go is to use
      -serial null -parallel null -monitor none -display none -vga none
    instead of -nographic.
    
    Also prevent the same issue -- it was possible to get garbled
    host tty after
    
      -nographic -daemonize
    
    and it is still possible to have it by using
    
      -serial stdio -daemonize
    
    Fix this by disallowing opening stdio chardev when -daemonize
    is specified.
    
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  5. Merge remote-tracking branch 'stefanha/block' into staging

    Anthony Liguori committed Jan 2, 2013
    * stefanha/block:
      sheepdog: pass oid directly to send_pending_req()
      sheepdog: don't update inode when create_and_write fails
      block/raw-win32: Fix compiler warnings (wrong format specifiers)
      qemu-img: report size overflow error message
      cutils: change strtosz_suffix_unit function
      virtio-blk: Return UNSUPP for unknown request types
      virtio-blk: add x-data-plane=on|off performance feature
      dataplane: add virtio-blk data plane code
      virtio-blk: restore VirtIOBlkConf->config_wce flag
      iov: add qemu_iovec_concat_iov()
      test-iov: add iov_discard_front/back() testcases
      iov: add iov_discard_front/back() to remove data
      dataplane: add Linux AIO request queue
      dataplane: add event loop
      dataplane: add virtqueue vring code
      dataplane: add host memory mapping code
      configure: add CONFIG_VIRTIO_BLK_DATA_PLANE
      raw-posix: add raw_get_aio_fd() for virtio-blk-data-plane
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  6. tcg: Remove unneeded assertion

    stweil committed with Anthony Liguori Dec 30, 2012
    Commit 7f6f0ae added two assertions.
    
    One of these assertions is not needed:
    The pointer ts is never NULL because it is initialized with the
    address of an array element.
    
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  7. sheepdog: pass oid directly to send_pending_req()

    liuy committed with Stefan Hajnoczi Dec 17, 2012
    Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
    Cc: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
    Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  8. sheepdog: don't update inode when create_and_write fails

    liuy committed with Stefan Hajnoczi Dec 17, 2012
    For the error case such as SD_RES_NO_SPACE, we shouldn't update the inode bitmap
    to avoid the scenario that the object is allocated but wasn't created at the
    server side. This will result in VM's IO error on the failed object.
    
    Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
    Cc: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
    Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  9. block/raw-win32: Fix compiler warnings (wrong format specifiers)

    stweil committed with Stefan Hajnoczi Dec 17, 2012
    Commit fbcad04 added fprintf statements
    with wrong format specifiers.
    
    GetLastError() returns a DWORD which is unsigned long, so %lu must be used.
    
    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>