<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/contrib/libvhost-user, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/contrib/libvhost-user?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/contrib/libvhost-user?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2020-12-08T18:48:58+00:00</updated>
<entry>
<title>libvhost-user: make it a meson subproject</title>
<updated>2020-12-08T18:48:58+00:00</updated>
<author>
<name>Marc-André Lureau</name>
</author>
<published>2020-11-25T10:06:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=0df750e9d3a5fea5e19f4750582121c9293a9d71'/>
<id>urn:sha1:0df750e9d3a5fea5e19f4750582121c9293a9d71</id>
<content type='text'>
By making libvhost-user a subproject, check it builds
standalone (without the global QEMU cflags etc).

Note that the library still relies on QEMU include/qemu/atomic.h and
linux_headers/.

Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-Id: &lt;20201125100640.366523-6-marcandre.lureau@redhat.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>libvhost-user: drop qemu/osdep.h dependency</title>
<updated>2020-12-08T18:48:58+00:00</updated>
<author>
<name>Marc-André Lureau</name>
</author>
<published>2020-11-25T10:06:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=3d22bd27acd93281354b10c6bf787b720685eb80'/>
<id>urn:sha1:3d22bd27acd93281354b10c6bf787b720685eb80</id>
<content type='text'>
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-Id: &lt;20201125100640.366523-5-marcandre.lureau@redhat.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>libvhost-user: remove qemu/compiler.h usage</title>
<updated>2020-12-08T18:48:58+00:00</updated>
<author>
<name>Marc-André Lureau</name>
</author>
<published>2020-11-25T10:06:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=7fa1d61695d92661c4800a7ee727ab7ae15a170b'/>
<id>urn:sha1:7fa1d61695d92661c4800a7ee727ab7ae15a170b</id>
<content type='text'>
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-Id: &lt;20201125100640.366523-4-marcandre.lureau@redhat.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>libvhost-user: replace qemu/memfd.h usage</title>
<updated>2020-12-08T18:48:58+00:00</updated>
<author>
<name>Marc-André Lureau</name>
</author>
<published>2020-11-25T10:06:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=810033be083040591fee2fc09f2f294670ed1930'/>
<id>urn:sha1:810033be083040591fee2fc09f2f294670ed1930</id>
<content type='text'>
Undo the damage from commit 5f9ff1eff3 ("libvhost-user: Support tracking
inflight I/O in shared memory") which introduced glib dependency through
osdep.h inclusion.

libvhost-user.c tries to stay free from glib usage.

Use glibc memfd_create directly when available (assumed so when
MFD_ALLOW_SEALING is defined). A following commit will make the project
standalone and check for memfd API at configure time, instead of a
panic at runtime.

Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-Id: &lt;20201125100640.366523-3-marcandre.lureau@redhat.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>libvhost-user: replace qemu/bswap.h with glibc endian.h</title>
<updated>2020-12-08T18:48:58+00:00</updated>
<author>
<name>Marc-André Lureau</name>
</author>
<published>2020-11-25T10:06:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=0ca293155b7bada98afdb250b74577fd5895f0bb'/>
<id>urn:sha1:0ca293155b7bada98afdb250b74577fd5895f0bb</id>
<content type='text'>
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Reviewed-by: Dr. David Alan Gilbert &lt;dgilbert@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-Id: &lt;20201125100640.366523-2-marcandre.lureau@redhat.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>contrib/libvhost-user: Fix bad printf format specifiers</title>
<updated>2020-11-17T09:16:55+00:00</updated>
<author>
<name>AlexChen</name>
</author>
<published>2020-11-04T10:23:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=5fd6921cccdbc1428c888d451026ee4fd152c936'/>
<id>urn:sha1:5fd6921cccdbc1428c888d451026ee4fd152c936</id>
<content type='text'>
We should use printf format specifier "%u" instead of "%d" for
argument of type "unsigned int".

Reported-by: Euler Robot &lt;euler.robot@huawei.com&gt;
Signed-off-by: Alex Chen &lt;alex.chen@huawei.com&gt;
Message-Id: &lt;5FA28106.6000901@huawei.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost-user: fix VHOST_USER_ADD/REM_MEM_REG truncation</title>
<updated>2020-11-12T14:19:40+00:00</updated>
<author>
<name>Stefan Hajnoczi</name>
</author>
<published>2020-11-09T17:43:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=3009edff8192991293fe9e2b50b0d90db83c4a89'/>
<id>urn:sha1:3009edff8192991293fe9e2b50b0d90db83c4a89</id>
<content type='text'>
QEMU currently truncates the mmap_offset field when sending
VHOST_USER_ADD_MEM_REG and VHOST_USER_REM_MEM_REG messages. The struct
layout looks like this:

  typedef struct VhostUserMemoryRegion {
      uint64_t guest_phys_addr;
      uint64_t memory_size;
      uint64_t userspace_addr;
      uint64_t mmap_offset;
  } VhostUserMemoryRegion;

  typedef struct VhostUserMemRegMsg {
      uint32_t padding;
      /* WARNING: there is a 32-bit hole here! */
      VhostUserMemoryRegion region;
  } VhostUserMemRegMsg;

The payload size is calculated as follows when sending the message in
hw/virtio/vhost-user.c:

  msg-&gt;hdr.size = sizeof(msg-&gt;payload.mem_reg.padding) +
      sizeof(VhostUserMemoryRegion);

This calculation produces an incorrect result of only 36 bytes.
sizeof(VhostUserMemRegMsg) is actually 40 bytes.

The consequence of this is that the final field, mmap_offset, is
truncated. This breaks x86_64 TCG guests on s390 hosts. Other guest/host
combinations may get lucky if either of the following holds:
1. The guest memory layout does not need mmap_offset != 0.
2. The host is little-endian and mmap_offset &lt;= 0xffffffff so the
   truncation has no effect.

Fix this by extending the existing 32-bit padding field to 64-bit. Now
the padding reflects the actual compiler padding. This can be verified
using pahole(1).

Also document the layout properly in the vhost-user specification.  The
vhost-user spec did not document the exact layout. It would be
impossible to implement the spec without looking at the QEMU source
code.

Existing vhost-user frontends and device backends continue to work after
this fix has been applied. The only change in the wire protocol is that
QEMU now sets hdr.size to 40 instead of 36. If a vhost-user
implementation has a hardcoded size check for 36 bytes, then it will
fail with new QEMUs. Both QEMU and DPDK/SPDK don't check the exact
payload size, so they continue to work.

Fixes: f1aeb14b0809e313c74244d838645ed25e85ea63 ("Transmit vhost-user memory regions individually")
Cc: Raphael Norwitz &lt;raphael.norwitz@nutanix.com&gt;
Cc: Cornelia Huck &lt;cohuck@redhat.com&gt;
Cc: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-Id: &lt;20201109174355.1069147-1-stefanha@redhat.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Fixes: f1aeb14b0809 ("Transmit vhost-user memory regions individually")
Reviewed-by: Cornelia Huck &lt;cohuck@redhat.com&gt;
Reviewed-by: Raphael Norwitz &lt;raphael.norwitz@nutanix.com&gt;
</content>
</entry>
<entry>
<title>libvhost-user: follow QEMU comment style</title>
<updated>2020-11-03T21:39:05+00:00</updated>
<author>
<name>Stefan Hajnoczi</name>
</author>
<published>2020-10-27T17:35:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=de65d4978571769eae98e4d757b23dcd03313ba2'/>
<id>urn:sha1:de65d4978571769eae98e4d757b23dcd03313ba2</id>
<content type='text'>
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-Id: &lt;20201027173528.213464-2-stefanha@redhat.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>util/vhost-user-server: use static library in meson.build</title>
<updated>2020-10-23T12:42:16+00:00</updated>
<author>
<name>Stefan Hajnoczi</name>
</author>
<published>2020-09-24T15:15:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=3a213f83d99687e6648702421675a922ea71d593'/>
<id>urn:sha1:3a213f83d99687e6648702421675a922ea71d593</id>
<content type='text'>
Don't compile contrib/libvhost-user/libvhost-user.c again. Instead build
the static library once and then reuse it throughout QEMU.

Also switch from CONFIG_LINUX to CONFIG_VHOST_USER, which is what the
vhost-user tools (vhost-user-gpu, etc) do.

Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-id: 20200924151549.913737-14-stefanha@redhat.com
[Added CONFIG_LINUX again because libvhost-user doesn't build on macOS.
--Stefan]
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>libvhost-user: remove watch for kick_fd when de-initialize vu-dev</title>
<updated>2020-10-23T12:42:16+00:00</updated>
<author>
<name>Coiby Xu</name>
</author>
<published>2020-09-18T08:09:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=f1baeee9ffeddcc068d3536f90b5c3e9f81d9309'/>
<id>urn:sha1:f1baeee9ffeddcc068d3536f90b5c3e9f81d9309</id>
<content type='text'>
When the client is running in gdb and quit command is run in gdb,
QEMU will still dispatch the event which will cause segment fault in
the callback function.

Signed-off-by: Coiby Xu &lt;coiby.xu@gmail.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-id: 20200918080912.321299-3-coiby.xu@gmail.com
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
</feed>
