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

Re: [Xen-users] VGA Passthrough of AMD HD8670D IGP to HVM Win7 results in "Code 43"

Hello everyone,

first of all, thank you David and Casey for your help. Unfortunately, I still haven't succeeded.

After David generously mailed me his configuration, I tried to mimic it as close as I could.

I installed Debian wheezy amd64 again (since it gave me less issues than Mint).
I downloaded kernel 3.8.13 and used David's config, with the exception that I disabled CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2, since having those compiled in gave me severe warnings while booting and I was unable to use LVM (PVs would not be detected). The kernel config as I used it can be found here: http://pastebin.com/KN74FWE6

Then I compiled xen, referring to the instructions at
with the exception that I used xen revision 27214 (the most recent to this date), because even xen 4.3 had caused host system reboots when creating DomUs in my previous installations on this hardware. However, with kernel 3.8.13, I haven't tried any other revision of xen yet.

The output of lspci is here: http://pastebin.com/kf94viHM

Since I want to pass my integrated GPU as well as some USB ports, I edited /boot/grub/grub.cfg so that the relevant boot entry contains this line:
module  /boot/vmlinuz-3.8.13 placeholder root=UUID=5fed3d65-274c-4a14-b72a-0f9bb6d21e41 ro  quiet xen-pciback.hide=(00:01.0)(00:01.1)(00:12.0)(00:12.2) xen-pciback.permissive

After having installed Windows 7 x64, my DomU configuration looks like this: http://pastebin.com/m0wLZzkF
Now, I start the DomU with this script (again, thanks to David): http://pastebin.com/pkUdLvuw

However, in the Windows Device Manager, I still get "Code 43" shown for my passed-through GPU.

What may be interesting is that after I had installed the AMD graphics drivers in the Windows DomU, and after shutting down the DomU and rebooting the host system, I tried to access the Windows Device Manager from within the DomU, when suddenly DomU and Dom0 locked up. After some time, on the physical LCD screen (which still seems to display either xen or linux kernel output) I started to receive the message
"hda: DMA interrupt recovery"
with quite some time (on the order of about a minute) in between. hda is my host system SATA disk (and the only one in the machine). After hard-resetting the host, this problem hasn't occured anymore. I don't know whether this may be related to my problem.

Again, any attempts to help are very highly appreciated.


On Wed, Jul 10, 2013 at 11:22 PM, David TECHER <davidtecher@xxxxxxxx> wrote:
Sound good!

Please be informed that it may require a lot of time before being able to set up VGA Passhtrough with Xen for ATI. So there will be a lot of mails

Attached are my files.

config-3.8.13: kernel configuration file
mercury-xen09.cfg : domU - Ubuntu 12.04 32 Bit
mercury-xen10.cfg: domU - Window 7 64 Bit
run-passthrough.sh: script to boot dimU

My suggested plan is

1) build your kernel using my file (config-3.8.13) hoping you have required experience for kernel

download kernel 3.8.13
copy my file in the decompressed folder as '.config' file

make menuconfig
make bzImage modules
make install modules_install
mkinitramfs -o /boot/initrd.img-3.8.13 3.8.13

update your grub

2) Xen - refer to http://www.davidgis.fr/blog/index.php?2013/04/05/937-xen-43-unstable-vga-passthrough-hd-7970-windows-7-64-bits-with-more-than-3gb-for-ram

WHEN AND ONLY WHEN  item #1 and item #2 above ARE OK THEN

3) Your grub file may have something like that. You may have to update the parameter xen-pciback.hide=(....)(....).... ----> list of devices

menuentry 'Debian GNU/Linux, with Linux 3.8.13 and XEN 4.3-unstable' --class debian --class gnu-linux --class gnu --class os --class xen {
        insmod part_gpt
        insmod ext2
        set root='(/dev/sda,gpt1)'
        search --no-floppy --fs-uuid --set 1cd457ae-85f4-4626-8f94-1f444fcf6d5c
        echo    'Chargement de Linux 3.8.13 ...'
        multiboot   /boot/xen-4.3-unstable.gz placeholder  dom0_mem=2048MB
        module  /boot/vmlinuz-3.8.13 placeholder root=UUID=1cd457ae-85f4-4626-8f94-1f444fcf6d5c ro intel_iommu=on xen-pciback.hide=(01:00.1)(00:1b.0)(00:1a.0)(00:1d.0) xen-pciback.permissive quiet
        echo    'Chargement du disque mémoire initial ...'
        module  /boot/initrd.img-3.8.13

De : Gustav Sorenson <gu.sorenson@xxxxxxxxx>
À : David TECHER <davidtecher@xxxxxxxx>
Envoyé le : Mercredi 10 juillet 2013 20h08
Objet : Re: [Xen-users] VGA Passthrough of AMD HD8670D IGP to HVM Win7 results in "Code 43"


thank you for your kind answer.
I'm not home right now either, but will try what you suggested once I'm back.

I'd be very thankful if you could provide your domU configuration, kernel configuration and any other files that might be of help.

I write this mail to you only and not to the list, since I think it doesn't contribute to the thread. Should this be frowned upon in the xen community, please let me know and I will post it to the list as well.

Thank you very much.

On Wed, Jul 10, 2013 at 2:36 PM, David TECHER <davidtecher@xxxxxxxx> wrote:
Hi Gustav,

I will try not to spam this mailing list :).

