[RFC PATCH 0/1] hw/display/xenfb: always register vfb and allocate console early
Dario Faggioli <[email protected]>
| Newsgroups | org.xenproject.lists.xen-devel,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, We've been having an issue with Xen PV and PVH guests' console since: https://bugzilla.suse.com/show_bug.cgi?id=1232712 https://lists.nongnu.org/archive/html/qemu-devel/2024-12/msg02294.html Back then, until our QEMU 11.0 package, I "solved" it locally by reverting these two commits: 6ece1df966 hw/xen: Register framebuffer backend via xen_backend_init() e99441a379 ui/curses: Do not use console_select() For the 11.1 package, I decided it was enough and finally managed to find the time to investigate a bit more (and, yes, I know I should have done this earlier, but never could... Sorry :-( ). From my debugging, these are the problems: 1. Commit 6ece1df966 restricted the vfb backend registration under an 'if (vga_interface_type == VGA_XENFB)'. However, it can happen that the -vga parameter is just not provided (e.g., for PV and PVH guests) and the backend is never initialized. 2. Once the backend is registered, xenfb defers the QemuConsole creation to fb_initialise(). The VNC server, though, starts earlier, finds no active consoles, and binds to the dummy surface (black screen showing the message "This VM has no graphic display device"). Furthermore, since the removal of console_select(), such surface is never dropped for switching to the actual xenfb console. I have drafted a patch to address both issues. It removes the vga_interface_type check and moves qemu_graphic_console_create() to fb_init() so the console is created "early enough". I am sending this as an RFC because, although it fixes the problem in my testing, I am no expert in the QEMU UI subsystem and I am not sure that these are the correct and/or the best solutions. I'm happy to try to come up and/or to test different approaches and/or patches. Thanks and Regards, Dario Dario Faggioli (1): hw/display/xenfb: always register vfb and allocate console early hw/display/xenfb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.55.0