Permalink
Switch branches/tags
Commits on Feb 1, 2013
  1. xen: fix build problem introduced from per-queue peers

    Reported-by Andreas Färber <afaerber@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Anthony Liguori committed Feb 1, 2013
  2. virtio-net: compat multiqueue support

    Disable multiqueue support for pre 1.4.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  3. virtio-net: migration support for multiqueue

    This patch add migration support for multiqueue virtio-net. Instead of bumping
    the version, we conditionally send the info of multiqueue only when the device
    support more than one queue to maintain the backward compatibility.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  4. virtio-net: multiqueue support

    This patch implements both userspace and vhost support for multiple queue
    virtio-net (VIRTIO_NET_F_MQ). This is done by introducing an array of
    VirtIONetQueue to VirtIONet.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  5. virtio-net: separate virtqueue from VirtIONet

    To support multiqueue virtio-net, the first step is to separate the virtqueue
    related fields from VirtIONet to a new structure VirtIONetQueue. The following
    patches will add an array of VirtIONetQueue to VirtIONet based on this patch.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  6. virtio: add a queue_index to VirtQueue

    Add a queue_index to VirtQueue and a helper to fetch it, this could be used by
    multiqueue supported device.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  7. virtio: introduce virtio_del_queue()

    Some device (such as virtio-net) needs the ability to destroy or re-order the
    virtqueues, this patch adds a helper to do this.
    
    Signed-off-by: Jason Wang <jasowang>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  8. vhost: multiqueue support

    This patch lets vhost support multiqueue. The idea is simple, just launching
    multiple threads of vhost and let each of vhost thread processing a subset of
    the virtqueues of the device. After this change each emulated device can have
    multiple vhost threads as its backend.
    
    To do this, a virtqueue index were introduced to record to first virtqueue that
    will be handled by this vhost_net device. Based on this and nvqs, vhost could
    calculate its relative index to setup vhost_net device.
    
    Since we may have many vhost/net devices for a virtio-net device. The setting of
    guest notifiers were moved out of the starting/stopping of a specific vhost
    thread. The vhost_net_{start|stop}() were renamed to
    vhost_net_{start|stop}_one(), and a new vhost_net_{start|stop}() were introduced
    to configure the guest notifiers and start/stop all vhost/vhost_net devices.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  9. tap: multiqueue support

    Recently, linux support multiqueue tap which could let userspace call TUNSETIFF
    for a signle device many times to create multiple file descriptors as
    independent queues. User could also enable/disabe a specific queue through
    TUNSETQUEUE.
    
    The patch adds the generic infrastructure to create multiqueue taps. To achieve
    this a new parameter "queues" were introduced to specify how many queues were
    expected to be created for tap by qemu itself. Alternatively, management could
    also pass multiple pre-created tap file descriptors separated with ':' through a
    new parameter fds like -netdev tap,id=hn0,fds="X:Y:..:Z". Multiple vhost file
    descriptors could also be passed in this way.
    
    Each TAPState were still associated to a tap fd, which mean multiple TAPStates
    were created when user needs multiqueue taps. Since each TAPState contains one
    NetClientState, with the multiqueue nic support, an N peers of NetClientState
    were built up.
    
    A new parameter, mq_required were introduce in tap_open() to create multiqueue
    tap fds.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  10. tap: introduce a helper to get the name of an interface

    This patch introduces a helper tap_get_ifname() to get the device name of tap
    device. This is needed when ifname is unspecified in the command line and qemu
    were asked to create tap device by itself. In this situation, the name were
    allocated by kernel, so if multiqueue is asked, we need to fetch its name after
    creating the first queue.
    
    Only linux has this support since it's the only platform that supports
    multiqueue tap.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  11. tap: support enabling or disabling a queue

    This patch introduce a new bit - enabled in TAPState which tracks whether a
    specific queue/fd is enabled. The tap/fd is enabled during initialization and
    could be enabled/disabled by tap_enalbe() and tap_disable() which calls platform
    specific helpers to do the real work. Polling of a tap fd can only done when
    the tap was enabled.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  12. tap: add Linux multiqueue support

    This patch add basic multiqueue support for Linux. When multiqueue is needed, we
    will first check whether kernel support multiqueue tap before creating more
    queues. Two new functions tap_fd_enable() and tap_fd_disable() were introduced
    to enable and disable a specific queue. Since the multiqueue is only supported
    in Linux, return error on other platforms.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  13. tap: factor out common tap initialization

    This patch factors out the common initialization of tap into a new helper
    net_init_tap_one(). This will be used by multiqueue tap patches.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  14. tap: import linux multiqueue constants

    Import multiqueue constants from if_tun.h from 3.8-rc3. A new ifr flag
    IFF_MULTI_QUEUE were introduced to create a multiqueue backend by calling
    TUNSETIFF with the this flag and with the same interface name many times.
    
    A new ioctl TUNSETQUEUE were introduced. When doing this ioctl with
    IFF_DETACH_QUEUE, the queue were disabled in the linux kernel. When doing this
    ioctl with IFF_ATTACH_QUEUE, the queue were enabled in the linux kernel.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  15. net: multiqueue support

    This patch adds basic multiqueue support for qemu. The idea is simple, an array
    of NetClientStates were introduced in NICState, parse_netdev() were extended to
    find and match all NetClientStates belongs to the backend and place their
    pointers in NICConf. Then qemu_new_nic can setup a N:N mapping between NICStates
    that belongs to a nic and NICStates belongs to the netdev. And a queue_index
    were introduced in NetClientState to track its index. After this, each peers of
    a NICState were abstracted as a queue.
    
    After this change, all NetClientState that belongs to the same backend/nic has
    the same id. When use want to change the link status, all NetClientStates that
    belongs to the same backend/nic will be also changed. When user want to delete
    a device or netdev, all NetClientStates that belongs to the same backend/nic
    will be deleted also. Changing or deleting an specific queue is not allowed.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  16. net: introduce NetClientState destructor

    To allow allocating an array of NetClientState and free it once, this patch
    introduces destructor of NetClientState. Which could do type specific free,
    which could be used by multiqueue to free the array once.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  17. net: introduce qemu_net_client_setup()

    This patch separates the setup of NetClientState from its allocation, this will
    allow allocating an arrays of NetClientState and does the initialization one by
    one which is what multiqueue needs.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  18. net: introduce qemu_find_net_clients_except()

    In multiqueue, all NetClientState that belongs to the same netdev or nic has the
    same id. So this patches introduces an helper qemu_find_net_clients_except()
    which finds all NetClientState with the same id. This will be used by multiqueue
    networking.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  19. net: intorduce qemu_del_nic()

    To support multiqueue nic, this patch separate the nic destructor from
    qemu_del_net_client() to a new helper qemu_del_nic() since the mapping bettween
    NiCState and NetClientState were not 1:1 in multiqueue. The following patches
    would refactor this function to support multiqueue nic.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  20. net: introduce qemu_get_nic()

    To support multiqueue, this patch introduces a helper qemu_get_nic() to get
    NICState from a NetClientState. The following patches would refactor this helper
    to support multiqueue.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  21. net: introduce qemu_get_queue()

    To support multiqueue, the patch introduce a helper qemu_get_queue()
    which is used to get the NetClientState of a device. The following patches would
    refactor this helper to support multiqueue.
    
    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  22. net: tap: use abort() instead of assert(0)

    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  23. net: tap: using bool instead of bitfield

    Signed-off-by: Jason Wang <jasowang@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    jasowang committed with Anthony Liguori Jan 30, 2013
  24. target-ppc: Fix target_ulong vs. hwaddr format mismatches

    Since HWADDR_PRIx is always the same now, use %016 for TARGET_PPC64 and
    %08 for common code. This may slightly change the ppc64 debug output.
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    committed with Anthony Liguori Jan 31, 2013
  25. libqtest: Wait for the right child PID after killing QEMU

    When running "make check" with gcov enabled, we get the following
    message:
    
       hw/tmp105.gcda:cannot open data file, assuming not executed
    
    The problem happens because:
    
     * tmp105-test exits before QEMU exits, because waitpid() at
       qtest_quit() fails;
     * waitpid() fails because there's another process already
       waiting for the QEMU process;
     * The process that is already waiting for QEMU is the child created by
       qtest_init() to run system();
     * qtest_quit() is incorrectly waiting for the QEMU PID directly instead
       of the child created by qtest_init().
    
    This fixes the problem by sending SIGTERM to QEMU, but waiting for the
    child process created by qtest_init() (that exits immediately after QEMU
    exits).
    
    Reported-by: Andreas Färber <afaerber@suse.de>
    Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    ehabkost committed with Anthony Liguori Jan 28, 2013
  26. isa: QOM'ify isa_bus_from_device()

    DeviceState::parent_bus is document as private and should be accessed
    through qdev_get_parent_bus(). Use a DEVICE() cast instead of accessing
    ISADevice's qdev field directly. Use ISA_BUS() in place of DO_UPCAST().
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    committed with Anthony Liguori Jan 20, 2013
  27. i2c: Drop I2C_SLAVE_FROM_QDEV() macro

    It is not being used in hot paths and is obsoleted by I2C_SLAVE()
    QOM cast macro. Clean it up using a scripted conversion, so that it
    doesn't get used in new code.
    
    Some of its callers were combining it with FROM_I2C_SLAVE() macro, which
    is equally obsolete but needs to be replaced in a type-specific way.
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    Cc: Kuo-Jung Su <dantesu@faraday-tech.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    committed with Anthony Liguori Jan 25, 2013
  28. configure: Keep -Werror enabled for Release Candidates

    The automatic drop of -Werror during the RC phases has in the past led
    to warnings creeping into submaintainer trees.
    
    Last QEMU Summit it was concluded that -Werror should stay on and
    enabled only as part of the release process.
    
    To relieve our release manager, instead of always enabling -Werror or
    doing some number magic, let's enable it depending on whether a .git/
    directory exists in the source tree.
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    committed with Anthony Liguori Jan 27, 2013
  29. Revert "e1000: no need auto-negotiation if link was down"

    This reverts commit 84dd212.
    
    I'm not sure what issue the original commit was meant to fix, or if
    the logic is actually wrong, but it causes e1000 to stop working
    after a guest issues a reset.
    
    >From what I can tell a guest with an e1000 nic has no way of changing
    the link status, as far as it's NetClient peer is concerned, except
    in the auto-negotiation path, so with this patch in place there's no
    recovery after a reset, since the link goes down and stays that way.
    
    Revert this patch now to fix the bigger problem, and handle any
    lingering issues with a follow-up.
    
    Reproduced/tested with qemu-jeos and Ubuntu 12.10.
    
    Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    mdroth committed with Anthony Liguori Jan 31, 2013
  30. Merge remote-tracking branch 'quintela/migration.next' into staging

    # By Orit Wasserman
    # Via Juan Quintela
    * quintela/migration.next:
      Fix error message in migrate_set_capability HMP command
      Allow XBZRLE decoding without enabling the capability
      Fix example for query-migrate-capabilities
      Add XBZRLE testing
      Move XBZRLE encoding code to a separate file to allow testing
    Anthony Liguori committed Feb 1, 2013
  31. Merge remote-tracking branch 'agraf/s390-for-upstream' into staging

    # By Andreas Färber
    # Via Alexander Graf
    * agraf/s390-for-upstream:
      target-s390x: Pass S390CPU to s390_{add, del}_running_cpu()
      target-s390x: Clean up cpu_inject_*() signatures
      target-s390x: Fix debug output
      target-s390x: Fix debug output (continued)
    Anthony Liguori committed Feb 1, 2013
  32. Merge remote-tracking branch 'agraf/ppc-for-upstream' into staging

    # By Andreas Färber (2) and Alexander Graf (1)
    # Via Alexander Graf
    * agraf/ppc-for-upstream:
      target-ppc: Fix build for PPC_DEBUG_DISAS
      target-ppc: Fix unused variable warning for FLUSH_ALL_TLBS
      PPC: Unify dcbzl code path
    Anthony Liguori committed Feb 1, 2013
  33. Fix error message in migrate_set_capability HMP command

    Signed-off-by: Orit Wasserman <owasserm@redhat.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    
    Signed-off-by: Juan Quintela <quintela@redhat.com>
    oritwas committed with juanquintela Jan 31, 2013
  34. Allow XBZRLE decoding without enabling the capability

    Before this fix we couldn't load a guest from
    XBZRLE compressed file.
    
    For example:
    The user activated the XBZRLE capability
    The user run migrate -d "exec:gzip -c > vm.gz"
    The user won't be able to load vm.gz and get an error.
    
    Signed-off-by: Orit Wasserman <owasserm@redhat.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    
    Signed-off-by: Juan Quintela <quintela@redhat.com>
    oritwas committed with juanquintela Jan 31, 2013
  35. Fix example for query-migrate-capabilities

    Signed-off-by: Orit Wasserman <owasserm@redhat.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>
    
    Signed-off-by: Juan Quintela <quintela@redhat.com>
    oritwas committed with juanquintela Jan 31, 2013