Skip to contentSkip to conversation

Overview of exposing graphical desktop from DomU...framebuffers, etc.

DISCUSSION David Stone 2 participants 4 messages Oct 26, 2007 – Nov 13, 2007

lore
Share & tools
lore
#0 lore raw

Hi folks, I am hoping somebody could give an overview of the xen framebuffer/graphics architecture...at the level of what processes and drivers are involved in a Linux DomU and Dom0, how they are set up, how information control flows between them, etc. (Running 3.0.3, I see xen-vncfc in Dom0 and xenfb in domU).

I'm primarily interested in understanding on how things work in a PV DomU, but also in a HVM DomU.

I guess I'm not clear on why Xen has to do anything for this...doesn't xvnc provide a framebuffer that can be accessed via VNC, and wouldn't this be outside the scope of Xen?

Thanks,
Dave

#1 lore raw
Quoted 8 lines · David Stone

Hi folks, I am hoping somebody could give an overview of the xen framebuffer/graphics architecture...at the level of what processes and drivers are involved in a Linux DomU and Dom0, how they are set up, how information control flows between them, etc. (Running 3.0.3, I see xen-vncfc in Dom0 and xenfb in domU).

I'm primarily interested in understanding on how things work in a PV DomU, but also in a HVM DomU.

The PV framebuffer is an almost-ordinary split device driver[*]:
there's a frontend in domU and a backend in dom0, talking to each other through Xenbus.

The frontend is a Linux device driver, living in drivers/xen/fbfront/. Actually, it's a pair of drivers, one for the frame buffer (vfb), and one for keyboard and mouse (vkbd, two devices).

Unlike other split drivers, the backend is in user space. It used to be a separate program (either xen-vncfb or xen-sdlfb) under the control of xend. It's been merged in qemu-dm recently, running under the control of xend as for FV domains.

Communication between front- and backend is also somewhat peculiar. The frontend shares the actual framebuffer with the frontend, and notifies it of changes through Xenbus.

Hope this helps, feel free to ask more specific questions.

Quoted 3 lines

I guess I'm not clear on why Xen has to do anything for this...doesn't xvnc provide a framebuffer that can be accessed via VNC, and wouldn't this be outside the scope of Xen?

Yeah, isn't it funny that we bother with a PV framebuffer when X is fully network transparent? And stuff like NX makes it fast enough even over slowish links? Basically, it's for convenience: it looks like a plain frame buffer device in domU, no assembly required. Especially appreciated by graphical installers.

Quoted 2 lines

Thanks,
Dave

[*] http://wiki.xensource.com/xenwiki/XenSplitDrivers

#2 lore raw

(Thanks guys,that gives me a good general understanding of graphics remoting in Xen)\

Quoted 4 lines

Unlike other split drivers, the backend is in user space. It used to be a separate program (either xen-vncfb or xen-sdlfb) under the control of xend. It's been merged in qemu-dm recently, running under the control of xend as for FV domains.

When using SDL, does the Guest OS have direct access to the graphics card? I'm guessing not, but I just want to make sure my assumption is correct. If not, what are the relative advatages/disadvantages between VNC and SDL for virtualizing graphics in Xen?

Thanks,
Dave

#3 lore raw
Quoted 8 lines · David Stone

(Thanks guys,that gives me a good general understanding of graphics remoting in Xen)\

Quoted 4 lines

Unlike other split drivers, the backend is in user space. It used to be a separate program (either xen-vncfb or xen-sdlfb) under the control of xend. It's been merged in qemu-dm recently, running under the control of xend as for FV domains.

Quoted 7 lines

When using SDL, does the Guest OS have direct access to the graphics card? I'm guessing not, but I just want to make sure my assumption is correct. If not, what are the relative advatages/disadvantages between VNC and SDL for virtualizing graphics in Xen?

Thanks,
Dave

You're guessing correctly. Regardless of the type of backend, the frontend gets nothing but a virtual framebuffer.

Most people use the VNC backend. The SDL backend isn't quite what most people need. For instance, it duly terminates when the user closes the window. Not nice.