Monday, September 14, 2009

USB Device Pass Through Succeeded

How thick I must have been! In my earlier blog posts with VGA passthrough succeeded, I said that I couldn't passthrough any USB device at all.

As a matter of fact, Timothy had corrected my usbdevice directive in the guest config file in an earlier mailing list post but I didn't take a careful look at the usbdevice directive at all. The correct usbdevice directive is:

usbdevice = "host:vendorid:productid"

I had used

usbdevice = [ 'host:vendorid:productid' ]

which is completely erroneous. I need to omit the square brackets for USB device passthrough to work.

I have now successfully passed through the USB optical mouse to the Windows XP Home HVM domU and using on-screen keyboard as a substitute for the physical USB keyboard.

The reason I am doing this is because QEMU with Xen can only allow one USB device to be passed through at any one time.

It was so obvious and I missed the obvious!

PVOPS Dom 0 kernel 2.6.31 and Mainline Kernel 2.6.31

I couldn't get Jeremy's rebase/master branch (pvops dom 0 kernel 2.6.31) to work despite disabling all of USB support in the kernel. I will troubleshoot this issue with the serial console enabled another time.

Meanwhile, I got Linus' mainline kernel 2.6.31 to work on my system. So apparently the dom 0 patched kernel 2.6.31 has some issues or I did not configure it properly.

Sunday, September 13, 2009

Disabled all USB support in the kernel...

but I still couldn't get pvops dom0-patched kernel 2.6.31 final to complete loading. All I get is a blinking cursor at the top left hand corner of the monitor.

Saturday, September 12, 2009

UHCI, OHCI, EHCI, and xHCI disabled...

but I still could not get pvops dom 0 kernel 2.6.31 final to complete loading.

Disabling USB 1.0, USB 2.0 Drivers and Enabling USB 3.0 Drivers

I have disabled USB 1.0 and USB 2.0 drivers simultaneously and enabled USB 3.0 driver but the kernel stops loading.

Then I totally disabled all USB support by passing the "nousb" parameter to the kernel but it still stops loading.

After disabling the USB 1.0 Host Controller Driver...

but still leaving the USB 2.0 Host Controller Driver compiled statically into the kernel, I get an error with the USB 2.0 driver.

Obviously this is a USB driver problem with the pvops dom 0 kernel 2.6.31 final or an incompatibility issue with the USB controller on the Intel DQ45CB motherboard. I have no issues with USB on pvops dom 0 kernels 2.6.30-rc3 and 2.6.31-rc6, and also regular kernels.

If I keep disabling the USB drivers any further, I will not be able to use USB keyboard and mouse on my system. My Intel DQ45CB motherboard does not have any PS/2 ports. But I may still be able to serial console in.

Error with pv-ops dom 0 kernel 2.6.31 final

Below is a screenshot of the error I have encountered with this kernel.

USB Host Controller died?! Above screenshot shows USB 1.0 driver having problems.

Friday, September 11, 2009

Disk I/O Benchmark Results with Xen-based Windows XP Home HVM Virtual Machine

Common Configuration: Xen 3.5-unstable with Intel supplied VGA passthrough patches
VGA passthrough status: nVidia GeForce 8400 GS PCI Express x16 graphics card fully passed through

Case #1: Jeremy's Fitzhardinge's pvops dom 0 kernel 2.6.30-rc3

Case #2: Jeremy Fitzhardinge's pvops dom 0 kernel 2.6.31-rc6

Observation: The above benchmark results show that Windows XP Home Edition 32-bit HVM guest operating system runs faster in 2.6.30-rc3 than 2.6.31-rc6. All services which could have affected the performance of Win XP domU have been stopped in Dom 0.

Thursday, September 10, 2009

The Final Solution: PCI Express x16 Graphics Card Passthrough to Windows XP Home Edition 32-bit HVM Virtual Machine

Here is my latest video presentation on VGA passthrough. Please check out the Youtube link at

The "not enough free resources" issue for nVidia Geforce 8400 GS PCI Express x16 graphics card in earlier presentation videos:

has been fixed. Device manager in Windows XP HVM domU no longer shows an exclamation mark besides the nVidia Geforce 8400 GS graphics card. The device is working properly and the resources tab shows the available memory ranges.

Full VGA passthrough to Windows XP HVM guest operating system using Xen virtualization has been achieved. I am now able to run 3-D video benchmarks on the passed through nVidia GeForce 8400 GS graphics card.

All this is possible using Xen 3.5 hypervisor with Intel supplied VGA passthrough patches. Instead of using pvops dom0 kernel 2.6.31-rc6 which causes Win XP domU to run slowly, I am now using pvops dom0 kernel 2.6.30-rc3.

I am now able to bootstrap Windows XP HVM domU from within Linux using Xen virtualization and play 3D games in the Windows virtual machine. In the past, Windows virtual machines can only access a 2D emulated/virtual display adapter. The virtualized Windows operating systems were more palatable to server administrators than gamers. With VGA pass through and direct hardware access by Windows virtual machines to the graphics hardware, gamers will now be able to play 3D games inside Windows virtual machines.

There is still one unresolved problem. I am still unable to passthrough USB devices, e.g. keyboard and mouse, to the Windows XP HVM domU.

Special thanks to the following people who have helped me along the way. Without their guidance I would not have made it this far.

(1) Boris Derzhavets
(2) Pasi Kärkkäinen
(3) Han Weidong, Intel Corporation
(4) Doug Magee
(5) Timothy Moore
(6) Christian Tramnitz

and many other people from the xen-devel mailing list.


[1] Direct Access to Graphics Card Leveraging VT-d Technical Report; Beng Heng Ng, Billy Lau and Atul Prakash; July 20, 2009; University of Michigan


[2] VGA passthrough in Xen; Y. Schaeffer; University of Amsterdam


[3] Xen VGA passthrough; Yuri Schae er BSc; University of Amsterdam


Monday, September 7, 2009

Video Presentation on PCI Express x16 VGA Passthrough to Xen-based Windows XP Home HVM Virtual Machine

I have made and uploaded a two-part video series on VGA pass through to Windows XP HVM domU to Youtube.

Here are the Youtube links:

Basically Windows XP guest operating system has direct access to PCI Express x16 graphics card but in a reduced functionality state. The videos show that the passed through display card cannot found enough resources it can use. The device status for nVidia Geforce 8400 GS on my Intel Desktop Board DQ45CB is:

This device cannot find enough free resources that it can use. (Code 12)

I could not run any 3-D video benchmark tests at the moment. I have tried Sisoftware Sandra Lite 2009.SP4 and Passmark Performance Test benchmark suites. 3-D video benchmark tests in both suites cannot be started at all. Work on direct graphics card access by Windows virtual machines is still in progress but this paves the way for heavy 3-D gaming in Windows virtual machines in the future. Besides processors, graphics card virtualization will become mainstream in the not-too-distant future. The technology requires Intel Virtualization Technology for Directed Input/Output (VT-d).

In addition to graphics card, you also need to pass through the USB keyboard and USB optical mouse to the Windows virtual machine in order to use it. However, USB pass through is currently not possible on Xen 3.5-unstable with Intel applied VGA passthrough patches. The code is still experimental and under constant development.

Special thanks to Xen virtualization developers and engineers at Intel Corporation for making VGA passthrough possible.

Thank you very much.