WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] xen-unstable pci passthrough

HI Teo,

 

You need the qemu-claim-vga-cycle-secondary-gfx-passthrough.patch also that’s what you seem to be missing.

 

Also usb device syntax should be:

 

usbdevice = 'host:vendorid:productid' # mouse

usbdevice = 'host:vendorid:productid' # keyboard

 

I also had problems with this and disabled the keyboard to allow DomU to boot, I think there is a conflict with the qemu BIOS and Legacy keyboard support ..

 

Therefore once the DomU has booted with Passthrough mouse and vga, I used vncviewer to get to the qemu console and enter:

usb_add host:vendorid:productid

 

(no quotes)

 

Tim

 

From: Mr. Teo En Ming (Zhang Enming) [mailto:enming.teo@xxxxxxxxxxxxxxx]
Sent: 03 September 2009 21:29
To: Tim Moore
Cc: 'Han, Weidong'; 'xen-devel@xxxxxxxxxxxxxxxxxxx'
Subject: Re: [Xen-devel] xen-unstable pci passthrough

 

VGA Passthrough to Windows XP Home 32-bit HVM DomU SUCCESS!!!

A big thanks to Weidong and other engineers at Intel for the VGA passthrough patches to xen 3.5-unstable, and other gurus here at xen-devel mailing list for your kind assistance and help along the way.

I had abandoned the idea of booting up the onboard Intel GMA4500 graphics as the primary video adapter for dom0 and passing through the secondary nVidia Geforce 8400 GS PCI-e x16 graphics to Win XP Home DomU. I should have listened to Magee's advice earlier that both onboard and pci-e graphics could not be operated simultaneously at the same time due to lack of pci-e lanes on Intel DQ45CB.

After Timothy stressed on Magee's advice just now, I have totally changed my approach. Now, I boot up the nVidia Geforce 8400 GS PCI-e x16 as the primary video adapter with-out any secondary video adapter.

I applied Weidong's xen-gfx-passthrough.patch, qemu-gfx-passthrough.patch, xen-load-vbios-file.patch, xen-vbar-pbar.patch, and qemu-vbar-pbar.patch to xen 3.5-unstable changeset 20143 successfully. I skipped qemu-claim-vga-cycle-secondary-gfx-passthrough.patch. Using this approach, I am still loading the vga bios of nVidia Geforce 8400 GS from firmware file. And I am using the Version 1 Intel gfx passthrough patches.

The pvops dom 0 kernel I am using is 2.6.31-rc6.

Before rebooting, I appended "blacklist nvidia" to /etc/modprobe.d/blacklist.conf to prevent the nvidia driver from loading.

After rebooting, I hide nVidia Geforce 8400 GS from Dom 0 using Xen VT-d wiki instructions. Then I started Windows XP Home 32-bit HVM Guest with 1 VCPU.

Windows XP Home HVM DomU successfully boots up!!! Emulated VGA is disabled. Only nVidia Geforce 8400 GS shows up in Device Manager.

This time, instead of showing nVidia Geforce 8400 GS cannot start and no resources, it shows there are NOT ENOUGH resources. There is still an exclamation mark beside nvidia 8400 GS.

I tried to passthrough USB Keyboard and USB mouse using the following config but with-out success:

usb = 1
usbdevice = [ 'host:vendorid:productid', 'host:vendorid:productid' ]

So I had to vnc into my Windows XP HVM domU.

Thank you Weidong and other engineers at Intel for the vga passthrough patches!!!

-- 
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering) 
Technical Support Engineer 
Information Technology Department
Asiasoft Online Pte Ltd
Tampines Central 1 #04-01 Tampines Plaza 
Singapore 529541
Republic of Singapore
Company Website: http://www.asiasoft.sg/
Mobile: +65-9648-9798
MSN: teoenming@xxxxxxxxxxx
Alma Maters: Singapore Polytechnic, National University of Singapore



On 09/04/2009 03:07 AM, Tim Moore wrote:

Hi Weidong,

 

Thanks for your replies...

 

I now have Windows XP DomU with Primary VGA , USB Keyboard + Mouse Passthrough. I am using 2.6.30-rc3 pvops with netbk vif.

Primary VGA is Nvidia Geforce GTX260

 

The DomU has hangs/locks with any graphics intensive operations, i.e. Opening Internet Explorer on the MSN homepage makes DomU freeze !!

 

I noticed in the attached qemu log that the some of the memory addresses are not the same as the lspci output:

pt_register_regions: IO region registered (size=0x01000000 base_addr=0xb6000000)

pt_register_regions: IO region registered (size=0x10000000 base_addr=0xe000000c)

pt_register_regions: IO region registered (size=0x02000000 base_addr=0xb4000004)

 

02:00.0 VGA compatible controller: nVidia Corporation GT200 [GeForce GTX 260] (rev a1) (prog-if 00 [VGA controller])

      Subsystem: nVidia Corporation Device 068e

      Flags: bus master, fast devsel, latency 0, IRQ 11

      [virtual] Memory at b6000000 (32-bit, non-prefetchable) [size=16M]

      Memory at e0000000 (64-bit, prefetchable) [size=256M]

      Memory at b4000000 (64-bit, non-prefetchable) [size=32M]

      I/O ports at 3000 [size=128]

 

Is this expected ?

 

Would you have any idea why this would be so unstable / crash ?

 

Also, the Mouse is passthrough using usbdevice=”host:##:##”, but has a really bad lag/delay on refresh .. can this be helped ?

 

Cheers,
Tim

 

 

From: Han, Weidong [mailto:weidong.han@xxxxxxxxx]
Sent: 03 September 2009 10:43
To: Tim Moore
Cc: 'enming.teo@xxxxxxxxxxxxxxx'; 'djmagee@xxxxxxxxxxxx'; 'xen-devel@xxxxxxxxxxxxxxxxxxx'
Subject: RE: [Xen-devel] RE: xen-unstable pci passthrough

 

