Skip to content

Commits

Permalink
stable-2.4-sta…
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Oct 31, 2015

  1. Update version for 2.4.1 release

    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    mdroth committed Oct 31, 2015
    Copy the full SHA
    32d2413 View commit details
    Browse the repository at this point in the history
  2. virtio: sync the dataplane vring state to the virtqueue before virtio…

    …_save
    
    When creating snapshot with the dataplane enabled, the snapshot file gets
    not the actual state of virtqueue, because the current state is stored in
    VirtIOBlockDataPlane. Therefore, before saving snapshot need to sync
    the dataplane vring state to the virtqueue. The dataplane will resume its
    work at the next notify virtqueue.
    
    When snapshot loads with loadvm we get a message:
    VQ 0 size 0x80 Guest index 0x15f5 inconsistent with Host index 0x0:
        delta 0x15f5
    error while loading state for instance 0x0 of device
        '0000:00:08.0/virtio-blk'
    Error -1 while loading VM state
    
    to reproduce the error I used the following hmp commands:
    savevm snap1
    loadvm snap1
    
    qemu parameters:
    --enable-kvm -smp 4 -m 1024 -drive file=/var/lib/libvirt/images/centos6.4.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x8,drive=drive-virtio-disk0,id=virtio-disk0 -set device.virtio-disk0.x-data-plane=on
    
    Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
    Signed-off-by: Denis V. Lunev <den@openvz.org>
    Message-id: 1445859777-2982-1-git-send-email-den@openvz.org
    CC: Stefan Hajnoczi <stefanha@redhat.com>
    CC: "Michael S. Tsirkin" <mst@redhat.com>
    CC: Kevin Wolf <kwolf@redhat.com>
    CC: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    (cherry picked from commit 10a06fd)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    pbutsykin authored and mdroth committed Oct 31, 2015
    Copy the full SHA
    fc63922 View commit details
    Browse the repository at this point in the history
  3. target-xtensa: add window overflow check to L32E/S32E

    Despite L32E and S32E primary use is for window underflow and overflow
    exception handlers they are just normal instructions, and thus need to
    check for window overflow.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
    (cherry picked from commit f822b7e)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    jcmvbkbc authored and mdroth committed Oct 31, 2015
    Copy the full SHA
    36e1eee View commit details
    Browse the repository at this point in the history
  4. net: don't set native endianness

    commit 5be7d9f
        vhost-net: tell tap backend about the vnet endianness
    makes vhost net always try to set LE - even if that matches the
    native endian-ness.
    
    This makes it fail on older kernels on x86 without TUNSETVNETLE support.
    
    To fix, make qemu_set_vnet_le/qemu_set_vnet_be skip the
    ioctl if it matches the host endian-ness.
    
    Reported-by: Marcel Apfelbaum <marcel@redhat.com>
    Cc: Greg Kurz <gkurz@linux.vnet.ibm.com>
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
    (cherry picked from commit 052bd52)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    mstsirkin authored and mdroth committed Oct 31, 2015
    Copy the full SHA
    9137bd2 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2015

  1. device-introspect-test: New, covering device introspection

    The test doesn't check that the output makes any sense, only that QEMU
    survives.  Useful since we've had an astounding number of crash bugs
    around there.
    
    In fact, we have a bunch of them right now: a few devices crash or
    hang, and some leave dangling pointers behind.  The test skips testing
    the broken parts.  The next commits will fix them up, and drop the
    skipping.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Message-Id: <1443689999-12182-8-git-send-email-armbru@redhat.com>
    (cherry picked from commit 2d1abb8)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Markus Armbruster authored and mdroth committed Oct 28, 2015
    Copy the full SHA
    08231cb View commit details
    Browse the repository at this point in the history
  2. libqtest: New hmp() & friends

    New convenience function hmp() to facilitate use of
    human-monitor-command in tests.  Use it to simplify its existing uses.
    
    To blend into existing libqtest code, also add qtest_hmpv() and
    qtest_hmp().  That, and the egregiously verbose GTK-Doc comment format
    make this patch look bigger than it is.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Reviewed-by: Thomas Huth <thuth@redhat.com>
    Message-Id: <1443689999-12182-7-git-send-email-armbru@redhat.com>
    (cherry picked from commit 5fb48d9)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Markus Armbruster authored and mdroth committed Oct 28, 2015
    Copy the full SHA
    70a4483 View commit details
    Browse the repository at this point in the history
  3. tests: Fix how qom-test is run

    We want to run qom-test for every architecture, without having to
    manually add it to every architecture's list of tests.  Commit 3687d53
    accomplished this by adding it to every architecture's list
    automatically.
    
    However, some architectures inherit their tests from others, like this:
    
        check-qtest-x86_64-y = $(check-qtest-i386-y)
        check-qtest-microblazeel-y = $(check-qtest-microblaze-y)
        check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)
    
    For such architectures, we ended up running the (slow!) test twice.
    Commit 2b8419c attempted to avoid this by adding the test only when
    it's not already present.  Works only as long as we consider adding
    the test to the architectures on the left hand side *after* the ones
    on the right hand side: x86_64 after i386, microblazeel after
    microblaze, xtensaeb after xtensa.
    
    Turns out we consider them in $(SYSEMU_TARGET_LIST) order.  Defined as
    
        SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
           $(wildcard $(SRC_PATH)/default-configs/*-softmmu.mak)))
    
    On my machine, this results in the oder xtensa, x86_64, microblazeel,
    microblaze, i386.  Consequently, qom-test runs twice for microblazeel
    and x86_64.
    
    Replace this complex and flawed machinery with a much simpler one: add
    generic tests (currently just qom-test) to check-qtest-generic-y
    instead of check-qtest-$(target)-y for every target, then run
    $(check-qtest-generic-y) for every target.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Reviewed-by: Andreas Färber <afaerber@suse.de>
    Message-Id: <1443689999-12182-5-git-send-email-armbru@redhat.com>
    (cherry picked from commit e253c28)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Markus Armbruster authored and mdroth committed Oct 28, 2015
    Copy the full SHA
    3980985 View commit details
    Browse the repository at this point in the history
  4. macio: move DBDMA_init from instance_init to realize

    DBDMA_init is not idempotent, and calling it from instance_init
    breaks a simple object_new/object_unref pair.  Work around this,
    pending qdev-ification of DBDMA, by moving the call to realize.
    
    Reported-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: Thomas Huth <thuth@redhat.com>
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Message-Id: <1443689999-12182-4-git-send-email-armbru@redhat.com>
    (cherry picked from commit c710440)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    bonzini authored and mdroth committed Oct 28, 2015
    Copy the full SHA
    db97d9d View commit details
    Browse the repository at this point in the history
  5. hw: do not pass NULL to memory_region_init from instance_init

    This causes the region to outlive the object, because it attaches the
    region to /machine.  This is not nice for the "realize" method, but
    much worse for "instance_init" because it can cause dangling pointers
    after a simple object_new/object_unref pair.
    
    Reported-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Tested-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Message-Id: <1443689999-12182-3-git-send-email-armbru@redhat.com>
    Reviewed-by: Thomas Huth <thuth@redhat.com>
    (cherry picked from commit 81e0ab4)
    
    Conflicts:
    	hw/display/cg3.c
    	hw/display/tcx.c
    
    * removed context dependencies on &error_fatal/&error_abort
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    bonzini authored and mdroth committed Oct 28, 2015
    Copy the full SHA
    243b80c View commit details
    Browse the repository at this point in the history
  6. memory: allow destroying a non-empty MemoryRegion

    This is legal; the MemoryRegion will simply unreference all the
    existing subregions and possibly bring them down with it as well.
    However, it requires a bit of care to avoid an infinite loop.
    Finalizing a memory region cannot trigger an address space update,
    but memory_region_del_subregion errs on the side of caution and
    might trigger a spurious update: avoid that by resetting mr->enabled
    first.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Message-Id: <1443689999-12182-2-git-send-email-armbru@redhat.com>
    (cherry picked from commit 2e2b8eb)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    bonzini authored and mdroth committed Oct 28, 2015
    Copy the full SHA
    91232d9 View commit details
    Browse the repository at this point in the history
  7. update-linux-headers: Rename SW_MAX to SW_MAX_

    The next commit will compile hw/input/virtio-input.c and
    hw/input/virtio-input-hid.c even when CONFIG_LINUX is off.  These
    files include both "include/standard-headers/linux/input.h" and
    <windows.h> then.  Doesn't work, because both define SW_MAX.  We don't
    actually use it.  Patch input.h to define SW_MAX_ instead.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Message-Id: <1444320700-26260-2-git-send-email-armbru@redhat.com>
    Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
    (cherry picked from commit ac98fa8)
    
    Conflicts:
    	scripts/update-linux-headers.sh
    
    * remove dependency on eddb4de
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Markus Armbruster authored and mdroth committed Oct 28, 2015
    Copy the full SHA
    d68ba3c View commit details
    Browse the repository at this point in the history
  8. trace: remove malloc tracing

    The malloc vtable is not supported anymore in glib, because it broke
    when constructors called g_malloc.  Remove tracing of g_malloc,
    g_realloc and g_free calls.
    
    Note that, for systemtap users, glib also provides tracepoints
    glib.mem_alloc, glib.mem_free, glib.mem_realloc, glib.slice_alloc
    and glib.slice_free.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: Alberto Garcia <berto@igalia.com>
    Message-id: 1442417924-25831-1-git-send-email-pbonzini@redhat.com
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    (cherry picked from commit 98cf48f)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    bonzini authored and mdroth committed Oct 28, 2015
    Copy the full SHA
    381a290 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2015

  1. virtio-net: correctly drop truncated packets

    When packet is truncated during receiving, we drop the packets but
    neither discard the descriptor nor add and signal used
    descriptor. This will lead several issues:
    
    - sg mappings are leaked
    - rx will be stalled if a lots of packets were truncated
    
    In order to be consistent with vhost, fix by discarding the descriptor
    in this case.
    
    Cc: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    
    (cherry picked from commit 0cf33fb)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    jasowang authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    696317f View commit details
    Browse the repository at this point in the history
  2. virtio: introduce virtqueue_discard()

    This patch introduces virtqueue_discard() to discard a descriptor and
    unmap the sgs. This will be used by the patch that will discard
    descriptor when packet is truncated.
    
    Cc: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    
    (cherry picked from commit 29b9f5e)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    jasowang authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    c2a550d View commit details
    Browse the repository at this point in the history
  3. virtio: introduce virtqueue_unmap_sg()

    Factor out sg unmapping logic. This will be reused by the patch that
    can discard descriptor.
    
    Cc: Michael S. Tsirkin <mst@redhat.com>
    Cc: Andrew James <andrew.james@hpe.com>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    
    (cherry picked from commit ce31746)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    jasowang authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    a64d4ca View commit details
    Browse the repository at this point in the history
  4. virtio-input: ignore events until the guest driver is ready

    Cc: qemu-stable@nongnu.org
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    (cherry picked from commit d9460a7)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    kraxel authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    2f99c80 View commit details
    Browse the repository at this point in the history
  5. Migration: Generate the completed event only when we complete

    The current migration-completed event is generated a bit too early,
    which means that an eager libvirt that's ready to go as soon
    as it sees the event ends up racing with the actual end of migration.
    
    This corresponds to RH bug:
    https://bugzilla.redhat.com/show_bug.cgi?id=1271145
    
    Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
    Reviewed-by: Juan Quintela <quintela@redhat.com>
    Reviewed-by: Amit Shah <amit.shah@redhat.com>
    xSigned-off-by: Juan Quintela <quintela@redhat.com>
    (cherry picked from commit ed1f3e0)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    dagrh authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    f62c10b View commit details
    Browse the repository at this point in the history
  6. util/qemu-config: fix missing machine command line options

    Commit 0a7cf21 ("util/qemu-config: fix regression of
    qmp_query_command_line_options") aimed to restore parsing of global
    machine options, but missed two: "aes-key-wrap" and
    "dea-key-wrap" (which were present in the initial version of that
    patch). Let's add them to the machine_opts again.
    
    Fixes: 0a7cf21 ("util/qemu-config: fix regression of
                      qmp_query_command_line_options")
    CC: Marcel Apfelbaum <marcel@redhat.com>
    CC: qemu-stable@nongnu.org
    Signed-off-by: Tony Krowiak <akrowiak@linux.vnet.ibm.com>
    Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
    Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
    Message-Id: <1444664181-28023-1-git-send-email-akrowiak@linux.vnet.ibm.com>
    Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
    
    (cherry picked from commit 5bcfa0c)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Tony Krowiak authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    8c4fa92 View commit details
    Browse the repository at this point in the history
  7. s390x/kvm: Fix vector validity bit in device machine checks

    Device hotplugs trigger a crw machine check. All machine checks
    have validity bits for certain register types. With vector support
    we also have to claim that vector registers are valid.
    This is a band-aid suitable for stable. Long term we should
    create the full  mcic value dynamically depending on the active
    features in the kernel interrupt handler.
    
    Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
    Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
    (cherry picked from commit 2ab75df)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    borntraeger authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    7c22dcd View commit details
    Browse the repository at this point in the history
  8. misc: zynq_slcr: Fix MMIO writes

    The /4 for offset calculation in MMIO writes was happening twice giving
    wrong write offsets. Fix.
    
    While touching the code, change the if-else to be a short returning if
    and convert the debug message to a GUEST_ERROR, which is more accurate
    for this condition.
    
    Cc: qemu-stable@nongnu.org
    Cc: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
    Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
    (cherry picked from commit c209b05)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    pcrost authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    1651436 View commit details
    Browse the repository at this point in the history
  9. Revert "qdev: Use qdev_get_device_class() for -device <type>,help"

    This reverts commit 31bed55.
    
    The reverted commit changed qdev_device_help() to reject abstract
    devices and devices that have cannot_instantiate_with_device_add_yet
    set, to fix crash bugs like -device x86_64-cpu,help.
    
    Rejecting abstract devices makes sense: they're purely internal, and
    the implementation of the help feature can't cope with them.
    
    Rejecting non-pluggable devices makes less sense: even though you
    can't use them with -device, the help may still be useful elsewhere,
    for instance with -global.  This is a regression: -device FOO,help
    used to help even for FOO that aren't pluggable.
    
    The previous two commits fixed the crash bug at a lower layer, so
    reverting this one is now safe.  Fixes the -device FOO,help
    regression, except for the broken devices marked
    cannot_even_create_with_object_new_yet.  For those, the error message
    is improved.
    
    Example of a device where the regression is fixed:
    
        $ qemu-system-x86_64 -device PIIX4_PM,help
        PIIX4_PM.command_serr_enable=bool (on/off)
        PIIX4_PM.multifunction=bool (on/off)
        PIIX4_PM.rombar=uint32
        PIIX4_PM.romfile=str
        PIIX4_PM.addr=int32 (Slot and optional function number, example: 06.0 or 06)
        PIIX4_PM.memory-hotplug-support=bool
        PIIX4_PM.acpi-pci-hotplug-with-bridge-support=bool
        PIIX4_PM.s4_val=uint8
        PIIX4_PM.disable_s4=uint8
        PIIX4_PM.disable_s3=uint8
        PIIX4_PM.smb_io_base=uint32
    
    Example of a device where it isn't fixed:
    
        $ qemu-system-x86_64 -device host-x86_64-cpu,help
        Can't list properties of device 'host-x86_64-cpu'
    
    Both failed with "Parameter 'driver' expects pluggable device type"
    before.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
    Message-Id: <1443689999-12182-11-git-send-email-armbru@redhat.com>
    (cherry picked from commit 33fe968)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Markus Armbruster authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    55b4efb View commit details
    Browse the repository at this point in the history
  10. qdev: Protect device-list-properties against broken devices

    Several devices don't survive object_unref(object_new(T)): they crash
    or hang during cleanup, or they leave dangling pointers behind.
    
    This breaks at least device-list-properties, because
    qmp_device_list_properties() needs to create a device to find its
    properties.  Broken in commit f4eb32b "qmp: show QOM properties in
    device-list-properties", v2.1.  Example reproducer:
    
        $ qemu-system-aarch64 -nodefaults -display none -machine none -S -qmp stdio
        {"QMP": {"version": {"qemu": {"micro": 50, "minor": 4, "major": 2}, "package": ""}, "capabilities": []}}
        { "execute": "qmp_capabilities" }
        {"return": {}}
        { "execute": "device-list-properties", "arguments": { "typename": "pxa2xx-pcmcia" } }
        qemu-system-aarch64: /home/armbru/work/qemu/memory.c:1307: memory_region_finalize: Assertion `((&mr->subregions)->tqh_first == ((void *)0))' failed.
        Aborted (core dumped)
        [Exit 134 (SIGABRT)]
    
    Unfortunately, I can't fix the problems in these devices right now.
    Instead, add DeviceClass member cannot_destroy_with_object_finalize_yet
    to mark them:
    
    * Hang during cleanup (didn't debug, so I can't say why):
      "realview_pci", "versatile_pci".
    
    * Dangling pointer in cpus: most CPUs, plus "allwinner-a10", "digic",
      "fsl,imx25", "fsl,imx31", "xlnx,zynqmp", because they create such
      CPUs
    
    * Assert kvm_enabled(): "host-x86_64-cpu", host-i386-cpu",
      "host-powerpc64-cpu", "host-embedded-powerpc-cpu",
      "host-powerpc-cpu" (the powerpc ones can't currently reach the
      assertion, because the CPUs are only registered when KVM is enabled,
      but the assertion is arguably in the wrong place all the same)
    
    Make qmp_device_list_properties() fail cleanly when the device is so
    marked.  This improves device-list-properties from "crashes, hangs or
    leaves dangling pointers behind" to "fails".  Not a complete fix, just
    a better-than-nothing work-around.  In the above reproducer,
    device-list-properties now fails with "Can't list properties of device
    'pxa2xx-pcmcia'".
    
    This also protects -device FOO,help, which uses the same machinery
    since commit ef52358 "qdev-monitor: include QOM properties in -device
    FOO, help output", v2.2.  Example reproducer:
    
        $ qemu-system-aarch64 -machine none -device pxa2xx-pcmcia,help
    
    Before:
    
        qemu-system-aarch64: .../memory.c:1307: memory_region_finalize: Assertion `((&mr->subregions)->tqh_first == ((void *)0))' failed.
    
    After:
    
        Can't list properties of device 'pxa2xx-pcmcia'
    
    Cc: "Andreas Färber" <afaerber@suse.de>
    Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
    Cc: Alexander Graf <agraf@suse.de>
    Cc: Anthony Green <green@moxielogic.com>
    Cc: Aurelien Jarno <aurelien@aurel32.net>
    Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
    Cc: Blue Swirl <blauwirbel@gmail.com>
    Cc: Eduardo Habkost <ehabkost@redhat.com>
    Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
    Cc: Jia Liu <proljc@gmail.com>
    Cc: Leon Alrae <leon.alrae@imgtec.com>
    Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
    Cc: Max Filippov <jcmvbkbc@gmail.com>
    Cc: Michael Walle <michael@walle.cc>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Peter Maydell <peter.maydell@linaro.org>
    Cc: Richard Henderson <rth@twiddle.net>
    Cc: qemu-ppc@nongnu.org
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
    Message-Id: <1443689999-12182-10-git-send-email-armbru@redhat.com>
    (cherry picked from commit 4c315c2)
    
    Conflicts:
    	hw/arm/fsl-imx25.c
    	hw/arm/fsl-imx31.c
    	target-tilegx/cpu.c
    	tests/device-introspect-test.c
    
    * removed hunks pertaining to devices/tests not in 2.4
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Markus Armbruster authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    2874c65 View commit details
    Browse the repository at this point in the history
  11. qmp: Fix device-list-properties not to crash for abstract device

    Broken in commit f4eb32b "qmp: show QOM properties in
    device-list-properties", v2.1.
    
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Reviewed-by: Andreas Färber <afaerber@suse.de>
    Message-Id: <1443689999-12182-9-git-send-email-armbru@redhat.com>
    (cherry picked from commit edb1523)
    
    Conflicts:
    	tests/device-introspect-test.c
    
    * removed hunk specific to QAPI introspection (not in 2.4)
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Markus Armbruster authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    2d0583f View commit details
    Browse the repository at this point in the history
  12. vmxnet3: Drop net_vmxnet3_info.can_receive

    Commit 6e99c63 ("net/socket: Drop net_socket_can_send") changed the
    semantics around .can_receive for sockets to now require the device to
    flush queued pkts when transitioning to a .can_receive=true state. But
    it's OK to drop incoming packets when the link is not active.
    
    Signed-off-by: Fam Zheng <famz@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    (cherry picked from commit 2734a20)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Fam Zheng authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    40161bf View commit details
    Browse the repository at this point in the history
  13. virtio-net: unbreak self announcement and guest offloads after migration

    After commit 019a3ed ("virtio: make
    features 64bit wide"). Device's guest_features was actually set after
    vdc->load(). This breaks the assumption that device specific load()
    function can check guest_features. For virtio-net, self announcement
    and guest offloads won't work after migration.
    
    Fixing this by defer them to virtio_net_load() where guest_features
    were guaranteed to be set. Other virtio devices looks fine.
    
    Fixes: 019a3ed
           ("virtio: make features 64bit wide")
    Cc: qemu-stable@nongnu.org
    Cc: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
    
    (cherry picked from commit 1f8828e)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    jasowang authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    2935ae9 View commit details
    Browse the repository at this point in the history
  14. virtio: avoid leading underscores for helpers

    Commit ef546f1 ("virtio: add
    feature checking helpers") introduced a helper __virtio_has_feature.
    We don't want to use reserved identifiers, though, so let's
    rename __virtio_has_feature to virtio_has_feature and virtio_has_feature
    to virtio_vdev_has_feature.
    
    Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
    Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    
    (cherry picked from commit 95129d6)
    * prereq for 1f8828e
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    cohuck authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    2f3c310 View commit details
    Browse the repository at this point in the history
  15. target-ppc: fix xscmpodp and xscmpudp decoding

    The xscmpodp and xscmpudp instructions only have the AX, BX bits in
    there encoding, the lowest bit (usually TX) is marked as an invalid
    bit. We therefore can't decode them with GEN_XX2FORM, which decodes
    the two lowest bit.
    
    Introduce a new form GEN_XX2FORM, which decodes AX and BX and mark
    the lowest bit as invalid.
    
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    Tested-by: Richard W.M. Jones <rjones@redhat.com>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    (cherry picked from commit 8f60f8e)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    aurel32 authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    1f21d3b View commit details
    Browse the repository at this point in the history
  16. target-ppc: fix vcipher, vcipherlast, vncipherlast and vpermxor

    For vector instructions, the helpers get pointers to the vector register
    in arguments. Some operands might point to the same register, including
    the operand holding the result.
    
    When emulating instructions which access the vector elements in a
    non-linear way, we need to store the result in an temporary variable.
    
    This fixes openssl when emulating a POWER8 CPU.
    
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    (cherry picked from commit 65cf1f6)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    aurel32 authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    bac9ce9 View commit details
    Browse the repository at this point in the history
  17. tcg/mips: Fix clobbering of qemu_ld inputs

    The MIPS TCG backend implements qemu_ld with 64-bit targets using the v0
    register (base) as a temporary to load the upper half of the QEMU TLB
    comparator (see line 5 below), however this happens before the input
    address is used (line 8 to mask off the low bits for the TLB
    comparison, and line 12 to add the host-guest offset). If the input
    address (addrl) also happens to have been placed in v0 (as in the second
    column below), it gets clobbered before it is used.
    
         addrl in t2              addrl in v0
    
     1 srl     a0,t2,0x7        srl     a0,v0,0x7
     2 andi    a0,a0,0x1fe0     andi    a0,a0,0x1fe0
     3 addu    a0,a0,s0         addu    a0,a0,s0
     4 lw      at,9136(a0)      lw      at,9136(a0)      set TCG_TMP0 (at)
     5 lw      v0,9140(a0)      lw      v0,9140(a0)      set base (v0)
     6 li      t9,-4093         li      t9,-4093
     7 lw      a0,9160(a0)      lw      a0,9160(a0)      set addend (a0)
     8 and     t9,t9,t2         and     t9,t9,v0         use addrl
     9 bne     at,t9,0x836d8c8  bne     at,t9,0x836d838  use TCG_TMP0
    10  nop                      nop
    11 bne     v0,t8,0x836d8c8  bne     v0,a1,0x836d838  use base
    12  addu   v0,a0,t2          addu   v0,a0,v0         use addrl, addend
    13 lw      t0,0(v0)         lw      t0,0(v0)
    
    Fix by using TCG_TMP0 (at) as the temporary instead of v0 (base),
    pushing the load on line 5 forward into the delay slot of the low
    comparison (line 10). The early load of the addend on line 7 also needs
    pushing even further for 64-bit targets, or it will clobber a0 before
    we're done with it. The output for 32-bit targets is unaffected.
    
     srl     a0,v0,0x7
     andi    a0,a0,0x1fe0
     addu    a0,a0,s0
     lw      at,9136(a0)
    -lw      v0,9140(a0)      load high comparator
     li      t9,-4093
    -lw      a0,9160(a0)      load addend
     and     t9,t9,v0
     bne     at,t9,0x836d838
    - nop
    + lw     at,9140(a0)      load high comparator
    +lw      a0,9160(a0)      load addend
    -bne     v0,a1,0x836d838
    +bne     at,a1,0x836d838
      addu   v0,a0,v0
     lw      t0,0(v0)
    
    Cc: qemu-stable@nongnu.org
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
    Signed-off-by: James Hogan <james.hogan@imgtec.com>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    (cherry picked from commit 5eb4f64)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    James Hogan authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    33fca85 View commit details
    Browse the repository at this point in the history
  18. qom: Fix invalid error check in property_get_str()

    When a function returns a null pointer on error and only on error, you
    can do
    
        if (!foo(foos, errp)) {
            ... handle error ...
        }
    
    instead of the more cumbersome
    
        Error *err = NULL;
    
        if (!foo(foos, &err)) {
            error_propagate(errp, err);
            ... handle error ...
        }
    
    A StringProperty's getter, however, may return null on success!  We
    then fail to call visit_type_str().
    
    Screwed up in 6a146eb, v1.1.
    
    Fails tests/qom-test in my current, heavily hacked QAPI branch.  No
    reproducer for master known (but I didn't look hard).
    
    Cc: Anthony Liguori <anthony@codemonkey.ws>
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    (cherry picked from commit e1c8237)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Markus Armbruster authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    a479b21 View commit details
    Browse the repository at this point in the history
  19. qom: Do not reuse errp after a possible error

    The argument for an Error **errp parameter must point to a null
    pointer.  If it doesn't, and an error happens, error_set() fails its
    assertion.
    
    Instead of
    
        foo(foos, errp);
        bar(bars, errp);
    
    you need to do something like
    
        Error *err = NULL;
    
        foo(foos, &err);
        if (err) {
            error_propagate(errp, err);
            goto out;
        }
    
        bar(bars, errp);
    out:
    
    Screwed up in commit 0e55884 (v1.3.0): property_get_bool().
    
    Screwed up in commit 1f21772 (v2.1.0): object_property_get_enum() and
    object_property_get_uint16List().
    
    Screwed up in commit a8e3fbe (v2.4.0): property_get_enum(),
    property_set_enum().
    
    Found by inspection, no actual crashes observed.
    
    Fix them up.
    
    Cc: Anthony Liguori <anthony@codemonkey.ws>
    Cc: Hu Tao <hutao@cn.fujitsu.com>
    Cc: Daniel P. Berrange <berrange@redhat.com>
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
    Cc: qemu-stable@nongnu.org
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    (cherry picked from commit 4715d42)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Markus Armbruster authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    d11ff15 View commit details
    Browse the repository at this point in the history
  20. ide: unify io_buffer_offset increments

    IDEState's io_buffer_offset was originally added to keep track of offsets
    in AHCI rather exclusively, but it was added to IDEState instead of an
    AHCI-specific structure.
    
    AHCI fakes all PIO transfers using DMA and a scatter-gather list. When
    the core or atapi layers invoke HBA-specific mechanisms for transfers,
    they do not always know that it is being backed by DMA or a sglist, so
    this offset is not always updated by the HBA code everywhere.
    
    If we modify it in dma_buf_commit, however, any HBA that needs to use
    this offset to manage operating on only part of a sglist will have
    access to it.
    
    This will fix ATAPI PIO transfers performed through the AHCI HBA,
    which were previously not modifying this value appropriately.
    
    This will fix ATAPI PIO transfers larger than one sector.
    
    Reported-by: Hannes Reinecke <hare@suse.de>
    Signed-off-by: John Snow <jsnow@redhat.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Tested-by: Laszlo Ersek <lersek@redhat.com>
    Message-id: 1440546331-29087-2-git-send-email-jsnow@redhat.com
    CC: qemu-stable@nongnu.org
    (cherry picked from commit aaeda4a)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    jnsnow authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    1b8e1f7 View commit details
    Browse the repository at this point in the history
  21. slirp: Fix non blocking connect for w32

    Signed-off-by: Stefan Weil <sw@weilnetz.de>
    (cherry picked from commit a246a01)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    stweil authored and mdroth committed Oct 21, 2015
    1
    Copy the full SHA
    e00bf9e View commit details
    Browse the repository at this point in the history
  22. nbd: release exp->blk after all clients are closed

    If the socket fd is shutdown, there may be some data which is received before
    shutdown. We will read the data and do read/write in nbd_trip(). But the exp's
    blk is NULL, and it will cause qemu crashed.
    
    Reported-by: Li Zhijian <lizhijian@cn.fujitsu.com>
    Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
    Message-Id: <55F929E2.1020501@cn.fujitsu.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    (cherry picked from commit d626834)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    wencongyang authored and mdroth committed Oct 21, 2015
    Copy the full SHA
    78aeb69 View commit details
    Browse the repository at this point in the history
  23. spapr_pci: fix device tree props for MSI/MSI-X

    PAPR requires ibm,req#msi and ibm,req#msi-x to be present in the
    device node to define the number of msi/msi-x interrupts the device
    supports, respectively.
    
    Currently we have ibm,req#msi-x hardcoded to a non-sensical constant
    that happens to be 2, and are missing ibm,req#msi entirely. The result
    of that is that msi-x capable devices get limited to 2 msi-x
    interrupts (which can impact performance), and msi-only devices likely
    wouldn't work at all. Additionally, if devices expect a minimum that
    exceeds 2, the guest driver may fail to load entirely.
    
    SLOF still owns the generation of these properties at boot-time
    (although other device properties have since been offloaded to QEMU),
    but for hotplugged devices we rely on the values generated by QEMU
    and thus hit the limitations above.
    
    Fix this by generating these properties in QEMU as expected by guests.
    
    In the future it may make sense to modify SLOF to pass through these
    values directly as we do with other props since we're duplicating SLOF
    code.
    
    Cc: qemu-ppc@nongnu.org
    Cc: qemu-stable@nongnu.org
    Cc: David Gibson <david@gibson.dropbear.id.au>
    Cc: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
    (cherry picked from commit a8ad731)
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    mdroth committed Oct 21, 2015
    Copy the full SHA
    6d62d0e View commit details
    Browse the repository at this point in the history
Older