<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/ebpf, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/ebpf?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/ebpf?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2024-06-04T07:14:26Z</updated>
<entry>
<title>ebpf: Added traces back. Changed source set for eBPF to 'system'.</title>
<updated>2024-06-04T07:14:26Z</updated>
<author>
<name>Andrew Melnychenko</name>
<email>andrew@daynix.com</email>
</author>
<published>2024-04-22T13:51:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=dcab53611191f50cf4feabc1d8794d04afe53407'/>
<id>urn:sha1:dcab53611191f50cf4feabc1d8794d04afe53407</id>
<content type='text'>
There was an issue with Qemu build with "--disable-system".
The traces could be generated and the build fails.
The traces were 'cut out' for previous patches, and overall,
the 'system' source set should be used like in pre-'eBPF blob' patches.

Signed-off-by: Andrew Melnychenko &lt;andrew@daynix.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>ebpf: Return 0 when configuration fails</title>
<updated>2024-06-04T07:14:26Z</updated>
<author>
<name>Akihiko Odaki</name>
<email>akihiko.odaki@daynix.com</email>
</author>
<published>2024-04-28T07:00:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=8dc8220e23a6d16415b6a0a46785224e8bc7edd1'/>
<id>urn:sha1:8dc8220e23a6d16415b6a0a46785224e8bc7edd1</id>
<content type='text'>
The kernel interprets the returned value as an unsigned 32-bit so -1
will mean queue 4294967295, which is awkward. Return 0 instead.

Signed-off-by: Akihiko Odaki &lt;akihiko.odaki@daynix.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>ebpf: Fix RSS error handling</title>
<updated>2024-06-04T07:14:26Z</updated>
<author>
<name>Akihiko Odaki</name>
<email>akihiko.odaki@daynix.com</email>
</author>
<published>2024-04-28T07:00:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=72fa42cfca7060fab00c534e71fc850b194a4c6d'/>
<id>urn:sha1:72fa42cfca7060fab00c534e71fc850b194a4c6d</id>
<content type='text'>
calculate_rss_hash() was using hash value 0 to tell if it calculated
a hash, but the hash value may be 0 on a rare occasion. Have a
distinct bool value for correctness.

Fixes: f3fa412de2 ("ebpf: Added eBPF RSS program.")
Signed-off-by: Akihiko Odaki &lt;akihiko.odaki@daynix.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>ebpf: Restrict to system emulation</title>
<updated>2024-04-18T09:17:27Z</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
<email>philmd@linaro.org</email>
</author>
<published>2024-04-08T15:53:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=bb23c33f9381a8986798deb896cd15c2c0932cc6'/>
<id>urn:sha1:bb23c33f9381a8986798deb896cd15c2c0932cc6</id>
<content type='text'>
eBPF is not used in user emulation.

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-ID: &lt;20240404194757.9343-2-philmd@linaro.org&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-ID: &lt;20240408155330.522792-4-pbonzini@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>ebpf: Fix indirections table setting</title>
<updated>2024-03-29T06:59:00Z</updated>
<author>
<name>Akihiko Odaki</name>
<email>akihiko.odaki@daynix.com</email>
</author>
<published>2024-03-27T02:05:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=ba6bb2ec953f10751f174b6f7da8fe7e5f008c08'/>
<id>urn:sha1:ba6bb2ec953f10751f174b6f7da8fe7e5f008c08</id>
<content type='text'>
The kernel documentation says:
&gt; The value stored can be of any size, however, all array elements are
&gt; aligned to 8 bytes.
https://www.kernel.org/doc/html/v6.8/bpf/map_array.html

Fixes: 333b3e5fab75 ("ebpf: Added eBPF map update through mmap.")
Signed-off-by: Akihiko Odaki &lt;akihiko.odaki@daynix.com&gt;
Acked-by: Andrew Melnychenko &lt;andrew@daynix.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>ebpf: Updated eBPF program and skeleton.</title>
<updated>2024-03-12T11:31:47Z</updated>
<author>
<name>Andrew Melnychenko</name>
<email>andrew@daynix.com</email>
</author>
<published>2024-02-05T16:54:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=0cc14182aba961f4c34a21dd202ce6e4a87470f5'/>
<id>urn:sha1:0cc14182aba961f4c34a21dd202ce6e4a87470f5</id>
<content type='text'>
Updated section name, so libbpf should init/gues proper
program type without specifications during open/load.
Also, added map_flags with explicitly declared BPF_F_MMAPABLE.
Added check for BPF_F_MMAPABLE flag to meson script and
requirements to libbpf version.
Also changed fragmentation flag check - some TCP/UDP packets
may be considered fragmented if DF flag is set.