Tim,

 

See my comments belew.

 

 


From: Tim Moore [mailto:timothy.moore@xxxxxxxxxxx]
Sent: 2009
93 17:03
To: Han, Weidong
Cc: 'enming.teo@xxxxxxxxxxxxxxx'; djmagee@xxxxxxxxxxxx; xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] RE: xen-unstable pci passthrough

Hi Weidong,

 

Thank you for all your hard work ;)

 

I have just successfully passed through my Nvidia Geforce GTX260 as a fully functional card to my WinXP DomU !!!!!

 

My findings so far:

1) Tried with my 9500 GT (Secondary card) which DOES load the driver successfully but NO output on the Monitor (VGA is sized correctly but monitor is OFF)

2) GTX260 (Primary card) (Dom0 boot VGA) starting DomU from remote SSH console, VGA Loads and Display works !!!!

 

In both cases I am using the NVidia binary driver in the WinXP DomU.

 

The 9500GT (Secondary card) passthrough still has issues, the driver loads without the Monitor displaying anything (DPMS?) and if I make ANY changes to the DomU Graphics then the DomU locks up hard. 

 

[Weidong]: I didn't try 9500GT. Seems it needs extra hacks. 

 

In both cases the VGA card only works the FIRST time, I.e. FLR is required to reset the card for re-use, display become corrupt on second boot of DomU. Restart Dom0 and the VGA will work again the first time DomU is started. 

 

[Weidong]:  Yes, it's not reset well. I suspect it's still in graphics mode, so cannot display the boot messages in VGA mode. In my experiments, WinXP guest can still boot into graphics mode, although you cannot see booting progress.

 

Is there anyway we can impletement the d3r, sbr or flr functionality that is in XCI? I would like to see if a sbr will enable to Card to be reset. 

[Weidong]: these reset functions are already in xen-unstable, but no one can really reset gfx. In my feeling, it needs vendor specific method to reset it. 

 

I would also like to debug the issue with Secondary passthrough as it seems that this is nearly there too ...

 

Regards,

Tim

 

 

 

From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Teo En Ming (Zhang Enming)
Sent: 03 September 2009 05:12
To: djmagee@xxxxxxxxxxxx; 'Han, Weidong'; xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] RE: xen-unstable pci passthrough

 

Dear Magee,

 

Any luck with the Intel vga passthrough patches to xen 3.5-unstable on Intel DQ45CB with extra PCI-e x16 graphics card? Are you using pvops dom 0 kernels 2.6.30-rc3 and 2.6.31-rc6?

 

Regards,
 

Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics Engineering) BEng(Hons)(Mechanical Engineering)

Technical Support Engineer

Information Technology Department
Asiasoft Online Pte Ltd
Tampines Central 1 #04-01 Tampines Plaza
Singapore 529541

Republic of Singapore
Mobile: +65-9648-9798
MSN: teoenming@xxxxxxxxxxx


From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of djmagee@xxxxxxxxxxxx
Sent: Wednesday, September 02, 2009 6:59 PM
To: Han, Weidong; xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] RE: xen-unstable pci passthrough

 

That was the problem, thank you.  Now I’ll work on testing the gfx-passthrough patches.

 

From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Han, Weidong
Sent: Tuesday, September 01, 2009 6:55 PM
To: djmagee@xxxxxxxxxxxx; 'xen-devel@xxxxxxxxxxxxxxxxxxx'
Subject: [Xen-devel] RE: xen-unstable pci passthrough

 

I suspect you are using old hvm config file. The device_model is changes in config file.

 

in old config file:

# New stuff
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'

 

in new config file:

# Device Model to be used
device_model = 'qemu-dm'

 

Pls check it, and use the latest config file to create guest.

 

Regards,

Weidong

 


From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of djmagee@xxxxxxxxxxxx
Sent: 2009
92 6:40
To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] xen-unstable pci passthrough

I have not been able to passthrough any PCI devices using the latest xen-unstable.  I have a DQ45CB, and have successfully passed devices to guests using 3.4.1.

 

The latest c/s in my copy of xen-unstable is 20145.  I just started playing around with unstable yesterday, so I can’t tell you if earlier revisions worked.  I’ve tried with various dom0 kernels, the current 2.6.18.8-xen branch, a xenified 2.6.29.6, and a pvops 2.6.31-rc6, and in every case I get the same error.  I’ve tried both putting pci= in the config file, and hot-adding the device using xm pci-attach.  In every case, the xm command (either create or pci-attach) fails with the message “Error: Timed out waiting for device model action”.  The guests in every case are HVM guests, some flavors of Windows, as well as the Knoppix 5.3.1 DVD.

 

The relevant xm dmesg output is:
(XEN) PCI add device 00:1b.0

(XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 0:1b.0

(XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 0:1b.0

(XEN) [VT-D]io.c:284:d0 VT-d irq bind: m_irq = 37 device = 3 intx = 0

(XEN) [VT-D]iommu.c:1292:d0 domain_context_unmap:PCIe: bdf = 0:1b.0

(XEN) [VT-D]iommu.c:1178:d0 domain_context_mapping:PCIe: bdf = 0:1b.0

 

And the messages from qemu-log:

dm-command: hot insert pass-through pci dev

hot add pci slot -2 exceed.

 

Please let me know what else I need to supply to help resolve this problem.  If I need to enable debugging messages, let me know the best way to do this.

 

Doug Magee

djmagee@xxxxxxxxxxxx

 

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.75/2340 - Release Date: 09/01/09 20:03:00

 


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

 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>