Wednesday, February 28, 2007

Coherence for QEMU

As I have previously discussed, I have been fascinated by the idea of Coherence that Parallels has now officially supporting. After some digging, I think I have a pretty good idea of how it works.

Very similar technologies exist. SeamlessRDP is a special program you can run in a Terminal Services session to expose only a single application over RDP. It works by replacing the normal Shell program (explorer.exe) with a process that uses SetWindowsHookEx to keep track of window creation, destruction, resizing, and movement events. For SeamlessRDP, this information is sent over a special RDP channel.

The RDP session is always full screen and this window position information is used to only show the portion of the RDP session that the window occupies. Since the RDP session is full screen, and the window positions are mapped at the same location in the host as in the RDP session, things like z-order and window dragging Just Work.

To just get the taskbar, you just have to launch explorer and track it's children being careful to not display the desktop window. Here is a screenshot demonstrating this with QEMU, KQEMU, SeamlessRDP, and a slightly modified rdesktop.

I'd like to integrate this all a little more into QEMU. The first thing I'd like to do is eliminate the need for RDP. We can use a paravirtual channel to communicate the windowing information and then just use VNC extensions to communicate that data to the client. A tricky problem is that the session has to be full screen for this to work and QEMU does not provide VGA emulation that supports some weird resolutions (1400x1050--which my laptop uses!). I think this can be solved with software scaling though.

Tuesday, February 06, 2007

KQEMU is now free software!

As part of the 0.9.0 release, Fabrice Bellard released KQEMU under the GPL. KQEMU is an accelerator for QEMU that works on older hardware (without hardware virtualization). As part of this release, Fabrice also published detailed technical notes.

You can get the GPLv2 version of KQEMU here. I want to thank Fabrice for doing this. There are a lot of people in the QEMU community who are very happy about this.

QEMU 0.9.0 is now available

This release has been in the works for quite a while. A whole bunch of changes went in. The official changelog is:


version 0.9.0:

  - Support for relative paths in backing files for disk images
  - Async file I/O API
  - New qcow2 disk image format
  - Support of multiple VM snapshots
  - Linux: specific host CDROM and floppy support
  - SMM support
  - Moved PCI init, MP table init and ACPI table init to Bochs BIOS
  - Support for MIPS32 Release 2 instruction set (Thiemo Seufer)
  - MIPS Malta system emulation (Aurelien Jarno, Stefan Weil)
  - Darwin userspace emulation (Pierre d'Herbemont)
  - m68k user support (Paul Brook)
  - several x86 and x86_64 emulation fixes
  - Mouse relative offset VNC extension (Anthony Liguori)
  - PXE boot support (Anthony Liguori)
  - '-daemonize' option (Anthony Liguori)

But this is just scratching the surface. You can obtain it from the usual place.

KVM, Xen, and the Linux kernel

I stumbled upon an article from DevX where Ian Pratt is quoted on a number of topics including KVM and upstream merge. I thought what he said about KVM was a little odd, but what disturbed me was that I think the interviewer misinterpreted what Ian said re: upstream merge. Ian said:

Putting Xen into Linux doesn't make sense: hypervisors are different beasts from operating systems, so they share little code.

He's referring to putting the actual hypervisor into the kernel. Unfortunately, the interviewer took this to mean:

Pratt also explained that Xen is no longer actively seeking inclusion in the mainline Linux kernel either.

Which is totally missing the point. We've never wanted the hypervisor to be included in mainline Linux. It's not a part of Linux so I don't even see how we would do it without major rewrites. What we've been trying to get into the kernel is the Linux changes for guest that run on top of the hypervisor.

We are still very interested in getting the Linux changes upstream. In fact, this is a major priority.