Signed-off-by: Andrew Melnychenko &lt;andrew@daynix.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>qmp: Added new command to retrieve eBPF blob.</title>
<updated>2024-03-12T11:31:47Z</updated>
<author>
<name>Andrew Melnychenko</name>
<email>andrew@daynix.com</email>
</author>
<published>2024-03-12T10:57:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=e88899fa90635da7f5c1e245028288755bb5fbd4'/>
<id>urn:sha1:e88899fa90635da7f5c1e245028288755bb5fbd4</id>
<content type='text'>
Now, the binary objects may be retrieved by id.
It would require for future qmp commands that may require specific
eBPF blob.

Added command "request-ebpf". This command returns
eBPF program encoded base64. The program taken from the
skeleton and essentially is an ELF object that can be
loaded in the future with libbpf.

The reason to use the command to provide the eBPF object
instead of a separate artifact was to avoid issues related
to finding the eBPF itself. eBPF object is an ELF binary
that contains the eBPF program and eBPF map description(BTF).
Overall, eBPF object should contain the program and enough
metadata to create/load eBPF with libbpf. As the eBPF
maps/program should correspond to QEMU, the eBPF can't
be used from different QEMU build.

The first solution was a helper that comes with QEMU
and loads appropriate eBPF objects. And the issue is
to find a proper helper if the system has several
different QEMUs installed and/or built from the source,
which helpers may not be compatible.

Another issue is QEMU updating while there is a running
QEMU instance. With an updated helper, it may not be
possible to hotplug virtio-net device to the already
running QEMU. Overall, requesting the eBPF object from
QEMU itself solves possible failures with acceptable effort.

Links:
[PATCH 3/5] qmp: Added the helper stamp check.
https://lore.kernel.org/all/20230219162100.174318-4-andrew@daynix.com/

Signed-off-by: Andrew Melnychenko &lt;andrew@daynix.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>ebpf: Added eBPF initialization by fds.</title>
<updated>2024-03-12T11:31:46Z</updated>
<author>
<name>Andrew Melnychenko</name>
<email>andrew@daynix.com</email>
</author>
<published>2024-02-05T16:54:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=0524ea0510a33c616d87108d71a8456071e9daa1'/>
<id>urn:sha1:0524ea0510a33c616d87108d71a8456071e9daa1</id>
<content type='text'>
It allows using file descriptors of eBPF provided
outside of QEMU.
QEMU may be run without capabilities for eBPF and run
RSS program provided by management tool(g.e. libvirt).

Signed-off-by: Andrew Melnychenko &lt;andrew@daynix.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>ebpf: Added eBPF map update through mmap.</title>
<updated>2024-03-12T11:31:46Z</updated>
<author>
<name>Andrew Melnychenko</name>
<email>andrew@daynix.com</email>
</author>
<published>2024-02-05T16:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=333b3e5fab751cce9f077b827563296c797ff399'/>
<id>urn:sha1:333b3e5fab751cce9f077b827563296c797ff399</id>
<content type='text'>
Changed eBPF map updates through mmaped array.
Mmaped arrays provide direct access to map data.
It should omit using bpf_map_update_elem() call,
which may require capabilities that are not present.

Signed-off-by: Andrew Melnychenko &lt;andrew@daynix.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>trace-events: Fix the name of the tracing.rst file</title>
<updated>2023-09-08T10:08:51Z</updated>
<author>
<name>Thomas Huth</name>
<email>thuth@redhat.com</email>
</author>
<published>2023-08-14T17:12:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=64a917d5d64fed010acc350855323ac688dbe477'/>
<id>urn:sha1:64a917d5d64fed010acc350855323ac688dbe477</id>
<content type='text'>
The file has been converted to .rst a while ago - make sure that the
references in the trace-events files are pointing to the right location
now.

Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
Signed-off-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
</content>
</entry>
</feed>
