[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] Xen 4.1.0 - VGA Passthrough ATI Radeon 4550 - Partial Success



Hello,

I was able to successfully passthrough my ATI Radeon 4550 VGA to a HVM Windows 7 guest.
However, after installing ATI/AMD latest Catalyst drivers, I get a BSOD on reboot.

Here are the steps I've followed to get there :

Motherboard : Intel DQ45CB (with VT-d support)
CPU : Intel Core 2 Duo E8400 3.00 Ghz (with VT-d support)
Dom0 OS : Debian 6 Squeeze 64-bit

1- Install Debian stock Xen Kernel with Dom0 support (2.6.32-5) :
apt-get install linux-image-2.6-xen-amd64

2- Install Xen required packages
apt-get install bcc bin86 gawk bridge-utils iproute libcurl3 libcurl4-openssl-dev bzip2 module-init-tools transfig tgif texinfo texlive-latex-base texlive-latex-recommended texlive-fonts-extra texlive-fonts-recommended pciutils-dev mercurial build-essential make gcc libc6-dev zlib1g-dev python python-dev python-twisted libncurses5-dev patch libvncserver-dev libsdl-dev libjpeg62-dev iasl libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev bison flex ocaml-findlib gcc-multilib xz-utils

3- Download and extract Xen 4.1.0 (Current stable version)
cd /usr/src/; wget http://bits.xensource.com/oss-xen/release/4.1.0/xen-4.1.0.tar.gz
tar xvzf xen-4.1.0.tar.gz

4- Apply Mr. Wei Huang's patch (with dynamic detection of BARs) to Xen 4.1.0 source code
cd /usr/src/xen-4.1.0/tools/ioemu-qemu-xen; touch patchATI.txt
(Copy paste in file patchATI.txt, code found here : http://xen.markmail.org/download.xqy?id=l7rw7d62lj27rzei&number=1 )
patch -p1 < patchATI.txt

5- Compile and install Xen
cd /usr/src/xen-4.1.0
make xen
make tools
make stubdom
make install-xen
make install-tools PYTHON_PREFIX_ARG=
make install-stubdom

6- Change default script for grub menu to 20_linux_xen :
cd /etc/grub.d/; mv 10_linux 50_linux

7- Modify /etc/default/grub following entry to a functionnal kernel/xen combo (In my case it was entry 2 (Skipped 0 and 1 which were automatically created with file xen-syms-4.1.0 and didn't boot) :
GRUB_DEFAULT=2

8- Use pciback to hide VGA (01:00.0 for my box, lspci -v) from host OS (In my case, I had to hide and passthrough ATI audio device (01:00:1) as well) - Note that Dom0 won't have access to VGA adapter anymore after reboot :
GRUB_CMDLINE_LINUX="xen-pciback.permissive xen-pciback.hide=(01:00.0)(01:00.1) pci=resource_alignment=01:00.0;01:00.1"

9 - To apply changes made during steps 6, 7 and 8
update-grub

10- Add this line to your /etc/fstab :
none            /proc/xen       xenfs   defaults        0       0

11- Add this module to your /etc/modules file :
xen-evtchn

12- Reboot, then start Xend (using SSH obviously)
reboot
/etc/init.d/xencommons start
/etc/init.d/xend start

13 - Make sure you have following settings in your guest VM config (I've only tried passthrough with a preinstalled Win7 guest for the moment, I didn't try to go through the whole installation process yet) :
gfx_passthru=1
pci=[ '01:00.0', '01:00.1' ]

14- Start VM with your fingers crossed

At this point, I see Windows 7 boot screen, then login screen. After installing latest ATI/AMD drivers and rebooting, I get a BSOD.

Hopefully it can help some people getting the initial Xen VGA passthrough setup done.
As far as I know, this patch only works with fairly recent ATI adapters.

I'm not a Xen expert in any way, so let me know if you have any idea about what's missing or what would be the next troubleshooting steps.

Thank you !
Regards,
Sébastien
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.