Skip to content
Snippets Groups Projects
  1. Nov 28, 2021
    • Eugenio Pérez's avatar
      vdpa: Add dummy receive callback · 846a1e85
      Eugenio Pérez authored
      
      Qemu falls back on userland handlers even if vhost-user and vhost-vdpa
      cases. These assumes a tap device can handle the packets.
      
      If a vdpa device fail to start, it can trigger a sigsegv because of
      that. Add dummy receiver that returns no progress so it can keep
      running.
      
      Fixes: 1e0a84ea ("vhost-vdpa: introduce vhost-vdpa net client")
      Signed-off-by: default avatarEugenio Pérez <eperezma@redhat.com>
      Message-Id: <20211125101614.76927-2-eperezma@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      846a1e85
    • Laurent Vivier's avatar
      failover: fix unplug pending detection · 9323f892
      Laurent Vivier authored
      
      Failover needs to detect the end of the PCI unplug to start migration
      after the VFIO card has been unplugged.
      
      To do that, a flag is set in pcie_cap_slot_unplug_request_cb() and reset in
      pcie_unplug_device().
      
      But since
          17858a16 ("hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35")
      we have switched to ACPI unplug and these functions are not called anymore
      and the flag not set. So failover migration is not able to detect if card
      is really unplugged and acts as it's done as soon as it's started. So it
      doesn't wait the end of the unplug to start the migration. We don't see any
      problem when we test that because ACPI unplug is faster than PCIe native
      hotplug and when the migration really starts the unplug operation is
      already done.
      
      See c000a9bd ("pci: mark device having guest unplug request pending")
          a99c4da9 ("pci: mark devices partially unplugged")
      
      Signed-off-by: default avatarLaurent Vivier <lvivier@redhat.com>
      Reviewed-by: default avatarAni Sinha <ani@anisinha.ca>
      Message-Id: <20211118133225.324937-4-lvivier@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      9323f892
    • Cindy Lu's avatar
      virtio-mmio : fix the crash in the vm shutdown · 7abba7c6
      Cindy Lu authored
      
      The root cause for this crash is the ioeventfd not stopped while the VM stop.
      The callback for vmstate_change was not implement in virtio-mmio bus
      
      Reproduce step
      load the vm with
       -M microvm \
        -netdev tap,id=net0,vhostforce,script=no,downscript=no  \
        -device virtio-net-device,netdev=net0\
      
      After the VM boot, login the vm and then shutdown the vm
      
      System will crash
      [Current thread is 1 (Thread 0x7ffff6edde00 (LWP 374378))]
      (gdb) bt
      0  0x00005555558f18b4 in qemu_flush_or_purge_queued_packets (purge=false, nc=0x55500252e850) at ../net/net.c:636
      1  qemu_flush_queued_packets (nc=0x55500252e850) at ../net/net.c:656
      2  0x0000555555b6c363 in virtio_queue_notify_vq (vq=0x7fffe7e2b010) at ../hw/virtio/virtio.c:2339
      3  virtio_queue_host_notifier_read (n=0x7fffe7e2b08c) at ../hw/virtio/virtio.c:3583
      4  0x0000555555de7b5a in aio_dispatch_handler (ctx=ctx@entry=0x5555567c5780, node=0x555556b83fd0) at ../util/aio-posix.c:329
      5  0x0000555555de8454 in aio_dispatch_ready_handlers (ready_list=<optimized out>, ctx=<optimized out>) at ../util/aio-posix.c:359
      6  aio_poll (ctx=0x5555567c5780, blocking=blocking@entry=false) at ../util/aio-posix.c:662
      7  0x0000555555cce0cc in monitor_cleanup () at ../monitor/monitor.c:645
      8  0x0000555555b06bd2 in qemu_cleanup () at ../softmmu/runstate.c:822
      9  0x000055555586e693 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at ../softmmu/main.c:51
      
      Signed-off-by: default avatarCindy Lu <lulu@redhat.com>
      Message-Id: <20211109023744.22387-1-lulu@redhat.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      7abba7c6
  2. Nov 26, 2021
  3. Nov 24, 2021
  4. Nov 23, 2021
    • Richard Henderson's avatar
      Merge tag 'pull-block-2021-11-23' of https://gitlab.com/hreitz/qemu into staging · 35133781
      Richard Henderson authored
      Block patches for 6.2-rc2:
      - Fix memory leak in vvfat when vvfat_open() fails
      - iotest fixes for the gnutls crypto backend
      
      # gpg: Signature made Tue 23 Nov 2021 04:58:05 PM CET
      # gpg:                using RSA key CB62D7A0EE3829E45F004D34A1FA40D098019CDF
      # gpg:                issuer "hreitz@redhat.com"
      # gpg: Good signature from "Hanna Reitz <hreitz@redhat.com>" [marginal]
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: CB62 D7A0 EE38 29E4 5F00  4D34 A1FA 40D0 9801 9CDF
      
      * tag 'pull-block-2021-11-23' of https://gitlab.com/hreitz/qemu
      
      :
        iotests/149: Skip on unsupported ciphers
        iotests: Use aes-128-cbc
        block/vvfat.c fix leak when failure occurs
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      35133781
    • Hanna Reitz's avatar
      iotests/149: Skip on unsupported ciphers · 4dd218fd
      Hanna Reitz authored
      
      Whenever qemu-img or qemu-io report that some cipher is unsupported,
      skip the whole test, because that is probably because qemu has been
      configured with the gnutls crypto backend.
      
      We could taylor the algorithm list to what gnutls supports, but this is
      a test that is run rather rarely anyway (because it requires
      password-less sudo), and so it seems better and easier to skip it.  When
      this test is intentionally run to check LUKS compatibility, it seems
      better not to limit the algorithms but keep the list extensive.
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Message-Id: <20211117151707.52549-3-hreitz@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      4dd218fd
    • Hanna Reitz's avatar
      iotests: Use aes-128-cbc · cb5a24d7
      Hanna Reitz authored
      
      Our gnutls crypto backend (which is the default as of 8bd0931f)
      supports neither twofish-128 nor the CTR mode.  CBC and aes-128 are
      supported by all of our backends (as far as I can tell), so use
      aes-128-cbc in our iotests.
      
      (We could also use e.g. aes-256-cbc, but the different key sizes would
      lead to different key slot offsets and so change the reference output
      more, which is why I went with aes-128.)
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Message-Id: <20211117151707.52549-2-hreitz@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Tested-by: default avatarThomas Huth <thuth@redhat.com>
      cb5a24d7
    • Daniella Lee's avatar
      block/vvfat.c fix leak when failure occurs · 22c36b75
      Daniella Lee authored
      
      Function vvfat_open called function enable_write_target and init_directories,
      and these functions malloc new memory for BDRVVVFATState::qcow_filename,
      BDRVVVFATState::used_clusters, and BDRVVVFATState::cluster_buff.
      
      When the specified folder does not exist ,it may contains memory leak.
      After init_directories function is executed, the vvfat_open return -EIO,
      and bdrv_open_driver goto label open_failed,
      the program use g_free(bs->opaque) to release BDRVVVFATState struct
      without members mentioned.
      
      command line:
      qemu-system-x86_64 -hdb <vdisk qcow file>  -usb -device usb-storage,drive=fat16
      -drive file=fat:rw:fat-type=16:"<path of a host folder does not exist>",
      id=fat16,format=raw,if=none
      
      enable_write_target called:
      (gdb) bt
          at ../block/vvfat.c:3114
          flags=155650, errp=0x7fffffffd780) at ../block/vvfat.c:1236
          node_name=0x0, options=0x555556fa45d0, open_flags=155650,
          errp=0x7fffffffd890) at ../block.c:1558
          errp=0x7fffffffd890) at ../block.c:1852
          reference=0x0, options=0x555556fa45d0, flags=40962, parent=0x555556f98cd0,
          child_class=0x555556b1d6a0 <child_of_bds>, child_role=19,
          errp=0x7fffffffda90) at ../block.c:3779
          options=0x555556f9cfc0, bdref_key=0x555556239bb8 "file",
          parent=0x555556f98cd0, child_class=0x555556b1d6a0 <child_of_bds>,
          child_role=19, allow_none=true, errp=0x7fffffffda90) at ../block.c:3419
          reference=0x0, options=0x555556f9cfc0, flags=8194, parent=0x0,
          child_class=0x0, child_role=0, errp=0x555556c98c40 <error_fatal>)
          at ../block.c:3726
          options=0x555556f757b0, flags=0, errp=0x555556c98c40 <error_fatal>)
          at ../block.c:3872
          options=0x555556f757b0, flags=0, errp=0x555556c98c40 <error_fatal>)
          at ../block/block-backend.c:436
          bs_opts=0x555556f757b0, errp=0x555556c98c40 <error_fatal>)
          at ../blockdev.c:608
          errp=0x555556c98c40 <error_fatal>) at ../blockdev.c:992
      ......
      
      Signed-off-by: default avatarDaniella Lee <daniellalee111@gmail.com>
      Message-Id: <20211119112553.352222-1-daniellalee111@gmail.com>
      [hreitz: Took commit message from v1]
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      22c36b75
    • Richard Henderson's avatar
      Merge tag 'pull-lu-20211123' of https://gitlab.com/rth7680/qemu into staging · 73e0f70e
      Richard Henderson authored
      Create common rewind_if_in_safe_syscall function.
      Resolves pointer type issues with uc_mcontext.pc
      on aarch64 between glibc and musl.
      
      # gpg: Signature made Tue 23 Nov 2021 09:47:07 AM CET
      # gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
      # gpg:                issuer "richard.henderson@linaro.org"
      # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate]
      
      * tag 'pull-lu-20211123' of https://gitlab.com/rth7680/qemu
      
      :
        linux-user/signal.c: Create a common rewind_if_in_safe_syscall
        linux-user: Add host_signal_set_pc to set pc in mcontext
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      73e0f70e
    • Richard Henderson's avatar
      Merge tag 'python-pull-request' of https://gitlab.com/jsnow/qemu into staging · 3c2a46d5
      Richard Henderson authored
      Python testing fixes for 6.2
      
      A few more fixes to help eliminate race conditions from
      device-crash-test, along with a fix that allows the SCM_RIGHTS
      functionality to work on hosts that only have Python 3.6.
      
      If this is too much this late in the RC process, I'd advocate for at
      least patch 7/7 by itself.
      
      # gpg: Signature made Tue 23 Nov 2021 03:37:17 AM CET
      # gpg:                using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E
      # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full]
      
      * tag 'python-pull-request' of https://gitlab.com/jsnow/qemu
      
      :
        python/aqmp: fix send_fd_scm for python 3.6.x
        scripts/device-crash-test: Use a QMP timeout
        python/machine: handle "fast" QEMU terminations
        python/machine: move more variable initializations to _pre_launch
        python/machine: add instance disambiguator to default nickname
        python/machine: remove _remove_monitor_sockfile property
        python/machine: add @sock_dir property
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      3c2a46d5
    • Warner Losh's avatar
      linux-user/signal.c: Create a common rewind_if_in_safe_syscall · 07637888
      Warner Losh authored
      
      All instances of rewind_if_in_safe_syscall are the same, differing only
      in how the instruction point is fetched from the ucontext and the size
      of the registers. Use host_signal_pc and new host_signal_set_pc
      interfaces to fetch the pointer to the PC and adjust if needed. Delete
      all the old copies of rewind_if_in_safe_syscall.
      
      Acked-by: default avatarLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: default avatarWarner Losh <imp@bsdimp.com>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20211113045603.60391-3-imp@bsdimp.com>
      [rth: include safe-syscall.h, simplify ifdefs]
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      07637888
    • Warner Losh's avatar
      linux-user: Add host_signal_set_pc to set pc in mcontext · c6cda6a4
      Warner Losh authored
      
      Add a new function host_signal_set_pc to set the next pc in an
      mcontext. The caller should ensure this is a valid PC for execution.
      
      Acked-by: default avatarLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: default avatarWarner Losh <imp@bsdimp.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <20211113045603.60391-2-imp@bsdimp.com>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      c6cda6a4
    • Richard Henderson's avatar
      Merge tag 'pull-target-arm-20211122-1' of... · 6d9c9603
      Richard Henderson authored
      Merge tag 'pull-target-arm-20211122-1' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
      
      target-arm queue:
       * drop spurious bump of ITS vmstate version fields
      
      # gpg: Signature made Mon 22 Nov 2021 07:43:19 PM CET
      # gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
      # gpg:                issuer "peter.maydell@linaro.org"
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [full]
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [full]
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [full]
      
      * tag 'pull-target-arm-20211122-1' of https://git.linaro.org/people/pmaydell/qemu-arm
      
      :
        hw/intc/arm_gicv3_its: Revert version increments in vmstate_its
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      6d9c9603
  5. Nov 22, 2021
Loading