<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/net, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/net?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/net?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-11-27T18:36:17+00:00</updated>
<entry>
<title>Add G_GNUC_PRINTF to function qemu_set_info_str and fix related issues</title>
<updated>2022-11-27T18:36:17+00:00</updated>
<author>
<name>Stefan Weil via</name>
</author>
<published>2022-11-26T15:25:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=ac149498215809bfb5c0ddce1953519fbfda5004'/>
<id>urn:sha1:ac149498215809bfb5c0ddce1953519fbfda5004</id>
<content type='text'>
With the G_GNUC_PRINTF function attribute the compiler detects
two potential insecure format strings:

../../../net/stream.c:248:31: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    qemu_set_info_str(&amp;s-&gt;nc, uri);
                              ^~~
../../../net/stream.c:322:31: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    qemu_set_info_str(&amp;s-&gt;nc, uri);
                              ^~~

There are also two other warnings:

../../../net/socket.c:182:35: warning: zero-length gnu_printf format string [-Wformat-zero-length]
  182 |         qemu_set_info_str(&amp;s-&gt;nc, "");
      |                                   ^~
../../../net/stream.c:170:35: warning: zero-length gnu_printf format string [-Wformat-zero-length]
  170 |         qemu_set_info_str(&amp;s-&gt;nc, "");

Reviewed-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Signed-off-by: Stefan Weil &lt;sw@weilnetz.de&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-Id: &lt;20221126152507.283271-7-sw@weilnetz.de&gt;
</content>
</entry>
<entry>
<title>vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices</title>
<updated>2022-11-22T10:19:00+00:00</updated>
<author>
<name>Stefano Garzarella</name>
</author>
<published>2022-11-21T10:11:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=562a7d23bf9a2f978cea799af40a1b2b0b4fc71b'/>
<id>urn:sha1:562a7d23bf9a2f978cea799af40a1b2b0b4fc71b</id>
<content type='text'>
Commit 69e1c14aa2 ("virtio: core: vq reset feature negotation support")
enabled VIRTIO_F_RING_RESET by default for all virtio devices.

This feature is not currently emulated by QEMU, so for vhost and
vhost-user devices we need to make sure it is supported by the offloaded
device emulation (in-kernel or in another process).
To do this we need to add VIRTIO_F_RING_RESET to the features bitmap
passed to vhost_get_features(). This way it will be masked if the device
does not support it.

This issue was initially discovered with vhost-vsock and vhost-user-vsock,
and then also tested with vhost-user-rng which confirmed the same issue.
They fail when sending features through VHOST_SET_FEATURES ioctl or
VHOST_USER_SET_FEATURES message, since VIRTIO_F_RING_RESET is negotiated
by the guest (Linux &gt;= v6.0), but not supported by the device.

Fixes: 69e1c14aa2 ("virtio: core: vq reset feature negotation support")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1318
Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Message-Id: &lt;20221121101101.29400-1-sgarzare@redhat.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Acked-by: Raphael Norwitz &lt;raphael.norwitz@nutanix.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: Replace TAB indentations with spaces</title>
<updated>2022-11-11T08:39:03+00:00</updated>
<author>
<name>Ahmed Abouzied</name>
</author>
<published>2021-06-14T18:38:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=f469150be8d49649fa624b04c04795303aa635b1'/>
<id>urn:sha1:f469150be8d49649fa624b04c04795303aa635b1</id>
<content type='text'>
Replaces TABs with spaces, making sure to have a consistent coding style
of 4 space indentations in the net subsystem.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/377
Signed-off-by: Ahmed Abouzied &lt;email@aabouzied.com&gt;
Message-Id: &lt;20210614183849.20622-1-email@aabouzied.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
[thuth: Fixed mis-aligned indentation in some of the files]
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost-vdpa: fix assert !virtio_net_get_subqueue(nc)-&gt;async_tx.elem in virtio_net_reset</title>
<updated>2022-11-08T18:38:02+00:00</updated>
<author>
<name>Si-Wei Liu</name>
</author>
<published>2022-11-08T04:19:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=bc5add1dadcc140fef9af4fe215167e796cd1a58'/>
<id>urn:sha1:bc5add1dadcc140fef9af4fe215167e796cd1a58</id>
<content type='text'>
The citing commit has incorrect code in vhost_vdpa_receive() that returns
zero instead of full packet size to the caller. This renders pending packets
unable to be freed so then get clogged in the tx queue forever. When device
is being reset later on, below assertion failure ensues:

