Repository navigation
Conversation
Carry three QEMU master commits that the display patches after them are written against: - 5378d1da44 ui/dbus: disable scanout iff dmabuf is current - 7275e5d1ba ui/dbus: fix cursor race, copy cursor data - 378eb3d0db ui/dbus: add org.qemu.Display1.UIInfo interface EVE builds QEMU without the D-Bus display, so they change nothing in today's build. They keep one patch set for builds that enable it. Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
Add a series written for upstream QEMU, where it is pending, as patches 1002-1021. EVE gives a VM with VNC a virtio-vga, or a virtio-gpu-pci on arm, and for those: - a VNC client's resize keeps what other UIs asked for, and the console starts from the size the device starts with, so a first request for no monitor reaches the device; - a display event the guest clears before reading the display info is raised again, once, and an output that goes away and comes back before the guest looked is held back until it has, so the guest sees every change; - a virtio-gpu output configured with no size is refused; - the EDID writes names of 13 characters, keeps the name and serial number in the base block, and takes the product code and serial number as numbers. Its descriptors change order, with the same content: a guest sees the same monitor, with the same modes. The rest takes effect only with the D-Bus display and GL, which EVE does not build today: the monitor's identity in the EDID, a "connected" key for D-Bus clients, and the fixes for a scanout with no texture, including the texture leaked on every guest device reset. The series brings qtests and a unit test for the EDID generator, which EVE does not build. Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7196 +/- ##
==========================================
+ Coverage 30.99% 31.45% +0.46%
==========================================
Files 562 573 +11
Lines 101231 102826 +1595
==========================================
+ Hits 31380 32349 +969
- Misses 67412 68077 +665
+ Partials 2439 2400 -39 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rene
left a comment
There was a problem hiding this comment.
🤖 This review was written by Claude (Anthropic's AI assistant, via Claude Code) and posted at the request of the account owner. It is based on reading the patches against the QEMU v11.1.3 sources; nothing was built or booted for it.
Thanks for the detailed description and for splitting the backports from the pending patches.
I went through every hunk that lands in code EVE compiles today (VNC + virtio-vga/virtio-gpu-pci, no GL, no D-Bus). My understanding is that the D-Bus part is groundwork for the graphical console and is expected to stay disabled for now, so I focused on what changes for existing VMs.
For the current VNC path I see only two behaviour changes:
- EDID bytes (1015-1018): the established timings III descriptor moves after the monitor name, and the 1400x1050 entry is corrected. Vendor, product, serial, name and preferred mode are unchanged.
- Display event re-raise (1007): runs for every guest on every resize. Linux reads the display info before clearing the event, so nothing changes there. A driver that clears first gets each event twice.
The rest of the compiled changes (hold-back in 1008, identity in 1019, the vfio display EDID path, the zero-size check) need inputs that VNC can't produce or that EVE doesn't configure.
Requests before merge:
- The device test boxes are unchecked. Could you run one Windows guest and one Linux guest with VNC: boot to desktop, resize from noVNC a few times, reboot the guest, and on Windows confirm the monitor entry in Device Manager is unchanged? Windows is the one I'd most like to see, because of item 2 (I don't know in which order viogpu clears the event and reads the display info).
- 20 of the patches are
Upstream-Status: Pendingand touch files that move often upstream (ui/console.c,virtio-gpu-base.c,edid-generate.c). Could you link the upstream submission in the PR description or inpkg/qemu/patches/README.md, so we can track it and drop the patches when they land? - Since EVE's build doesn't compile
ui/dbus-*.cor the virgl code, a bad rebase of 0002-0004, 1010-1012, 1014, 1020 and 1021 at a QEMU bump would go unnoticed. Worth a note in the README that these need a build with--enable-dbus-display --enable-openglwhen they are rebased.
A few comments inline; none of them affect the VNC path today, but they are worth fixing before the series goes upstream.
| + * display event twice, and reads the display info once more; one that | ||
| + * clears it again without reading has no use for it. | ||
| + */ | ||
| +void virtio_gpu_base_events_clear(VirtIOGPUBase *g, uint32_t events_clear) |
There was a problem hiding this comment.
set_config is called on every config-space write with the whole cached config, and events_clear stays set there until the next config read. A guest that writes events_clear in more than one access (e.g. byte-wise) re-raises the event on the first access and clears the re-raised one on the second, so it takes the interrupt, reads events_read == 0, and keeps the stale display info. Linux writes it as a single 32-bit access, so it is not affected. Could the clear act only when the write actually covers events_clear?
🤖 Written by Claude (Claude Code).
|
|
||
| for (i = 0; i < g->parent_obj.conf.max_outputs; i++) { | ||
| qemu_console_set_surface(g->parent_obj.scanout[i].con, NULL); | ||
| + qemu_console_gl_scanout_disable(g->parent_obj.scanout[i].con); |
There was a problem hiding this comment.
Order: this sets the placeholder surface and then disables the GL scanout, so a D-Bus GL listener gets Scanout(placeholder) followed by Disable, and 1012 then drops updates while gl_scanout is false. qemu_graphic_console_close() does it the other way round (disable, then replace the surface). No effect with VNC, where the disable is a no-op.
🤖 Written by Claude (Claude Code).
| + ddl->gl_scanout = true; | ||
| + ddl->scanout_failed = false; | ||
| + } else { | ||
| + dbus_scanout_disable(dcl); |
There was a problem hiding this comment.
The commit message says the failure is reported once, but the else branches in dbus_scanout_dmabuf() / dbus_scanout_texture() call dbus_scanout_disable() directly, so scanout_failed is never set. A peer that only implements ScanoutDMABUF v1 with a multi-plane guest gets an error_report() and a Disable call per frame. Routing these through dbus_scanout_failed() would fix it.
🤖 Written by Claude (Claude Code).
| } | ||
| } | ||
|
|
||
| + for (i = 0; i < g->conf.max_outputs; i++) { |
There was a problem hiding this comment.
Nit: -device virtio-gpu-pci,xres=0 used to start (guest fell back to its default mode) and now fails at realize. EVE never sets it, so this is fine here, but upstream may see it as a compatibility break; falling back to the EDID default instead of failing would avoid that.
🤖 Written by Claude (Claude Code).
Description
This PR adds a QEMU display patch series to
pkg/qemu. It contains QEMU patches only; the EVE graphical console that uses them is not part of it.It has two commits:
pkg/qemu: backport the D-Bus display fixes and the UIInfo interface. It backports three QEMU master commits: 5378d1da44, 7275e5d1ba, and 378eb3d0db (theorg.qemu.Display1.UIInfointerface). The series is written against them. EVE builds QEMU without the D-Bus display, so they change nothing in today's build.pkg/qemu: tell a virtio-gpu guest every monitor change. It adds 20 patches written for upstream QEMU, where they are pending, as1002-1021.EVE gives a VM with VNC a
virtio-vga(virtio-gpu-pcion arm). For those VMs the series changes this:A VNC client's resize keeps what other UIs asked for, instead of resetting it.
The console starts from the size the device starts with, so a first request for "no monitor" reaches the device.
The guest is told of every monitor change:
A virtio-gpu output configured with a zero size is refused. EVE never configures one.
The EDID:
Its descriptors change order, with the same content. A guest sees the same monitor (same manufacturer, product and serial) and the same modes.
Everything else takes effect only with the D-Bus display and GL, which EVE does not build yet:
connectedkey for D-Bus clients;These are the parts EVE's graphical console will use.
The series brings qtests and a unit test for the EDID generator. EVE does not build them.
How to test and validate this PR
Done:
patch -p1 --fuzz=0to a clean QEMU v11.1.3, as the Dockerfile applies them. The result is byte-identical to the patch branch they were generated from.-Werrorand no warnings, with master's configure options (--disable-opengl --disable-dbus-display, VNC on), forx86_64-softmmuandaarch64-softmmu.make pkg/qemubuilds.-Werror;tests/qtest/dbus-display-test(34 subtests) andtests/unit/test-edidpass at every commit;To check on a device, run a VM with VNC (Linux or Windows guest, virtio-vga):
xrandr --verboseoredid-decode /sys/class/drm/*/edid.Changelog notes
QEMU: a VM's virtio-gpu display reports monitor changes, such as a VNC client resizing the display, to the guest more reliably.
PR Backports
pkg/qemu(QEMU comes withxen-toolsthere).pkg/qemu(QEMU comes withxen-toolsthere).pkg/qemu(QEMU comes withxen-toolsthere).pkg/qemu(QEMU comes withxen-toolsthere).Checklist
And the last but not least: