Skip to content
Snippets Groups Projects
  1. May 30, 2017
    • Stefan Hajnoczi's avatar
      Merge remote-tracking branch 'armbru/tags/pull-qapi-2017-05-23' into staging · d0eda029
      Stefan Hajnoczi authored
      
      QAPI patches for 2017-05-23
      
      # gpg: Signature made Tue 23 May 2017 12:33:32 PM BST
      # gpg:                using RSA key 0x3870B400EB918653
      # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
      # gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
      # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
      
      * armbru/tags/pull-qapi-2017-05-23:
        qapi-schema: Remove obsolete note from ObjectTypeInfo
        block: Use QDict helpers for --force-share
        shutdown: Expose bool cause in SHUTDOWN and RESET events
        shutdown: Add source information to SHUTDOWN and RESET
        shutdown: Preserve shutdown cause through replay
        shutdown: Prepare for use of an enum in reset/shutdown_request
        shutdown: Simplify shutdown_signal
        sockets: Plug memory leak in socket_address_flatten()
        scripts/qmp/qom-set: fix the value argument passed to srv.command()
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      d0eda029
    • Stefan Hajnoczi's avatar
      Merge remote-tracking branch 'ehabkost/tags/numa-pull-request' into staging · 62e570b1
      Stefan Hajnoczi authored
      
      Silence "make check" warnings on NUMA test
      
      # gpg: Signature made Tue 23 May 2017 11:44:24 AM BST
      # gpg:                using RSA key 0x2807936F984DC5A6
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
      # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6
      
      * ehabkost/tags/numa-pull-request:
        numa: Silence incomplete mapping warning under qtest
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      62e570b1
  2. May 24, 2017
    • Stefan Hajnoczi's avatar
      Merge remote-tracking branch 'cohuck/tags/s390x-20170523' into staging · e1fe27a2
      Stefan Hajnoczi authored
      
      s390x updates:
      - support for vfio-ccw to passthrough channel devices
      - allow ccw bios to boot from scsi generic devices
      - bugfix for initial reset
      
      # gpg: Signature made Tue 23 May 2017 12:02:24 PM BST
      # gpg:                using RSA key 0xDECF6B93C6F02FAF
      # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>"
      # gpg:                 aka "Cornelia Huck <cohuck@kernel.org>"
      # gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
      # gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>"
      # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF
      
      * cohuck/tags/s390x-20170523: (21 commits)
        s390/kvm: do not reset riccb on initial cpu reset
        MAINTAINERS: Add vfio-ccw maintainer
        vfio/ccw: update sense data if a unit check is pending
        s390x/css: ccw translation infrastructure
        s390x/css: introduce and realize ccw-request callback
        vfio/ccw: get irqs info and set the eventfd fd
        vfio/ccw: get io region info
        vfio/ccw: vfio based subchannel passthrough driver
        s390x/css: device support for s390-ccw passthrough
        s390x/css: realize css_create_sch
        s390x/css: realize css_sch_build_schib
        s390x/css: add s390-squash-mcss machine option
        linux-headers: update
        pc-bios/s390-ccw.img: rebuild image
        pc-bios/s390-ccw: Build a reasonable max_sectors limit
        pc-bios/s390-ccw: Get Block Limits VPD device data
        pc-bios/s390-ccw: Get list of supported VPD pages
        pc-bios/s390-ccw: Refactor scsi_inquiry function
        pc-bios/s390-ccw: Break up virtio-scsi read into multiples
        pc-bios/s390-ccw: Move SCSI block factor to outer read
        ...
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      e1fe27a2
  3. May 23, 2017
    • Stefan Hajnoczi's avatar
      Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging · 9964e96d
      Stefan Hajnoczi authored
      
      # gpg: Signature made Tue 23 May 2017 03:27:37 AM BST
      # gpg:                using RSA key 0xEF04965B398D6211
      # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
      # Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211
      
      * jasowang/tags/net-pull-request:
        e1000e: Fix ICR "Other" causes clear logic
        net/filter-rewriter: Remove unused option in filter-rewriter
        net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle
        net/filter-mirror.c: Remove duplicate check code.
        hmp / net: Mark host_net_add/remove as deprecated
        COLO-compare: Improve tcp compare trace event readability
        virtio-net: fix wild pointer when remove virtio-net queues
        net/dump: Issue a warning for the deprecated "-net dump"
        net/tap: Replace tap-haiku.c and tap-aix.c by a generic tap-stub.c
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      9964e96d
    • Eduardo Habkost's avatar
      qapi-schema: Remove obsolete note from ObjectTypeInfo · 8c1bc1e9
      Eduardo Habkost authored
      
      The "This command is experimental" note in ObjectTypeInfo is obsolete
      since 2012.  Commit 51920820 removed the
      warning from the qom-list-types command documentation, but we forgot to
      remove the warning from ObjectTypeInfo.
      
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170516205351.12101-1-ehabkost@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      8c1bc1e9
    • Eric Blake's avatar
      block: Use QDict helpers for --force-share · 579cf1d1
      Eric Blake authored
      
      Fam's addition of --force-share in commits 459571f7 and 335e9937
      were developed prior to the addition of QDict scalar insertion
      macros, but merged after the general cleanup in commit 46f5ac20.
      Patch created mechanically by rerunning:
      
       spatch --sp-file scripts/coccinelle/qobject.cocci \
              --macro-file scripts/cocci-macro-file.h --dir . --in-place
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20170515195439.17677-1-eblake@redhat.com>
      Reviewed-by: default avatarFam Zheng <famz@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      579cf1d1
    • Eric Blake's avatar
      shutdown: Expose bool cause in SHUTDOWN and RESET events · 08fba7ac
      Eric Blake authored
      Libvirt would like to be able to distinguish between a SHUTDOWN
      event triggered solely by guest request and one triggered by a
      SIGTERM or other action on the host.  While qemu_kill_report() was
      already able to give different output to stderr based on whether a
      shutdown was triggered by a host signal (but NOT by a host UI event,
      such as clicking the X on the window), that information was then
      lost to management.  The previous patches improved things to use an
      enum throughout all callsites, so now we have something ready to
      expose through QMP.
      
      Note that for now, the decision was to expose ONLY a boolean,
      rather than promoting ShutdownCause to a QAPI enum; this is because
      libvirt has not expressed an interest in anything finer-grained.
      We can still add additional details, in a backwards-compatible
      manner, if a need later arises (if the addition happens before 2.10,
      we can replace the bool with an enum; otherwise, the enum will have
      to be in addition to the bool); this patch merely adds a helper
      shutdown_caused_by_guest() to map the internal enum into the
      external boolean.
      
      Update expected iotest outputs to match the new data (complete
      coverage of the affected tests is obtained by -raw, -qcow2, and -nbd).
      
      Here is output from 'virsh qemu-monitor-event --loop' with the
      patch installed:
      
      event SHUTDOWN at 1492639680.731251 for domain fedora_13: {"guest":true}
      event STOP at 1492639680.732116 for domain fedora_13: <null>
      event SHUTDOWN at 1492639680.732830 for domain fedora_13: {"guest":false}
      
      Note that libvirt runs qemu with -no-shutdown: the first SHUTDOWN event
      was triggered by an action I took directly in the guest (shutdown -h),
      at which point qemu stops the vcpus and waits for libvirt to do any
      final cleanups; the second SHUTDOWN event is the result of libvirt
      sending SIGTERM now that it has completed cleanup.  Libvirt is already
      smart enough to only feed the first qemu SHUTDOWN event to the end user
      (remember, virsh qemu-monitor-event is a low-level debugging interface
      that is explicitly unsupported by libvirt, so it sees things that normal
      end users do not); changing qemu to emit SHUTDOWN only once is outside
      the scope of this series.
      
      See also https://bugzilla.redhat.com/1384007
      
      
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20170515214114.15442-6-eblake@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      08fba7ac
    • Eric Blake's avatar
      shutdown: Add source information to SHUTDOWN and RESET · cf83f140
      Eric Blake authored
      
      Time to wire up all the call sites that request a shutdown or
      reset to use the enum added in the previous patch.
      
      It would have been less churn to keep the common case with no
      arguments as meaning guest-triggered, and only modified the
      host-triggered code paths, via a wrapper function, but then we'd
      still have to audit that I didn't miss any host-triggered spots;
      changing the signature forces us to double-check that I correctly
      categorized all callers.
      
      Since command line options can change whether a guest reset request
      causes an actual reset vs. a shutdown, it's easy to also add the
      information to reset requests.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Acked-by: David Gibson <david@gibson.dropbear.id.au> [ppc parts]
      Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> [SPARC part]
      Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x parts]
      Message-Id: <20170515214114.15442-5-eblake@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      cf83f140
    • Eric Blake's avatar
      shutdown: Preserve shutdown cause through replay · 802f045a
      Eric Blake authored
      
      With the recent addition of ShutdownCause, we want to be able to pass
      a cause through any shutdown request, and then faithfully replay that
      cause when later replaying the same sequence.  The easiest way is to
      expand the reply event mechanism to track a series of values for
      EVENT_SHUTDOWN, one corresponding to each value of ShutdownCause.
      
      We are free to change the replay stream as needed, since there are
      already no guarantees about being able to use a replay stream by
      any other version of qemu than the one that generated it.
      
      The cause is not actually fed back until the next patch changes the
      signature for requesting a shutdown; a TODO marks that upcoming change.
      
      Yes, this uses the gcc/clang extension of a ranged case label,
      but this is not the first time we've used non-C99 constructs.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-Id: <20170515214114.15442-4-eblake@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      802f045a
    • Eric Blake's avatar
      shutdown: Prepare for use of an enum in reset/shutdown_request · aedbe192
      Eric Blake authored
      
      We want to track why a guest was shutdown; in particular, being able
      to tell the difference between a guest request (such as ACPI request)
      and host request (such as SIGINT) will prove useful to libvirt.
      Since all requests eventually end up changing shutdown_requested in
      vl.c, the logical change is to make that value track the reason,
      rather than its current 0/1 contents.
      
      Since command-line options control whether a reset request is turned
      into a shutdown request instead, the same treatment is given to
      reset_requested.
      
      This patch adds an internal enum ShutdownCause that describes reasons
      that a shutdown can be requested, and changes qemu_system_reset() to
      pass the reason through, although for now nothing is actually changed
      with regards to what gets reported.  The enum could be exported via
      QAPI at a later date, if deemed necessary, but for now, there has not
      been a request to expose that much detail to end clients.
      
      For the most part, we turn 0 into SHUTDOWN_CAUSE_NONE, and 1 into
      SHUTDOWN_CAUSE_HOST_ERROR; the only specific case where we have enough
      information right now to use a different value is when we are reacting
      to a host signal.  It will take a further patch to edit all call-sites
      that can trigger a reset or shutdown request to properly pass in any
      other reasons; this patch includes TODOs to point such places out.
      
      qemu_system_reset() trades its 'bool report' parameter for a
      'ShutdownCause reason', with all non-zero values having the same
      effect; this lets us get rid of the weird #defines for VMRESET_*
      as synonyms for bools.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20170515214114.15442-3-eblake@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      aedbe192
    • Eric Blake's avatar
      shutdown: Simplify shutdown_signal · 7af88279
      Eric Blake authored
      
      There is no signal 0 (kill(pid, 0) has special semantics to probe whether
      a process is alive), rather than actually sending a signal 0).  So we
      can use the simpler 0, instead of -1, for our sentinel of whether a
      shutdown request due to a signal has happened.
      
      Suggested-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarAlistair Francis <alistair.francis@xilinx.com>
      Message-Id: <20170515214114.15442-2-eblake@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      7af88279
    • Markus Armbruster's avatar
      sockets: Plug memory leak in socket_address_flatten() · fc0f0059
      Markus Armbruster authored
      
      socket_address_flatten() leaks a SocketAddress when its argument is
      null.  Happens when opening a ChardevBackend of type 'udp' that is
      configured without a local address.  Screwed up in commit bd269ebc due
      to last minute semantic conflict resolution.  Spotted by Coverity.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1494866344-11013-1-git-send-email-armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      fc0f0059
    • Greg Kurz's avatar
      scripts/qmp/qom-set: fix the value argument passed to srv.command() · fe2f74af
      Greg Kurz authored
      
      When invoking the script with -s, we end up passing a bogus value
      to QEMU:
      
      $ ./scripts/qmp/qom-set -s /var/tmp/qmp-sock-exp /machine.accel kvm
      {}
      $ ./scripts/qmp/qom-get -s /var/tmp/qmp-sock-exp /machine.accel
      /var/tmp/qmp-sock-exp
      
      This happens because sys.argv[2] isn't necessarily the command line
      argument that holds the value. It is sys.argv[4] when -s was also
      passed.
      
      Actually, the code already has a variable to handle that. This patch
      simply uses it.
      
      Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
      Message-Id: <149373610338.5144.9635049015143453288.stgit@bahia.lan>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      fe2f74af
    • Sameeh Jubran's avatar
      e1000e: Fix ICR "Other" causes clear logic · 82342e91
      Sameeh Jubran authored
      This commit fixes a bug which causes the guest to hang. The bug was
      observed upon a "receive overrun" (bit #6 of the ICR register)
      interrupt which could be triggered post migration in a heavy traffic
      environment. Even though the "receive overrun" bit (#6) is masked out
      by the IMS register (refer to the log below) the driver still receives
      an interrupt as the "receive overrun" bit (#6) causes the "Other" -
      bit #24 of the ICR register - bit to be set as documented below. The
      driver handles the interrupt and clears the "Other" bit (#24) but
      doesn't clear the "receive overrun" bit (#6) which leads to an
      infinite loop. Apparently the Windows driver expects that the "receive
      overrun" bit and other ones - documented below - to be cleared when
      the "Other" bit (#24) is cleared.
      
      So to sum that up:
      1. Bit #6 of the ICR register is set by heavy traffic
      2. As a results of setting bit #6, bit #24 is set
      3. The driver receives an interrupt for bit 24 (it doesn't receieve an
         interrupt for bit #6 as it is masked out by IMS)
      4. The driver handles and clears the interrupt of bit #24
      5. Bit #6 is still set.
      6. 2 happens all over again
      
      The Interrupt Cause Read - ICR register:
      
      The ICR has the "Other" bit - bit #24 - that is set when one or more
      of the following ICR register's bits are set:
      
      LSC - bit #2, RXO - bit #6, MDAC - bit #9, SRPD - bit #16, ACK - bit
      #17, MNG - bit #18
      
      This bug can occur with any of these bits depending on the driver's
      behaviour and the way it configures the device. However, trying to
      reproduce it with any bit other than RX0 is challenging and came to
      failure as the drivers don't implement most of these bits, trying to
      reproduce it with LSC (Link Status Change - bit #2) bit didn't succeed
      too as it seems that Windows handles this bit differently.
      
      Log sample of the storm:
      
      27563@1494850819.411877:e1000e_irq_pending_interrupts ICR PENDING: 0x1000000 (ICR: 0x815000c2, IMS: 0x1a00004)
      27563@1494850819.411900:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
      27563@1494850819.411915:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
      27563@1494850819.412380:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
      27563@1494850819.412395:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
      27563@1494850819.412436:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
      27563@1494850819.412441:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
      27563@1494850819.412998:e1000e_irq_pending_interrupts ICR PENDING: 0x1000000 (ICR: 0x815000c2, IMS: 0x1a00004)
      
      * This bug behaviour wasn't observed with the Linux driver.
      
      This commit solves:
      https://bugzilla.redhat.com/show_bug.cgi?id=1447935
      https://bugzilla.redhat.com/show_bug.cgi?id=1449490
      
      
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: default avatarSameeh Jubran <sjubran@redhat.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      82342e91
    • Zhang Chen's avatar
    • Zhang Chen's avatar
      net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle · e05dc4cf
      Zhang Chen authored
      
      Because filter_mirror_receive_iov() and filter_redirector_receive_iov()
      both use the filter_mirror_send() to send packet, so I change
      filter_mirror_send() to filter_send() that looks more common.
      And fix some codestyle.
      
      Signed-off-by: default avatarZhang Chen <zhangchen.fnst@cn.fujitsu.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      e05dc4cf
    • Zhang Chen's avatar
      net/filter-mirror.c: Remove duplicate check code. · e2f84016
      Zhang Chen authored
      
      The s->outdev have checked in filter_mirror_set_outdev().
      
      Signed-off-by: default avatarZhang Chen <zhangchen.fnst@cn.fujitsu.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      e2f84016
    • Thomas Huth's avatar
      hmp / net: Mark host_net_add/remove as deprecated · 559964a1
      Thomas Huth authored
      
      The netdev_add and netdev_del commands should be used nowadays instead.
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      559964a1
    • Zhang Chen's avatar
      COLO-compare: Improve tcp compare trace event readability · f583dca9
      Zhang Chen authored
      
      Because of previous patch's trace arguments over the limit
      of UST backend, so I rewrite the patch.
      
      Signed-off-by: default avatarZhang Chen <zhangchen.fnst@cn.fujitsu.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      f583dca9
    • Yunjian Wang's avatar
      virtio-net: fix wild pointer when remove virtio-net queues · f989c30c
      Yunjian Wang authored
      
      The tx_bh or tx_timer will free in virtio_net_del_queue() function, when
      removing virtio-net queues if the guest doesn't support multiqueue. But
      it might be still referenced by virtio_net_set_status(), which needs to
      be set NULL. And also the tx_waiting needs to be set zero to prevent
      virtio_net_set_status() accessing tx_bh or tx_timer.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: default avatarYunjian Wang <wangyunjian@huawei.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      f989c30c
    • Thomas Huth's avatar
      net/dump: Issue a warning for the deprecated "-net dump" · f5ab20a4
      Thomas Huth authored
      
      Network dumping should be done with "-object filter-dump" nowadays.
      Using "-net dump" via the VLAN mechanism is considered as deprecated
      and might be removed in a future release. So warn the users now
      to inform them to user the filter-dump method instead.
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      f5ab20a4
    • Thomas Huth's avatar
      net/tap: Replace tap-haiku.c and tap-aix.c by a generic tap-stub.c · 4348300e
      Thomas Huth authored
      
      The files tap-haiku.c and tap-aix.c are identical (except one line
      of error message). We should avoid such code duplication, so replace
      these by a generic tap-stub.c file instead.
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      4348300e
  4. May 22, 2017
  5. May 19, 2017
Loading