Skip to content
Snippets Groups Projects
  1. Sep 29, 2020
    • Dima Stepanov's avatar
      vhost: recheck dev state in the vhost_migration_log routine · f5b22d06
      Dima Stepanov authored
      vhost-user devices can get a disconnect in the middle of the VHOST-USER
      handshake on the migration start. If disconnect event happened right
      before sending next VHOST-USER command, then the vhost_dev_set_log()
      call in the vhost_migration_log() function will return error. This error
      will lead to the assert() and close the QEMU migration source process.
      For the vhost-user devices the disconnect event should not break the
      migration process, because:
        - the device will be in the stopped state, so it will not be changed
          during migration
        - if reconnect will be made the migration log will be reinitialized as
          part of reconnect/init process:
          #0  vhost_log_global_start (listener=0x563989cf7be0)
          at hw/virtio/vhost.c:920
          #1  0x000056398603d8bc in listener_add_address_space (listener=0x563989cf7be0,
              as=0x563986ea4340 <address_space_memory>)
          at softmmu/memory.c:2664
          #2  0x000056398603dd30 in memory_listener_register (listener=0x563989cf7be0,
              as=0x563986ea4340 <address_space_memory>)
          at softmmu/memory.c:2740
          #3  0x0000563985fd6956 in vhost_dev_init (hdev=0x563989cf7bd8,
              opaque=0x563989cf7e30, backend_type=VHOST_BACKEND_TYPE_USER,
              busyloop_timeout=0)
          at hw/virtio/vhost.c:1385
          #4  0x0000563985f7d0b8 in vhost_user_blk_connect (dev=0x563989cf7990)
          at hw/block/vhost-user-blk.c:315
          #5  0x0000563985f7d3f6 in vhost_user_blk_event (opaque=0x563989cf7990,
              event=CHR_EVENT_OPENED)
          at hw/block/vhost-user-blk.c:379
      Update the vhost-user-blk device with the internal started_vu field which
      will be used for initialization (vhost_user_blk_start) and clean up
      (vhost_user_blk_stop). This additional flag in the VhostUserBlk structure
      will be used to track whether the device really needs to be stopped and
      cleaned up on a vhost-user level.
      The disconnect event will set the overall VHOST device (not vhost-user) to
      the stopped state, so it can be used by the general vhost_migration_log
      routine.
      Such approach could be propogated to the other vhost-user devices, but
      better idea is just to make the same connect/disconnect code for all the
      vhost-user devices.
      
      This migration issue was slightly discussed earlier:
        - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg01509.html
        - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg05241.html
      
      
      
      Signed-off-by: default avatarDima Stepanov <dimastep@yandex-team.ru>
      Reviewed-by: default avatarRaphael Norwitz <raphael.norwitz@nutanix.com>
      Message-Id: <9fbfba06791a87813fcee3e2315f0b904cc6789a.1599813294.git.dimastep@yandex-team.ru>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      f5b22d06
    • David Hildenbrand's avatar
      pc: fix auto_enable_numa_with_memhp/auto_enable_numa_with_memdev for the 5.0 machine · d110b6b4
      David Hildenbrand authored
      
      Unfortunately, a typo sneeked in: we want to set
      auto_enable_numa_with_memdev to false, not auto_enable_numa_with_memhp.
      
      Cc: qemu-stable@nongnu.org # v5.1
      Fixes: 195784a0 (numa: Auto-enable NUMA when any memory devices are possible)
      Reported-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Message-Id: <20200820094828.30348-1-david@redhat.com>
      Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      d110b6b4
    • Li Qiang's avatar
      virtio-mem: detach the element from the virtqueue when error occurs · 0c404e45
      Li Qiang authored
      
      If error occurs while processing the virtio request we should call
      'virtqueue_detach_element' to detach the element from the virtqueue
      before free the elem.
      
      Signed-off-by: default avatarLi Qiang <liq3ea@163.com>
      Message-Id: <20200816142245.17556-1-liq3ea@163.com>
      Fixes: 910b2576 ("virtio-mem: Paravirtualized memory hot(un)plug")
      Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      0c404e45
    • Jason Wang's avatar
      vhost-vdpa: batch updating IOTLB mappings · a5bd0580
      Jason Wang authored
      
      To speed up the memory mapping updating between vhost-vDPA and vDPA
      device driver, this patch passes the IOTLB batching flags via IOTLB
      API. Two new flags was introduced, VHOST_IOTLB_BATCH_BEGIN is a hint
      that a bathced IOTLB updating may be initiated from the
      userspace. VHOST_IOTLB_BATCH_END is a hint that userspace has finished
      the updating:
      
      VHOST_IOTLB_BATCH_BEGIN
      VHOST_IOTLB_UPDATE/VHOST_IOTLB_INVALIDATE
      ...
      VHOST_IOTLB_BATCH_END
      
      Vhost-vDPA can then know that all mappings has been set and can do
      optimization like passing all the mappings to the vDPA device driver.
      
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20200907104903.31551-4-jasowang@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      a5bd0580
    • Jason Wang's avatar
      vhost: switch to use IOTLB v2 format · b37556ed
      Jason Wang authored
      
      This patch tries to switch to use new kernel IOTLB format V2. Previous
      version may have inconsistent ABI between 32bit and 64bit machines
      because of the hole after type field. Refer kernel commit
      ("429711aec282 vhost: switch to use new message format") for more
      information.
      
      To enable this feature, qemu need to use a new ioctl
      VHOST_SET_BACKEND_FEATURE with VHOST_BACKEND_F_IOTLB_MSG_V2 bit. A new
      vhost setting backend features ops was introduced. And when we try to
      set features for vhost dev, we will examine the support of new IOTLB
      format and enable it. This process is total transparent to guest,
      which means we can have different IOTLB message type in src and dst
      during migration.
      
      The conversion of IOTLB message is straightforward, just check the
      type and behave accordingly.
      
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20200907104903.31551-3-jasowang@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      b37556ed
    • Jason Wang's avatar
      linux headers: sync to 5.9-rc4 · e6546342
      Jason Wang authored
      
      Update against Linux 5.9-rc4.
      
      Cc: Cornelia Huck <cohuck@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Message-Id: <20200907104903.31551-2-jasowang@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      e6546342
  2. Sep 28, 2020
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/alistair/tags/pull-register-20200927' into staging · 74504514
      Peter Maydell authored
      
      Two small patches. One with a fix for the register API instance_size
      and one for removing unused address variables from load_elf.
      
      # gpg: Signature made Sun 27 Sep 2020 14:45:06 BST
      # gpg:                using RSA key F6C4AC46D4934868D3B8CE8F21E10D29DF977054
      # gpg: Good signature from "Alistair Francis <alistair@alistair23.me>" [full]
      # Primary key fingerprint: F6C4 AC46 D493 4868 D3B8  CE8F 21E1 0D29 DF97 7054
      
      * remotes/alistair/tags/pull-register-20200927:
        core/register: Specify instance_size in the TypeInfo
        load_elf: Remove unused address variables from callers
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      74504514
    • Peter Maydell's avatar
      Merge remote-tracking branch... · 92d09502
      Peter Maydell authored
      Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-5.2-pull-request' into staging
      
      Trivial Patches Pull request 20200928
      
      # gpg: Signature made Mon 28 Sep 2020 10:15:00 BST
      # gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
      # gpg:                issuer "laurent@vivier.eu"
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier2/tags/trivial-branch-for-5.2-pull-request:
        docs/system/deprecated: Move lm32 and unicore32 to the right section
        migration/multifd: Remove superfluous semicolons
        timer: Fix timer_mod_anticipate() documentation
        vhost-vdpa: remove useless variable
        Add *.pyc back to the .gitignore file
        virtio: vdpa: omit check return of g_malloc
        meson: fix static flag summary
        vhost-vdpa: fix indentation in vdpa_ops
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      92d09502
  3. Sep 25, 2020
  4. Sep 24, 2020
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · 8c1c0792
      Peter Maydell authored
      
      Pull request
      
      This includes the atomic_ -> qatomic_ rename that touches many files and is
      prone to conflicts.
      
      # gpg: Signature made Wed 23 Sep 2020 17:08:43 BST
      # gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/block-pull-request:
        qemu/atomic.h: rename atomic_ to qatomic_
        tests: add test-fdmon-epoll
        fdmon-poll: reset npfd when upgrading to fdmon-epoll
        gitmodules: add qemu.org vbootrom submodule
        gitmodules: switch to qemu.org meson mirror
        gitmodules: switch to qemu.org qboot mirror
        docs/system: clarify deprecation schedule
        virtio-crypto: don't modify elem->in/out_sg
        virtio-blk: undo destructive iov_discard_*() operations
        util/iov: add iov_discard_undo()
        virtio: add vhost-user-fs-ccw device
        libvhost-user: handle endianness as mandated by the spec
        MAINTAINERS: add Stefan Hajnoczi as block/nvme.c maintainer
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      8c1c0792
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/kraxel/tags/audio-20200923-pull-request' into staging · 1bd5556f
      Peter Maydell authored
      
      audio: various buffering fixes.
      audio: build spiceaudio as module.
      
      # gpg: Signature made Wed 23 Sep 2020 10:09:46 BST
      # gpg:                using RSA key 4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * remotes/kraxel/tags/audio-20200923-pull-request:
        audio: build spiceaudio as module
        audio: remove qemu_spice_audio_init()
        audio: run downstream playback queue unconditionally
        audio: align audio_generic_write with audio_pcm_hw_run_out
        audio: remove unnecessary calls to put_buffer_in
        audio: align audio_generic_read with audio_pcm_hw_run_in
        audio/spiceaudio: always rate limit playback stream
        audio/audio: fix video playback slowdown with spiceaudio
        audio: handle buf == NULL in put_buffer_out()
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      1bd5556f
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging · f7f1d916
      Peter Maydell authored
      
      machine + QOM queue, 2020-09-22
      
      QOM cleanups:
      * Convert instance properties to class properties
        (Eduardo Habkost)
      * simplify object_find_property / object_class_find_property
        (Daniel P. Berrangé)
      
      Deprecated feature removal:
      * Drop support for invalid topologies (Igor Mammedov)
      
      # gpg: Signature made Tue 22 Sep 2020 23:25:01 BST
      # gpg:                using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6
      # gpg:                issuer "ehabkost@redhat.com"
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full]
      # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6
      
      * remotes/ehabkost/tags/machine-next-pull-request:
        sifive_u: Register "start-in-flash" as class property
        sifive_e: Register "revb" as class property
        i440fx: Register i440FX-pcihost properties as class properties
        machine: Register "memory-backend" as class property
        xlnx-zcu102: Register properties as class properties
        cpu/core: Register core-id and nr-threads as class properties
        s390x: Register all CPU properties as class properties
        cryptodev-backend: Register "chardev" as class property
        cryptodev-vhost-user: Register "chardev" as class property
        smp: drop support for deprecated (invalid topologies)
        qom: simplify object_find_property / object_class_find_property
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      f7f1d916
Loading