All of lore.kernel.org
 help / color / mirror / Atom feed
* Memory mapping for PEG/PCIe Graphics Passthrough to <any> DomU
@ 2009-03-30 13:35 Tim Moore
  2009-03-30 14:03 ` Alexia Benington
  2010-01-05 14:43 ` Fantu
  0 siblings, 2 replies; 10+ messages in thread
From: Tim Moore @ 2009-03-30 13:35 UTC (permalink / raw)
  To: 'xen-devel@lists.xensource.com'


[-- Attachment #1.1: Type: text/plain, Size: 3608 bytes --]

Hi

I have been testing xen-unstable.hg (29/03/09) over the past few days .. trying to enable passthrough for VGA.

I am using Debian 5.0 (lenny) x64 and compiling from source each time. Tried both linux-2.6.18.8 and linux-2.6.27.5 from Xenbits ...

Hardware is Nvidia Geforce 8800 512mb GTS PCIe on Intel X58 (ASUS P6T Deluxe) with Core i7 920 CPU.
(had to hack the xen/drviers/pci/passthrough/vtd/dmar.c (line 388) and remove the DMAR bail because of bad RMRR tables.
I also have ATI X300 PCIe for Dom0 Console.

Using Xen parameter: iommu=passthrough,pv
Using Dom) parameter: pciback.hide=('...')

I compiled pciback as embedded in the kernel and I have tried many different scenarios:

1) Nvidia Primary (hidden with pciback.hide= kernel param) (no ATI card installed)
2) ATI Primary, with Nvidia hidden (with pciback.hide= kernel param)
3) all scenarios with pciback as module and using echo devn > /sys/bus/pci/drivers/pciback/new_slot and bind

