From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mr. Teo En Ming (Zhang Enming)" Subject: Re: RE: xen-unstable pci passthrough Date: Thu, 03 Sep 2009 22:24:16 +0800 Message-ID: <4A9FD190.7010907@asiasoftsea.net> References: <14D9C9E2ED61ED41BC3B37ACDF4E880002E0C4B8F663@heavy-vm03.heavy.org.uk> <14D9C9E2ED61ED41BC3B37ACDF4E880002E0C4B8F666@heavy-vm03.heavy.org.uk> Reply-To: enming.teo@asiasoftsea.net Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0750355309==" Return-path: In-Reply-To: <14D9C9E2ED61ED41BC3B37ACDF4E880002E0C4B8F666@heavy-vm03.heavy.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: timothy.moore@expidas.net Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============0750355309== Content-Type: multipart/alternative; boundary="------------010603040506030600000104" This is a multi-part message in MIME format. --------------010603040506030600000104 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Hi Tim, Thank you for sharing your procedures. I have a vnc server installed in my Win XP Home DomU. The fact that I cannot vnc into my Win XP dom U shows that my domU did not boot successfully. -- 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@hotmail.com Alma Maters: Singapore Polytechnic, National University of Singapore On 09/03/2009 10:18 PM, Tim Moore wrote: > > Teo, > > See below ... > > Tim > > *From:* Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net] > *Sent:* 03 September 2009 10:15 > *To:* Tim Moore; 'Han, Weidong' > *Cc:* djmagee@mageenet.net; xen-devel@lists.xensource.com > *Subject:* RE: [Xen-devel] RE: xen-unstable pci passthrough > > Hi Tim, > > Are you using xen 3.5-unstable? YES > > Which changeset are you using? (no clue at the moment, was the one > that v1 patches apply to) > > What Intel gfx passthrough patches are you using? (all) > > 1. xen-gfx-passthrough.patch YES > > 2. qemu-gfx-passthrough.patch YES > > 3. xen-load-vbios-file.patch YES > > 4. xen-vbar-pbar.patch YES > > 5. qemu-vbar-pbar.patch YES > > 6. secondary-gfx-passthrough.patch YES > > 7. revert MMIO allocation back to 0xf0000000 (examine the patches, > it's obvious) > > How do you apply the patches and compile xen and tools? > > 1) Applied the v1 patches to relevant changeset (I've not updated my > HG repo since v2 patches released) > > 2) Amended memory addresses as Weidong Han recommended for Secondary > or Primary VGA as appropriate > > 3) Run "make" on the hvmloader > > 4) Run "make install-tools" on xen-unstable > > Don't forget to reboot Dom0 after every attempt at assigning card to > DomU, the card needs resetting to work each time. > > What pvops dom 0 kernel are you using? > > both 2.6.30-rc6 and 2.6.18-xen works for me > > When I do a “xm list”, I see win xp domU running. But I am always > shown a QEMU monitor and couldn’t proceed any further on the matter. > > I also get QEMU Monitor in vncviewer, this is because Cirrus VGA is > not loaded. You should have VGA on your passthrough card, if not you > will need vncviewer in the DomU (which will only be accessible when > WinXP has booted successfully) > > 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@hotmail.com > > ------------------------------------------------------------------------ > > *From:* Tim Moore [mailto:timothy.moore@expidas.net] > *Sent:* Thursday, September 03, 2009 5:03 PM > *To:* 'Han, Weidong' > *Cc:* 'enming.teo@asiasoftsea.net'; djmagee@mageenet.net; > xen-devel@lists.xensource.com > *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. > > 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. > > 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. > > 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@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] *On Behalf Of *Teo En > Ming (Zhang Enming) > *Sent:* 03 September 2009 05:12 > *To:* djmagee@mageenet.net; 'Han, Weidong'; xen-devel@lists.xensource.com > *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@hotmail.com > > ------------------------------------------------------------------------ > > *From:* xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] *On Behalf Of > *djmagee@mageenet.net > *Sent:* Wednesday, September 02, 2009 6:59 PM > *To:* Han, Weidong; xen-devel@lists.xensource.com > *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@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] *On Behalf Of *Han, Weidong > *Sent:* Tuesday, September 01, 2009 6:55 PM > *To:* djmagee@mageenet.net; 'xen-devel@lists.xensource.com' > *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@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] *On Behalf Of > *djmagee@mageenet.net > *Sent:* 2009年9月2日 6:40 > *To:* xen-devel@lists.xensource.com > *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@mageenet.net > > 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 > > 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@lists.xensource.com > http://lists.xensource.com/xen-devel > --------------010603040506030600000104 Content-Type: text/html; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Hi Tim,