0  0x00007f86d53bb387 in raise () from /lib64/libc.so.6
1  0x00007f86d53bca78 in abort () from /lib64/libc.so.6
2  0x00007f86d53b41a6 in __assert_fail_base () from /lib64/libc.so.6
3  0x00007f86d53b4252 in __assert_fail () from /lib64/libc.so.6
4  0x000055b8f6ff6fcc in virtio_net_reset (vdev=&lt;optimized out&gt;) at /usr/src/debug/qemu/hw/net/virtio-net.c:563
5  0x000055b8f7012fcf in virtio_reset (opaque=0x55b8faf881f0) at /usr/src/debug/qemu/hw/virtio/virtio.c:1993
6  0x000055b8f71f0086 in virtio_bus_reset (bus=bus@entry=0x55b8faf88178) at /usr/src/debug/qemu/hw/virtio/virtio-bus.c:102
7  0x000055b8f71f1620 in virtio_pci_reset (qdev=&lt;optimized out&gt;) at /usr/src/debug/qemu/hw/virtio/virtio-pci.c:1845
8  0x000055b8f6fafc6c in memory_region_write_accessor (mr=&lt;optimized out&gt;, addr=&lt;optimized out&gt;, value=&lt;optimized out&gt;,
   size=&lt;optimized out&gt;, shift=&lt;optimized out&gt;, mask=&lt;optimized out&gt;, attrs=...) at /usr/src/debug/qemu/memory.c:483
9  0x000055b8f6fadce9 in access_with_adjusted_size (addr=addr@entry=20, value=value@entry=0x7f867e7fb7e8, size=size@entry=1,
   access_size_min=&lt;optimized out&gt;, access_size_max=&lt;optimized out&gt;, access_fn=0x55b8f6fafc20 &lt;memory_region_write_accessor&gt;,
   mr=0x55b8faf80a50, attrs=...) at /usr/src/debug/qemu/memory.c:544
10 0x000055b8f6fb1d0b in memory_region_dispatch_write (mr=mr@entry=0x55b8faf80a50, addr=addr@entry=20, data=0, op=&lt;optimized out&gt;,
   attrs=attrs@entry=...) at /usr/src/debug/qemu/memory.c:1470
11 0x000055b8f6f62ada in flatview_write_continue (fv=fv@entry=0x7f86ac04cd20, addr=addr@entry=549755813908, attrs=...,
   attrs@entry=..., buf=buf@entry=0x7f86d0223028 &lt;Address 0x7f86d0223028 out of bounds&gt;, len=len@entry=1, addr1=20, l=1,
   mr=0x55b8faf80a50) at /usr/src/debug/qemu/exec.c:3266
12 0x000055b8f6f62c8f in flatview_write (fv=0x7f86ac04cd20, addr=549755813908, attrs=...,
   buf=0x7f86d0223028 &lt;Address 0x7f86d0223028 out of bounds&gt;, len=1) at /usr/src/debug/qemu/exec.c:3306
13 0x000055b8f6f674cb in address_space_write (as=&lt;optimized out&gt;, addr=&lt;optimized out&gt;, attrs=..., buf=&lt;optimized out&gt;,
   len=&lt;optimized out&gt;) at /usr/src/debug/qemu/exec.c:3396
14 0x000055b8f6f67575 in address_space_rw (as=&lt;optimized out&gt;, addr=&lt;optimized out&gt;, attrs=..., attrs@entry=...,
   buf=buf@entry=0x7f86d0223028 &lt;Address 0x7f86d0223028 out of bounds&gt;, len=&lt;optimized out&gt;, is_write=&lt;optimized out&gt;)
   at /usr/src/debug/qemu/exec.c:3406
15 0x000055b8f6fc1cc8 in kvm_cpu_exec (cpu=cpu@entry=0x55b8f9aa0e10) at /usr/src/debug/qemu/accel/kvm/kvm-all.c:2410
16 0x000055b8f6fa5f5e in qemu_kvm_cpu_thread_fn (arg=0x55b8f9aa0e10) at /usr/src/debug/qemu/cpus.c:1318
17 0x000055b8f7336e16 in qemu_thread_start (args=0x55b8f9ac8480) at /usr/src/debug/qemu/util/qemu-thread-posix.c:519
18 0x00007f86d575aea5 in start_thread () from /lib64/libpthread.so.0
19 0x00007f86d5483b2d in clone () from /lib64/libc.so.6

Make vhost_vdpa_receive() return the size passed in as is, so that the
caller qemu_deliver_packet_iov() would eventually propagate it back to
virtio_net_flush_tx() to release pending packets from the async_tx queue.
Which corresponds to the drop path where qemu_sendv_packet_async() returns
non-zero in virtio_net_flush_tx().

Fixes: 846a1e85da64 ("vdpa: Add dummy receive callback")
Cc: Eugenio Perez Martin &lt;eperezma@redhat.com&gt;
Signed-off-by: Si-Wei Liu &lt;si-wei.liu@oracle.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Message-Id: &lt;20221108041929.18417-2-jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>net/vhost-vdpa.c: Fix clang compilation failure</title>
<updated>2022-10-31T17:01:31+00:00</updated>
<author>
<name>Peter Maydell</name>
</author>
<published>2022-10-31T13:29:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=5107fd3effb1cfec3b96d9e819f1605048640e31'/>
<id>urn:sha1:5107fd3effb1cfec3b96d9e819f1605048640e31</id>
<content type='text'>
Commit 8801ccd0500437 introduced a compilation failure with clang
version 10.0.0-4ubuntu1:

