Skip to content
Snippets Groups Projects
  1. May 04, 2022
    • Hanna Reitz's avatar
      block: Classify bdrv_get_flags() as I/O function · 15aee7ac
      Hanna Reitz authored
      
      This function is safe to call in an I/O context, and qcow2_do_open()
      does so (invoked in an I/O context by qcow2_co_invalidate_cache()).
      
      Signed-off-by: default avatarHanna Reitz <hreitz@redhat.com>
      Message-Id: <20220427114057.36651-2-hreitz@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      15aee7ac
    • Kevin Wolf's avatar
      vhost-user: Don't pass file descriptor for VHOST_USER_REM_MEM_REG · a81d8d4a
      Kevin Wolf authored
      
      The spec clarifies now that QEMU should not send a file descriptor in a
      request to remove a memory region. Change it accordingly.
      
      For libvhost-user, this is a bug fix that makes it compatible with
      rust-vmm's implementation that doesn't send a file descriptor. Keep
      accepting, but ignoring a file descriptor for compatibility with older
      QEMU versions.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20220407133657.155281-4-kwolf@redhat.com>
      Reviewed-by: default avatarRaphael Norwitz <raphael.norwitz@nutanix.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      a81d8d4a
    • Kevin Wolf's avatar
      libvhost-user: Fix extra vu_add/rem_mem_reg reply · 5ebfdeb2
      Kevin Wolf authored
      
      Outside of postcopy mode, neither VHOST_USER_ADD_MEM_REG nor
      VHOST_USER_REM_MEM_REG are supposed to send a reply unless explicitly
      requested with the need_reply flag. Their current implementation always
      sends a reply, even if it isn't requested. This confuses the master
      because it will interpret the reply as a reply for the next message for
      which it actually expects a reply.
      
      need_reply is already handled correctly by vu_dispatch(), so just don't
      send a reply in the non-postcopy part of the message handler for these
      two commands.
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20220407133657.155281-3-kwolf@redhat.com>
      Reviewed-by: default avatarRaphael Norwitz <raphael.norwitz@nutanix.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      5ebfdeb2
    • Kevin Wolf's avatar
      docs/vhost-user: Clarifications for VHOST_USER_ADD/REM_MEM_REG · 31009d13
      Kevin Wolf authored
      
      The specification for VHOST_USER_ADD/REM_MEM_REG messages is unclear
      in several points, which has led to clients having incompatible
      implementations. This changes the specification to be more explicit
      about them:
      
      * VHOST_USER_ADD_MEM_REG is not specified as receiving a file
        descriptor, though it obviously does need to do so. All
        implementations agree on this one, fix the specification.
      
      * VHOST_USER_REM_MEM_REG is not specified as receiving a file
        descriptor either, and it also has no reason to do so. rust-vmm does
        not send file descriptors for removing a memory region (in agreement
        with the specification), libvhost-user and QEMU do (which is a bug),
        though libvhost-user doesn't actually make any use of it.
      
        Change the specification so that for compatibility QEMU's behaviour
        becomes legal, even if discouraged, but rust-vmm's behaviour becomes
        the explicitly recommended mode of operation.
      
      * VHOST_USER_ADD_MEM_REG doesn't have a documented return value, which
        is the desired behaviour in the non-postcopy case. It also implemented
        like this in QEMU and rust-vmm, though libvhost-user is buggy and
        sometimes sends an unexpected reply. This will be fixed in a separate
        patch.
      
        However, in postcopy mode it does reply like VHOST_USER_SET_MEM_TABLE.
        This behaviour is shared between libvhost-user and QEMU; rust-vmm
        doesn't implement postcopy mode yet. Mention it explicitly in the
        spec.
      
      * The specification doesn't mention how VHOST_USER_REM_MEM_REG
        identifies the memory region to be removed. Change it to describe the
        existing behaviour of libvhost-user (guest address, user address and
        size must match).
      
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      Message-Id: <20220407133657.155281-2-kwolf@redhat.com>
      Reviewed-by: default avatarRaphael Norwitz <raphael.norwitz@nutanix.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      31009d13
    • Denis V. Lunev's avatar
      qemu-img: properly list formats which have consistency check implemented · 8e28b65f
      Denis V. Lunev authored
      
      Simple grep for the .bdrv_co_check callback presence gives the following
      list of block drivers
      * QED
      * VDI
      * VHDX
      * VMDK
      * Parallels
      which have this callback. The presense of the callback means that
      consistency check is supported.
      
      The patch updates documentation accordingly.
      
      Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Hanna Reitz <hreitz@redhat.com>
      Message-Id: <20220407083932.531965-1-den@openvz.org>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
      8e28b65f
  2. May 03, 2022
  3. May 02, 2022
Loading