Got a HD 7970 and it works both for Win7 (as domU) and Linux (as domU). It works perfectly with 8GB of RAM for domU

Here is a quick summary

- STEP 1) A few Xen features in your kernel are configured as modules (= m) ! I will suggest to set everything directly built in the kernel (= Y) . It is a bit pain to configure the kernel  manually.  My latest test was for kernel 3.8.13. If you can download the kernel and build it yourself that I can sent you my own configuration file for the kernel (3.8.13). After that you will have to update your grub file

- STEP 2) You are testing Xen 4.4 unstable. This branch has to be patched. In Marsh/April the latest patch for ATI has been sent to this mailing list.
So you have to rebuild a patched Xen version (http://www.davidgis.fr/blog/index.php?2013/04/05/937-xen-43-unstable-vga-passthrough-hd-7970-windows-7-64-bits-with-more-than-3gb-for-ram)

- STEP 3) Your configuration file for domU  is not well formed. There are missings options.

I am currently at work for the moment . I will try to share my own configuration file for domU when I am back to home.



De : Gustav Sorenson <gu.sorenson@xxxxxxxxx>
À : xen-users@xxxxxxxxxxxxx
Envoyé le : Mercredi 10 juillet 2013 12h31
Objet : [Xen-users] VGA Passthrough of AMD HD8670D IGP to HVM Win7 results in "Code 43"

Hello everyone,

pardon me If I'm doing anything wrong, this is my first post to this list.

For the past few days, I've been trying to pass the GPU of my AMD A-10 6800K APU to a HVM Windows 7 guest, but haven't had any luck yet.

My relevant hardware is as follows:
AMD A-10 6800K with HD 8670 integrated graphics processor
ASRock FM2A75 Pro4 with latest firmware, so that it (supposedly) supports IOMMU
8GB RAM, 1GB of which has been assigned to the IGP in the BIOS/EFI settings

As you may notice, the IGP is the only graphics device present.

I've tried to follow numerous guides to get VGA passthrough to work; currently, I'm running Linux Mint 13 XFCE and did most of what this guide proposes:

However, with Mint as well as with Debian wheezy, I wasn't able to start DomUs with the xen from the repositories; some seconds after xm create or xl create, the host computer would reboot; I haven't figured out why. The same holds with xen 4.3 compiled from source, at least on Mint. However, the most recent xen from the mercurial repository allows me to start DomUs.
Also, when using Mint, I had to upgrade from the stock 3.2.0-23 kernel to 3.8.0-26 from the backports, otherwise the machine would reset immediately or shortly after xen tried to load the linux kernel. Again, having limited experience with debugging linux or xen problems, I was unable to figure out why.

Finally having installed Windows 7 I installed the most recent AMD catalyst drivers in the DomU. After that, in the Device Manager, the graphics card shows up, but with a yellow triangle; a double click on the GPU gave me "Code 43" as an explanation of what went wrong. What I found with google only points to nVidia-users having that problem.

I also tried to set gfx_passthru to 1, but then xl create would complain:
libxl: error: libxl_dm.c:1275:device_model_spawn_outcome: domain 2 device model: spawn failed (rc=-3)
libxl: error: libxl_create.c:1075:domcreate_devmodel_started: device model did not start: -3
libxl: error: libxl_dm.c:1306:libxl__destroy_device_model: Device Model already exited
and /var/log/xen/qemu-dm-orthowin.log would contain
qemu-system-i386: -gfx_passthru: invalid option

For reference, here is the kernel config: http://pastebin.com/kwUWkyP2
My DomU configuration: http://pastebin.com/E9jkkJXj
The output of xl info: http://pastebin.com/nj1ykFXJ
The output of xl dmesg: http://pastebin.com/MS96knmL
The output of dmesg: http://pastebin.com/2sQFuCuJ
Please note, as it might be related to my issue, that what comes at the end of the dmesg output seems suspicious to me (RIP  [<ffffffff81012861>] xen_spin_lock+0x21/0x50 and the lines around that)

I hope that I have provided enough information for further investigation. The computer is not in any kind of production-use, so please feel free to request things that will or may require me to reinstall the operating system or some of its components. As the hardware is new, I'd not be happy if I had to do something that would risk permanent damage. :)
Should this be the wrong mailing list for this kind of post, please let me know where I can send it to instead.

Thank you very much for your time, any help is highly appreciated, not only regarding my primary problem (getting VGA passthrough to work) but also the others mentioned, especially since they might be related.

Xen-users mailing list

Xen-users mailing list



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