Thank you for sharing your procedures.

I have a vnc server installed in my Win XP Home DomU. The fact that I cannot vnc into my Win XP dom U shows that my domU did not boot successfully.
-- 
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@hotmail.com
Alma Maters: Singapore Polytechnic, National University of Singapore


On 09/03/2009 10:18 PM, Tim Moore wrote:

Teo,

 

See below ...

 

Tim

 

From: Teo En Ming (Zhang Enming) [mailto:enming.teo@asiasoftsea.net]
Sent: 03 September 2009 10:15
To: Tim Moore; 'Han, Weidong'
Cc: djmagee@mageenet.net; xen-devel@lists.xensource.com
Subject: RE: [Xen-devel] RE: xen-unstable pci passthrough

 

Hi Tim,

 

Are you using xen 3.5-unstable? YES

Which changeset are you using? (no clue at the moment, was the one that v1 patches apply to)

 

What Intel gfx passthrough patches are you using? (all)

 

1.             xen-gfx-passthrough.patch YES

2.             qemu-gfx-passthrough.patch YES

3.             xen-load-vbios-file.patch YES

4.             xen-vbar-pbar.patch YES

5.             qemu-vbar-pbar.patch YES

6.             secondary-gfx-passthrough.patch YES

        7.            revert MMIO allocation back to 0xf0000000 (examine the patches, it's obvious)

 

How do you apply the patches and compile xen and tools?

1) Applied the v1 patches to relevant changeset (I've not updated my HG repo since v2 patches released)

2) Amended memory addresses as Weidong Han recommended for Secondary or Primary VGA as appropriate

3) Run "make" on the hvmloader

4) Run "make install-tools" on xen-unstable

 

Don't forget to reboot Dom0 after every attempt at assigning card to DomU, the card needs resetting to work each time.

 

What pvops dom 0 kernel are you using?

both 2.6.30-rc6 and 2.6.18-xen works for me

 

When I do a “xm list”, I see win xp domU running. But I am always shown a QEMU monitor and couldn’t proceed any further on the matter.

I also get QEMU Monitor in vncviewer, this is because Cirrus VGA is not loaded. You should have VGA on your passthrough card, if not you will need vncviewer in the DomU (which will only be accessible when WinXP has booted successfully)

 

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@hotmail.com


From: Tim Moore [mailto:timothy.moore@expidas.net]
Sent: Thursday, September 03, 2009 5:03 PM
To: 'Han, Weidong'
Cc: 'enming.teo@asiasoftsea.net'; djmagee@mageenet.net; xen-devel@lists.xensource.com
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.

 

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.

 

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.

 

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@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Teo En Ming (Zhang Enming)
Sent: 03 September 2009 05:12
To: djmagee@mageenet.net; 'Han, Weidong'; xen-devel@lists.xensource.com
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@hotmail.com


From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of djmagee@mageenet.net
Sent: Wednesday, September 02, 2009 6:59 PM
To: Han, Weidong; xen-devel@lists.xensource.com
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@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Han, Weidong
Sent: Tuesday, September 01, 2009 6:55 PM
To: djmagee@mageenet.net; 'xen-devel@lists.xensource.com'
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@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of djmagee@mageenet.net
Sent: 2009
92 6:40
To: xen-devel@lists.xensource.com
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@mageenet.net

 

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

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@lists.xensource.com http://lists.xensource.com/xen-devel


--------------010603040506030600000104-- --===============0750355309== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0750355309==--