Re: [PULL 0/5] QTest patches for 2025-01-17

2025-01-19 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

[no subject]

2025-01-19 Thread Emir Dalan
Dear project qemu-t0830 I am trying to setup project but I can’t errors and can’t find out how can you help me with that using macOS From emr09

Re: [PATCH 1/2] net: Fix announce_self

2025-01-19 Thread Jason Wang
On Fri, Jan 17, 2025 at 7:17 PM Laurent Vivier wrote: > > b9ad513e1876 ("net: Remove receive_raw()") adds an iovec entry > in qemu_deliver_packet_iov() to add the virtio-net header > in the data when QEMU_NET_PACKET_FLAG_RAW is set but forgets > to increase the number of iovec entries in the array

Re: [PATCH 2/2] net/dump: Correctly compute Ethernet packet offset

2025-01-19 Thread Jason Wang
On Fri, Jan 17, 2025 at 7:17 PM Laurent Vivier wrote: > > When a packet is sent with QEMU_NET_PACKET_FLAG_RAW by QEMU it > never includes virtio-net header even if qemu_get_vnet_hdr_len() > is not 0, and filter-dump is not managing this case. > > The only user of QEMU_NET_PACKET_FLAG_RAW is announ

Re: [PATCH] tap-linux: Open ipvtap and macvtap

2025-01-19 Thread Jason Wang
On Thu, Jan 16, 2025 at 1:27 PM Akihiko Odaki wrote: > > On 2025/01/16 10:17, Jason Wang wrote: > > On Wed, Jan 15, 2025 at 1:17 PM Akihiko Odaki > > wrote: > >> > >> On 2025/01/13 11:59, Jason Wang wrote: > >>> On Sat, Jan 11, 2025 at 1:43 PM Akihiko Odaki > >>> wrote: > > Hi Jason,

Re: [PULL 00/68] tcg patch queue

2025-01-19 Thread Richard Henderson
On 1/18/25 15:49, Stefan Hajnoczi wrote: Hi Richard, 1. This pull request is not a signed tag. Please push a signed tag. 2. I can't find a key for richard.hender...@linaro.org on keys.openpgp.org. Please check again and send the key fingerprint. It is a signed tag: $ git tag -v pull-tcg-20

[PATCH v3, do not apply] vvfat: refresh writing long filename

2025-01-19 Thread Michael Tokarev
In function create_long_filname(), the array name[8 + 3] in struct direntry_t is used as if it were defined as name[32]. This is intentional and works. It's nevertheless an out of bounds array access. To avoid this problem, this patch adds a struct lfn_direntry_t with multiple name arrays. A direct

Re: [PATCH 3/9] qtest/e1000e|igb: assert irqs are clear before triggering an irq

2025-01-19 Thread Yan Vugenfirer
On Fri, Jan 17, 2025 at 7:05 PM Nicholas Piggin wrote: > Assert there is no existing irq raised that would lead to a false > positive interrupt test. > > e1000e has to disable interrupt throttling for this test, because > it can cause delayed superfluous interrupts which trip the assertions. > >

[PATCH] vvfat: create_long_filename(): refresh

2025-01-19 Thread Michael Tokarev
add comments explaining what is going on (since long file names are really weird), rewrite the second loop to do one UTF16 char at a time instead of byte, and fix coding style. Signed-off-by: Michael Tokarev --- block/vvfat.c | 54 +-- 1 file chan

Re: [PATCH 1/2] hw/pci/msix: Warn on PBA writes

2025-01-19 Thread Phil Dennis-Jordan
On Fri, 17 Jan 2025 at 18:29, Nicholas Piggin wrote: > Of the MSI-X PBA pending bits, the PCI Local Bus Specification says: > > Software should never write, and should only read > Pending Bits. If software writes to Pending Bits, the > result is undefined. > > Log a GUEST_ERROR message if t

Re: [PATCH 2/2] hw/pci: Assert a bar is not registered multiple times