../../net/vhost-vdpa.c:654:16: error: variable 'vdpa_device_fd' is
used uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
    } else if (opts-&gt;has_vhostfd) {
               ^~~~~~~~~~~~~~~~~
../../net/vhost-vdpa.c:662:33: note: uninitialized use occurs here
    r = vhost_vdpa_get_features(vdpa_device_fd, &amp;features, errp);
                                ^~~~~~~~~~~~~~
../../net/vhost-vdpa.c:654:12: note: remove the 'if' if its condition
is always true
    } else if (opts-&gt;has_vhostfd) {
           ^~~~~~~~~~~~~~~~~~~~~~~
../../net/vhost-vdpa.c:629:23: note: initialize the variable
'vdpa_device_fd' to silence this warning
    int vdpa_device_fd;
                      ^
                       = 0
1 error generated.

It's a false positive -- the compiler doesn't manage to figure out
that the error checks further up mean that there's no code path where
vdpa_device_fd isn't initialized.  Put another way, the problem is
that we check "if (opts-&gt;has_vhostfd)" when in fact that condition
must always be true.  A cleverer static analyser would probably warn
that we were checking an always-true condition.

Fix the compilation failure by removing the unnecessary if().

Fixes: 8801ccd0500437 ("vhost-vdpa: allow passing opened vhostfd to vhost-vdpa")
Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Message-Id: &lt;20221031132901.1277150-1-peter.maydell@linaro.org&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: stream: add QAPI events to report connection state</title>
<updated>2022-10-28T05:28:52+00:00</updated>
<author>
<name>Laurent Vivier</name>
</author>
<published>2022-10-21T09:09:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=e506fee8b1e092f6ac6f9459bf6a35b807644ad2'/>
<id>urn:sha1:e506fee8b1e092f6ac6f9459bf6a35b807644ad2</id>
<content type='text'>
The netdev reports NETDEV_STREAM_CONNECTED event when the backend
is connected, and NETDEV_STREAM_DISCONNECTED when it is disconnected.

The NETDEV_STREAM_CONNECTED event includes the destination address.

This allows a system manager like libvirt to detect when the server
fails.

For instance with passt:

{ 'execute': 'qmp_capabilities' }
{ "return": { } }
{ "timestamp": { "seconds": 1666341395, "microseconds": 505347 },
    "event": "NETDEV_STREAM_CONNECTED",
    "data": { "netdev-id": "netdev0",
        "addr": { "path": "/tmp/passt_1.socket", "type": "unix" } } }

[killing passt here]

{ "timestamp": { "seconds": 1666341430, "microseconds": 968694 },
    "event": "NETDEV_STREAM_DISCONNECTED",
    "data": { "netdev-id": "netdev0" } }

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: stream: move to QIO to enable additional parameters</title>
<updated>2022-10-28T05:28:52+00:00</updated>
<author>
<name>Laurent Vivier</name>
</author>
<published>2022-10-21T09:09:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=1f9c890fa3b6a09b34aea915500f9f002b5d9d60'/>
<id>urn:sha1:1f9c890fa3b6a09b34aea915500f9f002b5d9d60</id>
<content type='text'>
Use QIOChannel, QIOChannelSocket and QIONetListener.
This allows net/stream to use all the available parameters provided by
SocketAddress.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: dgram: add unix socket</title>
<updated>2022-10-28T05:28:52+00:00</updated>
<author>
<name>Laurent Vivier</name>
</author>
<published>2022-10-21T09:09:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=784e7a2531040824f88f33494be256a9e331e219'/>
<id>urn:sha1:784e7a2531040824f88f33494be256a9e331e219</id>
<content type='text'>
Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Reviewed-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Markus Armbruster &lt;armbru@redhat.com&gt; (QAPI schema)
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: dgram: move mcast specific code from net_socket_fd_init_dgram()</title>
<updated>2022-10-28T05:28:52+00:00</updated>
<author>
<name>Laurent Vivier</name>
</author>
<published>2022-10-21T09:09:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=8ecc7f40bc76f2a565a74d1e5b2d7462cf050f1d'/>
<id>urn:sha1:8ecc7f40bc76f2a565a74d1e5b2d7462cf050f1d</id>
<content type='text'>
It is less complex to manage special cases directly in
net_dgram_mcast_init() and net_dgram_udp_init().

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Reviewed-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: dgram: make dgram_dst generic</title>
<updated>2022-10-28T05:28:52+00:00</updated>
<author>
<name>Laurent Vivier</name>
</author>
<published>2022-10-21T09:09:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=7c1f0c33cc9d7436172da0882f088b3cfc8a0733'/>
<id>urn:sha1:7c1f0c33cc9d7436172da0882f088b3cfc8a0733</id>
<content type='text'>
dgram_dst is a sockaddr_in structure. To be able to use it with
unix socket, use a pointer to a generic sockaddr structure.

Rename it dest_addr, and store socket length in dest_len.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Reviewed-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
</feed>