In all scenarios I can successfully see the correct PCI device in the DomU(s), I have tried primarily Windows XP 32bit SP3 and also: linux-2.6.18.8 and linux-2.6.27.5 PV and non PV kernels as DomU and (although I didn't load a driver) the lspci -vvv showed the devices.

Now, I progressed to installing drivers under the Win32 DomU against the Nvidia card, windows correctly identified the device and installed the driver! (latest from nvidia.com). As we all know - Windows wanted a reboot- beforehand a quick check of the device and it has a Yellow exclamation indicating reboot required and resources unavailable.
Reboot and XP starts up ... BSOD .. nv4 driver fails .. :(

Tried with the ATI X300 Primary (no NVidia connected) and went through the same steps. Windows XP now boots without crash although the ATI device still shows a yellow exclamation and insufficient resources.

To summarise, pciback functions as expected for PCIe in Dom0 and DomU sees the device. All tools work fine (xm pci-attach / pci-detach / pci-list) and devid show and are managed correctly.

I have read all that there is on this subject and have come to the conclusion that this is a problem with qemu-dm and the memory mapping for the new Video device, the Cirrus or stdvga card is always present which I believe may be causing the problem. I have tried nographics=1 but qemu-dm still maps the Video BIOS.

Then I noticed that qemu-dm has the new options for "-vga none" .. so I built a wrapper script for qemu-dm to launch with this param. Unfortuntately the DomU doesn't startup and the qemu log does not show any mention of the Video memory ! so I believe the switch works, but the DomU then fails to boot :(

To solve this and make it usable I think some development of qemu with regards to the Cirrus VGA and memory management when using more than 1 vga controller is necessary in order to remap the Cirrus or secondary vga adapters in memory correctly. (its also difficult to configure a Windows machine for a second vga when the primary is disabled lol.)

Also, I have run strace using a qemu-dm wrapper (very verbose) and analysed the results -nothing seems obvious, but i`m not an expert by far ....

Windows has been able to support multiple VGA cards for a long time; I assume that MS is remapping these somehow?

I have read in 2 different places that this has worked for others before (without the legacy patch for igfx) and with xen-unstable.hg .. why does it not work for me ?

Any help / direction to further debug would be helpful .. I think many people would like to get this one working once and for all!

Tim

[-- Attachment #1.2: Type: text/html, Size: 10894 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Memory mapping for PEG/PCIe Graphics Passthrough to <any> DomU
@ 2009-03-30 13:27 Tim Moore
  0 siblings, 0 replies; 10+ messages in thread
From: Tim Moore @ 2009-03-30 13:27 UTC (permalink / raw)
  To: 'xen-devel@lists.xensource.com'


[-- Attachment #1.1: Type: text/plain, Size: 3608 bytes --]

Hi

I have been testing xen-unstable.hg (29/03/09) over the past few days .. trying to enable passthrough for VGA.

I am using Debian 5.0 (lenny) x64 and compiling from source each time. Tried both linux-2.6.18.8 and linux-2.6.27.5 from Xenbits ...

Hardware is Nvidia Geforce 8800 512mb GTS PCIe on Intel X58 (ASUS P6T Deluxe) with Core i7 920 CPU.
(had to hack the xen/drviers/pci/passthrough/vtd/dmar.c (line 388) and remove the DMAR bail because of bad RMRR tables.
I also have ATI X300 PCIe for Dom0 Console.

Using Xen parameter: iommu=passthrough,pv
Using Dom) parameter: pciback.hide=('...')

I compiled pciback as embedded in the kernel and I have tried many different scenarios:

1) Nvidia Primary (hidden with pciback.hide= kernel param) (no ATI card installed)
2) ATI Primary, with Nvidia hidden (with pciback.hide= kernel param)
3) all scenarios with pciback as module and using echo devn > /sys/bus/pci/drivers/pciback/new_slot and bind

In all scenarios I can successfully see the correct PCI device in the DomU(s), I have tried primarily Windows XP 32bit SP3 and also: linux-2.6.18.8 and linux-2.6.27.5 PV and non PV kernels as DomU and (although I didn't load a driver) the lspci -vvv showed the devices.

Now, I progressed to installing drivers under the Win32 DomU against the Nvidia card, windows correctly identified the device and installed the driver! (latest from nvidia.com). As we all know - Windows wanted a reboot- beforehand a quick check of the device and it has a Yellow exclamation indicating reboot required and resources unavailable.
Reboot and XP starts up ... BSOD .. nv4 driver fails .. :(

Tried with the ATI X300 Primary (no NVidia connected) and went through the same steps. Windows XP now boots without crash although the ATI device still shows a yellow exclamation and insufficient resources.

To summarise, pciback functions as expected for PCIe in Dom0 and DomU sees the device. All tools work fine (xm pci-attach / pci-detach / pci-list) and devid show and are managed correctly.

I have read all that there is on this subject and have come to the conclusion that this is a problem with qemu-dm and the memory mapping for the new Video device, the Cirrus or stdvga card is always present which I believe may be causing the problem. I have tried nographics=1 but qemu-dm still maps the Video BIOS.

Then I noticed that qemu-dm has the new options for "-vga none" .. so I built a wrapper script for qemu-dm to launch with this param. Unfortuntately the DomU doesn't startup and the qemu log does not show any mention of the Video memory ! so I believe the switch works, but the DomU then fails to boot :(

To solve this and make it usable I think some development of qemu with regards to the Cirrus VGA and memory management when using more than 1 vga controller is necessary in order to remap the Cirrus or secondary vga adapters in memory correctly. (its also difficult to configure a Windows machine for a second vga when the primary is disabled lol.)

Also, I have run strace using a qemu-dm wrapper (very verbose) and analysed the results -nothing seems obvious, but i`m not an expert by far ....

Windows has been able to support multiple VGA cards for a long time; I assume that MS is remapping these somehow?

I have read in 2 different places that this has worked for others before (without the legacy patch for igfx) and with xen-unstable.hg .. why does it not work for me ?

Any help / direction to further debug would be helpful .. I think many people would like to get this one working once and for all!

Tim

[-- Attachment #1.2: Type: text/html, Size: 10894 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-01-11 14:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-30 13:35 Memory mapping for PEG/PCIe Graphics Passthrough to <any> DomU Tim Moore
2009-03-30 14:03 ` Alexia Benington
2010-01-05 14:43 ` Fantu
2010-01-07 15:05   ` Pasi Kärkkäinen
2010-01-07 16:14     ` Fantu
2010-01-07 21:07       ` Pasi Kärkkäinen
2010-01-08  2:45         ` Weidong Han
2010-01-08  9:18           ` Han, Weidong
2010-01-11 14:15             ` Fantu
  -- strict thread matches above, loose matches on Subject: below --
2009-03-30 13:27 Tim Moore

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.