2025-01-19 Thread Phil Dennis-Jordan
Looks good to me. There is a risk here that the assertion will fail on existing code. (Unless you've rigorously audited all callers, which would be quite the task.) However, I agree that this would constitute a bug in the calling code, not an issue with this change. Since we've still got a few mont

[PATCH v5 4/8] virtio-gpu: Support asynchronous fencing

2025-01-19 Thread Dmitry Osipenko
Support asynchronous fencing feature of virglrenderer. It allows Qemu to handle fence as soon as it's signalled instead of periodically polling the fence status. This feature is required for enabling DRM context support in Qemu because legacy fencing mode isn't supported for DRM contexts in virglre

[PATCH v5 2/8] ui/sdl2: Implement dpy dmabuf functions

2025-01-19 Thread Dmitry Osipenko
From: Pierre-Eric Pelloux-Prayer If EGL is used, we can rely on dmabuf to import textures without doing copies. To get this working on X11, we use the existing SDL hint: SDL_HINT_VIDEO_X11_FORCE_EGL (because dmabuf can't be used with GLX). Reviewed-by: Akihiko Odaki Acked-by: Michael S. Tsirki

[PATCH v5 5/8] virtio-gpu: Support DRM native context

2025-01-19 Thread Dmitry Osipenko
Add support for DRM native contexts to VirtIO-GPU. DRM context is enabled using a new virtio-gpu-gl device option "drm_native_context=on". Unlike Virgl and Venus contexts that operate on application API level, DRM native contexts work on a kernel UAPI level. This lower level results in a lightweig

[PATCH v5 8/8] docs/system: Expand the virtio-gpu documentation

2025-01-19 Thread Dmitry Osipenko
From: Alex Bennée This attempts to tidy up the VirtIO GPU documentation to make the list of requirements clearer. There are still a lot of moving parts and the distros have some catching up to do before this is all handled automatically. Signed-off-by: Alex Bennée Cc: Dmitry Osipenko Cc: Sergi

[PATCH v5 6/8] ui/sdl2: Don't disable scanout when display is refreshed

2025-01-19 Thread Dmitry Osipenko
Display refreshment is invoked by a timer and it erroneously disables the active scanout if it happens to be invoked after scanout has been enabled. This offending scanout-disable race condition with a timer can be easily hit when Qemu runs with a disabled vsync by using SDL or GTK displays (with v

[PATCH v5 0/8] Support virtio-gpu DRM native context

2025-01-19 Thread Dmitry Osipenko
This patchset adds DRM native context support to VirtIO-GPU on Qemu. Contarary to Virgl and Venus contexts that mediates high level GFX APIs, DRM native context [1] mediates lower level kernel driver UAPI, which reflects in a less CPU overhead and less/simpler code needed to support it. DRM contex

[PATCH v5 3/8] virtio-gpu: Handle virgl fence creation errors

2025-01-19 Thread Dmitry Osipenko
Print out error messages when virgl fence creation fails to aid debugging of the fence-related bugs. Reviewed-by: Akihiko Odaki Acked-by: Michael S. Tsirkin Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) dif

[PATCH v5 7/8] ui/gtk: Don't disable scanout when display is refreshed

2025-01-19 Thread Dmitry Osipenko
Display refreshment is invoked by a timer and it erroneously disables the active scanout if it happens to be invoked after scanout has been enabled. This offending scanout-disable race condition with a timer can be easily hit when Qemu runs with a disabled vsync by using SDL or GTK displays (with v

[PATCH v5 1/8] ui/sdl2: Restore original context after new context creation

2025-01-19 Thread Dmitry Osipenko
SDL API changes GL context to a newly created GL context, which differs from other GL providers that don't switch context. Change SDL backend to restore the original GL context. This allows Qemu's virtio-gpu to support new virglrenderer async-fencing feature for Virgl contexts, otherwise virglrende

[PATCH] vvfat: create_long_filename: fix out-of-bounds array access

2025-01-19 Thread Michael Tokarev
create_long_filename() intentionally uses direntry_t->name[8+3] array as a larger array. This works, but makes statid code analysis tools unhappy. The problem here is that a directory entry holding long file name is significantly different from regular directory entry, and the name is split into

Re: [PATCH] vvfat: refresh writing long filename

2025-01-19 Thread Michael Tokarev
19.01.2025 04:07, BALATON Zoltan wrote: On Sun, 19 Jan 2025, Michael Tokarev wrote: 18.01.2025 23:54, BALATON Zoltan wrote: +typedef struct lfn_direntry_t { +    uint8_t sequence; +    uint8_t name01[10]; +    uint8_t attributes; +    uint8_t direntry_type; +    uint8_t sfn_checksum; +    uint8

[PATCH 1/3] hw/mem/cxl_type3: Add paired msix_uninit_exclusive_bar() call

2025-01-19 Thread Li Zhijian via
msix_uninit_exclusive_bar() should be paired with msix_init_exclusive_bar() Ensure proper resource cleanup by adding the missing `msix_uninit_exclusive_bar()` call for the Type3 CXL device. Signed-off-by: Li Zhijian --- hw/mem/cxl_type3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw

[PATCH 2/3] hw/mem/cxl_type3: Fix special_ops memory leak on msix_init_exclusive_bar() failure

2025-01-19 Thread Li Zhijian via
Address a memory leak issue by ensuring `regs->special_ops` is freed when `msix_init_exclusive_bar()` encounters an error during CXL Type3 device initialization. Additionally, this patch renames err_address_space_free to err_msix_uninit for better clarity and logical flow Signed-off-by: Li Zhijia

[PATCH 3/3] hw/mem/cxl_type3: Ensure errp is set on realization failure

2025-01-19 Thread Li Zhijian via
Simply pass the errp to its callee which will set errp if needed, to enhance error reporting for CXL Type 3 device initialization by setting the errp when realization functions fail. Previously, failing to set `errp` could result in errors being overlooked, causing the system to mistakenly treat f

[PATCH v6 2/3] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-19 Thread Ani Sinha
At present, the libqos/fw_cfg.c library does not support the modern DMA interface which is required to write to the fw_cfg files. It only uses the IO interface. Implement read and write methods based on DMA. This will enable developers to add tests that writes to the fw_cfg file(s). The structure o

[PATCH v6 1/3] libqos/fw_cfg: refactor file directory iteraton to make it more reusable

2025-01-19 Thread Ani Sinha
fw-cfg file directory iteration code can be used by other functions that may want to implement fw-cfg file operations. Refactor it into a smaller helper so that it can be reused. No functional change. Signed-off-by: Ani Sinha Reviewed-by: Fabiano Rosas --- tests/qtest/libqos/fw_cfg.c | 63 +++

[PATCH v6 3/3] tests/qtest/vmcoreinfo: add a unit test to exercize basic vmcoreinfo function

2025-01-19 Thread Ani Sinha
A new qtest is written that exercizes the fw-cfg DMA based read and write ops to write values into vmcoreinfo fw-cfg file and read them back and verify that they are the same. Signed-off-by: Ani Sinha --- MAINTAINERS | 2 + tests/qtest/meson.build | 1 + tests/qtest/vmc

[PATCH v6 0/3] tests/qtest/libqos: add DMA support for writing and reading fw_cfg files

2025-01-19 Thread Ani Sinha
This patchset enables DMA interface support for writing fw-cfg files in libqtest. The first patch is just a code refactoring so that fw-cfg directory parsing can be part of a separate helper function. The second patch is the actual patch that introduces two new apis for writing and reading fw-cfg f

Re: [PATCH v3 2/4] qtest/libqos/pci: Enforce balanced iomap/unmap

2025-01-19 Thread Philippe Mathieu-Daudé
Hi Nick, Only nitpicking comments... On 17/1/25 18:22, Nicholas Piggin wrote: Add assertions to ensure a BAR is not mapped twice, and only previously mapped BARs are unmapped. This can help catch some bugs. Reviewed-by: Fabiano Rosas Signed-off-by: Nicholas Piggin --- tests/qtest/libqos/ah