Skip to content

RFC hw/display/xenfb: always register vfb and allocate console early

Dario Faggioli qemu-devel xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1hw/display/xenfb: always register vfb and allocate console earlyhw/display/xenfb.c+6 -62 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/1] hw/display/xenfb: always register vfb and allocate console early

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(-)
Signature · 1 line
2.55.0