All of lore.kernel.org
 help / color / mirror / Atom feed
* Patches for VGA-Passthrough XEN 4.2 unstable
@ 2011-05-18 11:47 JavMV
  2011-05-23 10:48 ` Stefano Stabellini
                   ` (2 more replies)
  0 siblings, 3 replies; 102+ messages in thread
From: JavMV @ 2011-05-18 11:47 UTC (permalink / raw)
  To: xen-devel


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


Hello, I have been working on VGA-passthrough in the last month.

When Xen was at his version 3.5 there was a few patches to make this work for some graphic cards using the patches developed by Han Weidong and posted here (http://lists.xensource.com/archives/html/xen-devel/2009-08/msg01176.html) and the same patches posted file by file are here (http://lists.xensource.com/archives/html/xen-devel/2010-05/msg00441.html)  but now this patches doesn't work on Xen-4.2 unstable because the source code has changed. Well, as I am really interested on VGA-Passthru I have adapted those patches to the new version of xen. I have attached them for you to try it and want to know if they are still working.

This patch set should work for the same graphic cards that it worked on the past (NVIDIA GT200, Geforce 8400 GS ...).

The steps are the same:

Before all that, you need to read out the VGA Bios of the to-be-passthroughed-
Graphiccard with a tool; i used nvflash.exe under DOS for this task.
The patches assume you saved this file as "vgabios-pt.bin"

1. check out xen unstable:
    hg clone http://xenbits.xensource.com/xen-unstable.hg (Or download the tarball xen-unstable.gz which I did)
2. go into there and do an "initial build" so that qemu-dm gets checked-out:
    cd  xen-unstable.hg; cd tools; make ; make clean
3. apply the patches from within the "xen-unstable.hg" dir, with patch -p0
4. move the vgabios-pt.bin to "tools/firmware/vgabios/"
4. do a "make install"


This is only for primary graphic card passthru, I didn't adapt the patch "qemu-claim-vga-cycle-for-secondary-gfx-passthrough.patch<http://lists.xensource.com/archives/html/xen-devel/2009-08/binfGEJAiR8ZA.bin>" but if anyone need it I can do it too.

Unfortunately these patches don't work for my NVIDIA GTX460 graphic card. If anybody knows how can I make VGA-Passtrhough for this one it would be great! (Or if it is not possible tell me too plz)

I hope you find this helpful.





-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4406265.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

[-- Attachment #1.2: Type: text/html, Size: 5345 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] 102+ messages in thread

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-05-18 11:47 Patches for VGA-Passthrough XEN 4.2 unstable JavMV
@ 2011-05-23 10:48 ` Stefano Stabellini
  2011-05-23 12:35   ` Pasi Kärkkäinen
       [not found] ` <1312297850948-4659036.post@n5.nabble.com>
  2011-09-09 11:31 ` Liwei
  2 siblings, 1 reply; 102+ messages in thread
From: Stefano Stabellini @ 2011-05-23 10:48 UTC (permalink / raw)
  To: JavMV; +Cc: Lars, xen-devel, Kurth

[-- Attachment #1: Type: text/plain, Size: 2287 bytes --]

On Wed, 18 May 2011, JavMV wrote:
> 
> Hello, I have been working on VGA-passthrough in the last month.
> 
> When Xen was at his version 3.5 there was a few patches to make this work for some graphic cards using the patches
> developed by Han Weidong and posted here (http://lists.xensource.com/archives/html/xen-devel/2009-08/msg01176.html) and
> the same patches posted file by file are here (http://lists.xensource.com/archives/html/xen-devel/2010-05/msg00441.html) 
> but now this patches doesn't work on Xen-4.2 unstable because the source code has changed. Well, as I am really interested
> on VGA-Passthru I have adapted those patches to the new version of xen. I have attached them for you to try it and want to
> know if they are still working.
> 
> This patch set should work for the same graphic cards that it worked on the past (NVIDIA GT200, Geforce 8400 GS ...).
> 
> The steps are the same:
> 
> Before all that, you need to read out the VGA Bios of the to-be-passthroughed-
> Graphiccard with a tool; i used nvflash.exe under DOS for this task.
> The patches assume you saved this file as "vgabios-pt.bin"
> 
> 1. check out xen unstable:
>     hg clone http://xenbits.xensource.com/xen-unstable.hg (Or download the tarball xen-unstable.gz which I did)
> 2. go into there and do an "initial build" so that qemu-dm gets checked-out:
>     cd  xen-unstable.hg; cd tools; make ; make clean
> 3. apply the patches from within the "xen-unstable.hg" dir, with patch -p0
> 4. move the vgabios-pt.bin to "tools/firmware/vgabios/"
> 4. do a "make install"
> This is only for primary graphic card passthru, I didn't adapt the patch "qemu-claim-vga-cycle-for-secondary-gfx-passthrou
> gh.patch" but if anyone need it I can do it too.
> Unfortunately these patches don't work for my NVIDIA GTX460 graphic card. If anybody knows how can I make VGA-Passtrhough 
> for this one it would be great! (Or if it is not possible tell me too plz)
> I hope you find this helpful.

Thanks for your work! However my MUA cannot open your attachments, could
you please send them again, maybe inline one email per patch?
I think it is also worth updating the wiki page about VGA passthrough
with your patches:

http://wiki.xensource.com/xenwiki/XenVGAPassthrough

[-- 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] 102+ messages in thread

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-05-23 10:48 ` Stefano Stabellini
@ 2011-05-23 12:35   ` Pasi Kärkkäinen
  2011-05-23 12:49     ` Pavel Mateja
  0 siblings, 1 reply; 102+ messages in thread
From: Pasi Kärkkäinen @ 2011-05-23 12:35 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: Lars, xen-devel, JavMV, Kurth

On Mon, May 23, 2011 at 11:48:00AM +0100, Stefano Stabellini wrote:
> On Wed, 18 May 2011, JavMV wrote:
> > 
> > Hello, I have been working on VGA-passthrough in the last month.
> > 
> > When Xen was at his version 3.5 there was a few patches to make this work for some graphic cards using the patches
> > developed by Han Weidong and posted here (http://lists.xensource.com/archives/html/xen-devel/2009-08/msg01176.html) and
> > the same patches posted file by file are here (http://lists.xensource.com/archives/html/xen-devel/2010-05/msg00441.html) 
> > but now this patches doesn't work on Xen-4.2 unstable because the source code has changed. Well, as I am really interested
> > on VGA-Passthru I have adapted those patches to the new version of xen. I have attached them for you to try it and want to
> > know if they are still working.
> > 
> > This patch set should work for the same graphic cards that it worked on the past (NVIDIA GT200, Geforce 8400 GS ...).
> > 
> > The steps are the same:
> > 
> > Before all that, you need to read out the VGA Bios of the to-be-passthroughed-
> > Graphiccard with a tool; i used nvflash.exe under DOS for this task.
> > The patches assume you saved this file as "vgabios-pt.bin"
> > 
> > 1. check out xen unstable:
> >     hg clone http://xenbits.xensource.com/xen-unstable.hg (Or download the tarball xen-unstable.gz which I did)
> > 2. go into there and do an "initial build" so that qemu-dm gets checked-out:
> >     cd  xen-unstable.hg; cd tools; make ; make clean
> > 3. apply the patches from within the "xen-unstable.hg" dir, with patch -p0
> > 4. move the vgabios-pt.bin to "tools/firmware/vgabios/"
> > 4. do a "make install"
> > This is only for primary graphic card passthru, I didn't adapt the patch "qemu-claim-vga-cycle-for-secondary-gfx-passthrou
> > gh.patch" but if anyone need it I can do it too.
> > Unfortunately these patches don't work for my NVIDIA GTX460 graphic card. If anybody knows how can I make VGA-Passtrhough 
> > for this one it would be great! (Or if it is not possible tell me too plz)
> > I hope you find this helpful.
> 
> Thanks for your work! However my MUA cannot open your attachments, could
> you please send them again, maybe inline one email per patch?
> I think it is also worth updating the wiki page about VGA passthrough
> with your patches:
> 
> http://wiki.xensource.com/xenwiki/XenVGAPassthrough
>

Yep, indeed, thanks a lot for the patches!

JavMV: Did you take a look at the other Xen VGA passthru
patches posted last week (or so..) ? They make it possible
to dynamically load the firmware, so there's no need to
'hardcore' it into xen/qemu binaries.

It would be nice to get all these patches reviewed
and committed to xen-unstable.

-- Pasi

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-05-23 12:35   ` Pasi Kärkkäinen
@ 2011-05-23 12:49     ` Pavel Mateja
  2011-05-30 10:53       ` JavMV
  0 siblings, 1 reply; 102+ messages in thread
From: Pavel Mateja @ 2011-05-23 12:49 UTC (permalink / raw)
  To: xen-devel

> On Mon, May 23, 2011 at 11:48:00AM +0100, Stefano Stabellini wrote:
> > On Wed, 18 May 2011, JavMV wrote:
> > > Hello, I have been working on VGA-passthrough in the last month.
> > > 
> > > This patch set should work for the same graphic cards that it worked on
> > > the past (NVIDIA GT200, Geforce 8400 GS ...).
> 
> Yep, indeed, thanks a lot for the patches!
> 
> JavMV: Did you take a look at the other Xen VGA passthru
> patches posted last week (or so..) ? They make it possible
> to dynamically load the firmware, so there's no need to
> 'hardcore' it into xen/qemu binaries.
> 
> It would be nice to get all these patches reviewed
> and committed to xen-unstable.

This patchset breaks AMD VGA Passthrough. I think it's the "vBAR=pBAR" part.
Don't commit them pls.
-- 
Pavel Mateja

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-05-23 12:49     ` Pavel Mateja
@ 2011-05-30 10:53       ` JavMV
  2011-05-31 12:10         ` JavMV
  0 siblings, 1 reply; 102+ messages in thread
From: JavMV @ 2011-05-30 10:53 UTC (permalink / raw)
  To: xen-devel

Hi again, i have been bussy... So this patchset breaks AMD VGA Passthrough
but doesnt break Intel's? if this works for intel it is something so why
dont commit them?

Passi:
Can u post the link for the other patchs u mention above? I can't found them
and would be nice to have a look at that patches

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4438997.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-05-30 10:53       ` JavMV
@ 2011-05-31 12:10         ` JavMV
  2011-06-23 19:18           ` JavMV
  0 siblings, 1 reply; 102+ messages in thread
From: JavMV @ 2011-05-31 12:10 UTC (permalink / raw)
  To: xen-devel

Ok, I have already found the post u mentioned, Im going to have a look at it.
I'll post something about that later.

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4441716.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-05-31 12:10         ` JavMV
@ 2011-06-23 19:18           ` JavMV
  2011-06-27 15:33             ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 102+ messages in thread
From: JavMV @ 2011-06-23 19:18 UTC (permalink / raw)
  To: xen-devel

Well, Hi again!

I have been trying to understand the code of the patch for ATI cards that
makes possible
to dynamically load the firmware but it is really large and my goal is to
get passthrough for my NVIDIA card 
so I'm not going to use it (and I dont know how..) Im really stucked...
Do you know someone in xen-dev who is working on passthrouh actually? 

Maybe I get an ATI card like Liwei (the other person who was trying to get
GTX460 working with passtru) seems like passthru for NVIDIA cards are too
much difficult, and there is no documentation to help us in any way...

Well, as I'm thinking to buy a new graphic card I have done a list that
seems to work with this feature, I post it here, maybe is usefull for some
of you. (The list is based on reports that people have sent to xen-dev)

- Nvidia officially supports only Quadro FX 3800, 4800 and 5800

- Tested adapters by AMD: Radeon 4850, Radeon 4870, FirePro V5700 and
FirePro M5800.

- User reported working adapters:
 
 + ATI HD4550, ATI HD5750, using the Catalyst 10-9 driver on Win7 32bit.
Radeon 4770 on Fedora 12, WinXP and Win7.
 + NVIDIA GT200 (GeForce GTX 260)
 + NVIDIA 9500 GT
 + ATI 5450 with open source drivers.
 + AMD/ATI HD6850. (Esta es de las últimas)

Well if anyone knows anything about passthru on GTX460 would be greatly
appreciated


-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4518721.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-06-23 19:18           ` JavMV
@ 2011-06-27 15:33             ` Konrad Rzeszutek Wilk
  2011-06-27 15:42               ` JavMV
  0 siblings, 1 reply; 102+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-06-27 15:33 UTC (permalink / raw)
  To: JavMV; +Cc: xen-devel

On Thu, Jun 23, 2011 at 12:18:21PM -0700, JavMV wrote:
> Well, Hi again!
> 
> I have been trying to understand the code of the patch for ATI cards that
> makes possible
> to dynamically load the firmware but it is really large and my goal is to
> get passthrough for my NVIDIA card 
> so I'm not going to use it (and I dont know how..) Im really stucked...
> Do you know someone in xen-dev who is working on passthrouh actually? 

The ATI guys (guy) are definitly doing this.
> 
> Maybe I get an ATI card like Liwei (the other person who was trying to get
> GTX460 working with passtru) seems like passthru for NVIDIA cards are too
> much difficult, and there is no documentation to help us in any way...

Well, it is more that there is no documention on the NVIDIA cards and there
are some hacks neccessary for it to work. The business ends cards do seem
to have the proper BIOS to not be an issue.
> 
> Well, as I'm thinking to buy a new graphic card I have done a list that
> seems to work with this feature, I post it here, maybe is usefull for some
> of you. (The list is based on reports that people have sent to xen-dev)
> 
> - Nvidia officially supports only Quadro FX 3800, 4800 and 5800
> 
> - Tested adapters by AMD: Radeon 4850, Radeon 4870, FirePro V5700 and
> FirePro M5800.
> 
> - User reported working adapters:
>  
>  + ATI HD4550, ATI HD5750, using the Catalyst 10-9 driver on Win7 32bit.
> Radeon 4770 on Fedora 12, WinXP and Win7.
>  + NVIDIA GT200 (GeForce GTX 260)
>  + NVIDIA 9500 GT
>  + ATI 5450 with open source drivers.
>  + AMD/ATI HD6850. (Esta es de las últimas)
> 
> Well if anyone knows anything about passthru on GTX460 would be greatly
> appreciated

> 
> 
> -----
> JavMV
> --
> View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4518721.html
> Sent from the Xen - Dev mailing list archive at Nabble.com.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-06-27 15:33             ` Konrad Rzeszutek Wilk
@ 2011-06-27 15:42               ` JavMV
  0 siblings, 0 replies; 102+ messages in thread
From: JavMV @ 2011-06-27 15:42 UTC (permalink / raw)
  To: xen-devel

Thanks for your reply

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4528858.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
       [not found] ` <1312297850948-4659036.post@n5.nabble.com>
@ 2011-08-30 10:21   ` komkon555
  2011-08-30 13:55     ` JavMV
  0 siblings, 1 reply; 102+ messages in thread
From: komkon555 @ 2011-08-30 10:21 UTC (permalink / raw)
  To: xen-devel

I have no luck with xen 4.2-unstable changeset 23350 + jeremi xen kernel
2.6.32.43/45 (xenfs static) on debian sqeeze. I see Windows XP greeting
screen followed by blue screen (BSOD) a few seconds later.
Does anybody know for sure if these patches are functional?

Thank you in advance.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4749561.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-08-30 10:21   ` komkon555
@ 2011-08-30 13:55     ` JavMV
  2011-08-30 15:00       ` komkon555
  0 siblings, 1 reply; 102+ messages in thread
From: JavMV @ 2011-08-30 13:55 UTC (permalink / raw)
  To: xen-devel

Hi Komkon,

These patches were functional when I posted it, but now maybe xen-unstable
has changed the source code because xen-unstable4.2 is supossed to stay in
constant change (untill they decide to make a final release).

Maybe (and just maybe) I will adapt them again in October because I have to
include a successful example in a paper. If i finally adapt them I will post
the patchset for u to try it, i will need some feedback if u try it and it
works sucessfully.



-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4750109.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-08-30 13:55     ` JavMV
@ 2011-08-30 15:00       ` komkon555
  2011-08-30 16:06         ` JavMV
  0 siblings, 1 reply; 102+ messages in thread
From: komkon555 @ 2011-08-30 15:00 UTC (permalink / raw)
  To: xen-devel

Thank you for reply. The point is: I used xen-sources from the about
estimation-date of the patches. There were no errors while patching. What
sources changeset did you use to test patches? As for new revision of
patches in October: it would be grate. I'll test them with pleasure.

Best regards.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4750357.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-08-30 15:00       ` komkon555
@ 2011-08-30 16:06         ` JavMV
  2011-08-31  8:16           ` komkon555
  0 siblings, 1 reply; 102+ messages in thread
From: JavMV @ 2011-08-30 16:06 UTC (permalink / raw)
  To: xen-devel

Ok,

So did you try to install windows XP before use the patches in that
changeset? Did windows run normally? if this is correct you should be able
to patch that source of xen and run windows without problems using
VGA-passthrough with the primary graphic card (you must use the same
changeset that has allowed you to apply the patchset without errors). 

If you are having troubles post here your configuration file, maybe is
something wrong in there. Also you can try first to not enable the
gfx_passthru option and see if windows runs without errors, then restart and
enable the option and try again (if u get error logs attach them in your
next mail)

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4750600.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-08-30 16:06         ` JavMV
@ 2011-08-31  8:16           ` komkon555
  2011-08-31  8:38             ` Pasi Kärkkäinen
  0 siblings, 1 reply; 102+ messages in thread
From: komkon555 @ 2011-08-31  8:16 UTC (permalink / raw)
  To: xen-devel

Hi. Windows starts with xen4.2 normally as far as pci-passthrough for
VGA-Card is disabled. PCI-passthrough works perfect with other  pci-devices
(lan, sound and s.o.). With pci-passthrough enabled for VGA-Card (meters not
if GFX=0/1) Windows XP crashes. There is my configs:
HVM-client:

#  -*- mode: python; -*-
#============================================================================
# Python configuration setup for 'xm create'.
# This script sets the parameters used when a domain is created using 'xm
create'.
# You use a separate script for each domain you want to create, or
# you can set the parameters for the domain on the xm command line.
#============================================================================

#----------------------------------------------------------------------------
# Kernel image file.
kernel = "hvmloader"

# The domain build function. HVM domain uses 'hvm'.
builder='hvm'

memory = 1024

# A name for your domain. All domains must have different names.
name = "winxpvm1"

vif = [ 'type=ioemu, bridge=xenbr0' ]

disk = [ 'phy:/dev/data/vm01,ioemu:hda,w' ]

device_model = 'qemu-dm'

sdl=0

opengl=0

vnc=1

vncdisplay=1

stdvga=0

serial='pty'

tsc_mode=0

pci=[ '08:00.0' ]

gfx_passthru=1

###########################################################

/boo/grub/grub.cfg:

"xen-pciback.permissive xen-pciback.hide=(08:00.0)
pci=resource_alignment=08:00.0"

Thank you.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4753326.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-08-31  8:16           ` komkon555
@ 2011-08-31  8:38             ` Pasi Kärkkäinen
  2011-08-31  8:49               ` komkon555
  0 siblings, 1 reply; 102+ messages in thread
From: Pasi Kärkkäinen @ 2011-08-31  8:38 UTC (permalink / raw)
  To: komkon555; +Cc: xen-devel

On Wed, Aug 31, 2011 at 01:16:07AM -0700, komkon555 wrote:
> Hi. Windows starts with xen4.2 normally as far as pci-passthrough for
> VGA-Card is disabled. PCI-passthrough works perfect with other  pci-devices
> (lan, sound and s.o.). With pci-passthrough enabled for VGA-Card (meters not
> if GFX=0/1) Windows XP crashes. There is my configs:
> HVM-client:
> 
> #  -*- mode: python; -*-
> #============================================================================
> # Python configuration setup for 'xm create'.
> # This script sets the parameters used when a domain is created using 'xm
> create'.
> # You use a separate script for each domain you want to create, or
> # you can set the parameters for the domain on the xm command line.
> #============================================================================
> 
> #----------------------------------------------------------------------------
> # Kernel image file.
> kernel = "hvmloader"
> 
> # The domain build function. HVM domain uses 'hvm'.
> builder='hvm'
> 
> memory = 1024
> 
> # A name for your domain. All domains must have different names.
> name = "winxpvm1"
> 
> vif = [ 'type=ioemu, bridge=xenbr0' ]
> 
> disk = [ 'phy:/dev/data/vm01,ioemu:hda,w' ]
> 
> device_model = 'qemu-dm'
> 
> sdl=0
> 
> opengl=0
> 
> vnc=1
> 
> vncdisplay=1
> 
> stdvga=0
> 
> serial='pty'
> 
> tsc_mode=0
> 
> pci=[ '08:00.0' ]
> 
> gfx_passthru=1
> 
> ###########################################################
> 
> /boo/grub/grub.cfg:
> 
> "xen-pciback.permissive xen-pciback.hide=(08:00.0)
> pci=resource_alignment=08:00.0"
> 

Did you try without resource_alignment?

What's your gfx adapter?

-- Pasi

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-08-31  8:38             ` Pasi Kärkkäinen
@ 2011-08-31  8:49               ` komkon555
  2011-08-31 12:56                 ` komkon555
  0 siblings, 1 reply; 102+ messages in thread
From: komkon555 @ 2011-08-31  8:49 UTC (permalink / raw)
  To: xen-devel

Yes, I tried all possible xen-pciback entrances with the same result. My
adapter is: 
08:00.0 VGA compatible controller: nVidia Corporation GT200 [GeForce GTX
260] (rev a1) (prog-if 00 [VGA controller])
Subsystem: ZOTAC International (MCO) Ltd. Device 1109


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4753422.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-08-31  8:49               ` komkon555
@ 2011-08-31 12:56                 ` komkon555
  2011-08-31 15:19                   ` Pasi Kärkkäinen
  0 siblings, 1 reply; 102+ messages in thread
From: komkon555 @ 2011-08-31 12:56 UTC (permalink / raw)
  To: xen-devel

Some news more: right just now i had success with this configuration: xen
4.1-unstable changeset 21668 patched with these 
http://lists.xensource.com/archives/html/xen-devel/2010-05/msg00441.html
patches  + jeremi xen kernel 2.6.32.45 (xenfs static). Windows XP starts
normally. But the actual nvidia driver cannot be setup correctly.  If I try
shutdown Windows XP domU and dom0 both crash.



--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4754024.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-08-31 12:56                 ` komkon555
@ 2011-08-31 15:19                   ` Pasi Kärkkäinen
  2011-09-05 14:02                     ` David TECHER
  0 siblings, 1 reply; 102+ messages in thread
From: Pasi Kärkkäinen @ 2011-08-31 15:19 UTC (permalink / raw)
  To: komkon555; +Cc: xen-devel

On Wed, Aug 31, 2011 at 05:56:41AM -0700, komkon555 wrote:
> Some news more: right just now i had success with this configuration: xen
> 4.1-unstable changeset 21668 patched with these 
> http://lists.xensource.com/archives/html/xen-devel/2010-05/msg00441.html
> patches  + jeremi xen kernel 2.6.32.45 (xenfs static). Windows XP starts
> normally. But the actual nvidia driver cannot be setup correctly.  If I try
> shutdown Windows XP domU and dom0 both crash.
> 

yeah, vga passthru on nvidia requires some more work (=debuggin and patching).

-- Pasi

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-08-31 15:19                   ` Pasi Kärkkäinen
@ 2011-09-05 14:02                     ` David TECHER
  2011-09-06 11:57                       ` komkon555
  0 siblings, 1 reply; 102+ messages in thread
From: David TECHER @ 2011-09-05 14:02 UTC (permalink / raw)
  To: xen-devel

It works with Xen 4.2 unstable.

I've updated the patchs last week.

Please see 

http://old.nabble.com/Pathcs-for-VGA-PassThrough-for-xen-4.2-unstable-revision-23799-td32370790.html

for more informations.

David

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4770602.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-05 14:02                     ` David TECHER
@ 2011-09-06 11:57                       ` komkon555
  2011-09-06 21:17                         ` Re : " David TECHER
  0 siblings, 1 reply; 102+ messages in thread
From: komkon555 @ 2011-09-06 11:57 UTC (permalink / raw)
  To: xen-devel

             Hallo. I tested the new patches. The patched version of
xen-unstable let start/shutdown Windows XP normally. But the current nvidia
driver is not yet functional:  question-sign in device-manager windows. 
This problem is very sadly, because it makes no sense to use gfx-passthrough
for nvidia cards.
            Anyway thank you a lot for patches. I see some progress against
the old one.

P.S. Hardware as above.
 

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4774097.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-06 11:57                       ` komkon555
@ 2011-09-06 21:17                         ` David TECHER
  2011-09-07  8:05                           ` komkon555
  0 siblings, 1 reply; 102+ messages in thread
From: David TECHER @ 2011-09-06 21:17 UTC (permalink / raw)
  To: komkon555, xen-devel


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

For the tests I've done, I've tried the last driver .i.e 280.26.
 It failed.


So I use the old 275.33 and it works like a charm :) on 


- XP Pro 32 bits SP3
- XP Pro 64 bits SP2


I can launch Crysis 2 and play the game :)

Have a look at http://www.youtube.com/watch?v=3SaYO0ERW44


Well I am a little limited with my graphic card (MSI GT 440 1GB for resolution and XP) but it is just enough for me
on a resolution like 1440x900 ou 1600x??? to play the game.

Do not forget to adapt dsd to the requires ranges of your graphic card.

This is what I did for my card

-----------------------------------------------------------------------------------
root@mercury:~# lspci |grep VGA
01:00.0 VGA compatible controller: nVidia Corporation Device 0de0 (rev a1)
root@mercury:~# dmesg | grep 01:00.0 |grep mem
[    3.124546] pci 0000:01:00.0: reg 10: [mem 0xfa000000-0xfaffffff]
[    3.124565] pci 0000:01:00.0: reg 14: [mem 0xc0000000-0xcfffffff 64bit pref]
[    3.124584] pci 0000:01:00.0: reg 1c: [mem 0xd0000000-0xd1ffffff 64bit pref]
[    3.124609] pci 0000:01:00.0: reg 30: [mem 0xfb000000-0xfb07ffff pref]
[    3.199436] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
[    3.199730] pci 0000:01:00.0: BAR 0: reserving [mem 0xfa000000-0xfaffffff flags 0x40200] (d=0, p=0)
[    3.199732] pci 0000:01:00.0: BAR 1: reserving [mem 0xc0000000-0xcfffffff flags 0x14220c] (d=0, p=0)
[    3.199735] pci 0000:01:00.0: BAR 3: reserving [mem 0xd0000000-0xd1ffffff flags 0x14220c] (d=0, p=0)
root@mercury:~# cat gfx_patch/dsdt.asl.patch
--- tools/firmware/hvmloader/acpi/dsdt.asl      2011-08-13 18:43:39.000000000 +0200
+++ tools/firmware/hvmloader/acpi/dsdt.asl      2011-08-13 18:58:25.000000000 +0200
@@ -173,15 +173,43 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2,
                         0x00000000,
                         0x00020000)

+                    /* reserve MMIO BARs of gfx for 1:1 mapping */
                     DWordMemory(
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         Cacheable, ReadWrite,
                         0x00000000,
-                        0xF0000000,
-                        0xF4FFFFFF,
+                        0xFA000000,
+                        0xFAFFFFFF,
                         0x00000000,
-                        0x05000000,
-                        ,, _Y01)
+                        0x01000000)
+
+                    DWordMemory(
+                        ResourceProducer, PosDecode, MinFixed, MaxFixed,
+                        NonCacheable, ReadWrite,
+                        0x00000000,
+                        0xC0000000,
+                        0xCFFFFFFF,
+                        0x00000000,
+                        0x10000000)
+
+                    DWordMemory(
+                        ResourceProducer, PosDecode, MinFixed, MaxFixed,
+                        Cacheable, ReadWrite,
+                        0x00000000,
+                        0xD0000000,
+                        0xD1FFFFFF,
+                        0x00000000,
+                        0x02000000)
+
+                    DWordMemory(
+                        ResourceProducer, PosDecode, MinFixed, MaxFixed,
+                        Cacheable, ReadWrite,
+                        0x00000000,
+                        0xFB000000,
+                        0xFB07FFFF,
+                        0x00000000,
+                        0x00080000,
+                       ,, _Y01)
                 })

                 CreateDWordField(PRT0, \_SB.PCI0._CRS._Y01._MIN, MMIN)




________________________________
De : komkon555 <komkon555@freenet.de>
À : xen-devel@lists.xensource.com
Envoyé le : Mardi 6 Septembre 2011 12h57
Objet : [Xen-devel] Re: Patches for VGA-Passthrough XEN 4.2 unstable

             Hallo. I tested the new patches. The patched version of
xen-unstable let start/shutdown Windows XP normally. But the current nvidia
driver is not yet functional:  question-sign in device-manager windows. 
This problem is very sadly, because it makes no sense to use gfx-passthrough
for nvidia cards.
            Anyway thank you a lot for patches. I see some progress against
the old one.

P.S. Hardware as above.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4774097.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

[-- Attachment #1.2: Type: text/html, Size: 11175 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] 102+ messages in thread

* Re: Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-06 21:17                         ` Re : " David TECHER
@ 2011-09-07  8:05                           ` komkon555
  2011-09-07  9:45                             ` David TECHER
  2011-09-07  9:52                             ` Re : " David TECHER
  0 siblings, 2 replies; 102+ messages in thread
From: komkon555 @ 2011-09-07  8:05 UTC (permalink / raw)
  To: xen-devel

Hallo. Can you please explain, what is exactly to do with dsd. I don't
understand it. Which entrance are what for? 
Thank you.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4777689.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07  8:05                           ` komkon555
@ 2011-09-07  9:45                             ` David TECHER
  2011-09-07  9:52                             ` Re : " David TECHER
  1 sibling, 0 replies; 102+ messages in thread
From: David TECHER @ 2011-09-07  9:45 UTC (permalink / raw)
  To: xen-devel

Well it is very simple :)

I will show your a example 

You have to replace the required ranges in for the 4 "ranges"

1 --------> pci 0000:08:00.0: reg 10 32bit mmio: [0xf8000000-0xf8ffffff]
2 --------> pci 0000:08:00.0: reg 14 64bit mmio pref:
[0xd0000000-0xdfffffff]
3 --------> pci 0000:08:00.0: reg 1c 64bit mmio: [0xf6000000-0xf7ffffff]
4 --------> pci 0000:08:00.0: reg 30 32bit mmio pref:
[0xf5f80000-0xf5ffffff] 

I will do it for the number 1

1) You will have replace the required values in
tools/firmware/hvmloader/acpi/dsdt.asl 
    Search for the words  "/* reserve MMIO BARs of gfx for 1:1 mapping */"
in the file
    and the first block AFTER  need to be    change like that 

         Here the reference is 

     "pci 0000:08:00.0: reg 10 32bit mmio: [0xf8000000-0xf8ffffff]"
---------------------------------------------------------------------
         "/* reserve MMIO BARs of gfx for 1:1 mapping */
                     DWordMemory(
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         Cacheable, ReadWrite,
                        0x00000000,
                        0xF8000000, // the min value in hexadecimal, I
modify it here
                        0xF8FFFFFF, // the max value in hexadecimal I midify
it here
                        0x00000000,
                        ???????????) // value = max - min + 1 in hexadecimal
value, I need to find it
---------------------------------------------------------------------------

You need to convert the min and the max and do the conversion

For hexadecimal/decimal conversions,  go to a site like
http://www.statman.info/conversions/hexadecimal.html for doing conversion

For min and max values, you will have (enter the value without "0x" on the
site I told you, feel the field "Convert", click on "to decimal")
Hex            Dec
F8000000    4160749568
F8FFFFFF    4177526783

So 4177526783 - 4160749568 +1 = 16777216
So 16777216 is 1000000 in hexadecimal

As a consequence for

 pci 0000:08:00.0: reg 10 32bit mmio: [0xf8000000-0xf8ffffff]

you will have
------------------------------------------------------------------------
    "/* reserve MMIO BARs of gfx for 1:1 mapping */
                     DWordMemory(
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         Cacheable, ReadWrite,
                        0x00000000,
                        0xF8000000, // the min value in hexadecimal
                        0xF8FFFFFF, // the max value in hexadecimal
                        0x00000000,
                        0x01000000) // value = max - min + 1 in hexadecimal
value
----------------------------------------------------------------------------

Do the same steps for 

2 --------> pci 0000:08:00.0: reg 14 64bit mmio pref:
[0xd0000000-0xdfffffff]
3 --------> pci 0000:08:00.0: reg 1c 64bit mmio: [0xf6000000-0xf7ffffff]
4 --------> pci 0000:08:00.0: reg 30 32bit mmio pref:
[0xf5f80000-0xf5ffffff] 

That's all!

Ensure to put you vgabios-pt.bin in the required place. 

Compil and install.

My graphic card GT 440 works like a charm with nvidia 275.33. I've tried you
280.26 nvidia drivers but without any success. This driver version requires
more ressoures. 

The GPLPV drivers for HVM works well too!









--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4777943.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07  8:05                           ` komkon555
  2011-09-07  9:45                             ` David TECHER
@ 2011-09-07  9:52                             ` David TECHER
  2011-09-07 12:26                               ` komkon555
  1 sibling, 1 reply; 102+ messages in thread
From: David TECHER @ 2011-09-07  9:52 UTC (permalink / raw)
  To: komkon555, xen-devel


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

Well it is very simple :) 

I will show your a example 

You have to replace the required ranges in for the 4 "ranges"; So this is the info you've sent to me

1 --------> pci 0000:08:00.0: reg 10 32bit mmio: [0xf8000000-0xf8ffffff] 
2 --------> pci 0000:08:00.0: reg 14 64bit mmio pref: [0xd0000000-0xdfffffff] 
3 --------> pci 0000:08:00.0: reg 1c 64bit mmio: [0xf6000000-0xf7ffffff] 
4 --------> pci 0000:08:00.0: reg 30 32bit mmio pref: [0xf5f80000-0xf5ffffff] 

I will do it for the number 1 

1) You will have replace the required values in tools/firmware/hvmloader/acpi/dsdt.asl 
    Search for the words  "/* reserve MMIO BARs of gfx for 1:1 mapping */" in the file 
    and the first block AFTER  need to be    change like that 

         Here the reference is 

     "pci 0000:08:00.0: reg 10 32bit mmio: [0xf8000000-0xf8ffffff]" 
--------------------------------------------------------------------- 
         "/* reserve MMIO BARs of gfx for 1:1 mapping */ 
                     DWordMemory( 
                         ResourceProducer, PosDecode, MinFixed, MaxFixed, 
                         Cacheable, ReadWrite, 
                        0x00000000, 
                        0xF8000000, // the min value in hexadecimal, I modify it here 
                        0xF8FFFFFF, // the max value in hexadecimal I midify it here 
                        0x00000000, 
                        ???????????) // value = max - min + 1 in hexadecimal value, I need to find it 
--------------------------------------------------------------------------- 

You need to convert the min and the max and do the conversion 

For hexadecimal/decimal conversions,  go to a site like http://www.statman.info/conversions/hexadecimal.html for doing conversion 

For min and max values, you will have (enter the value without 
"0x" on the site I told you, feel the field "Convert", click on "to 
decimal") 
Hex            Dec 
F8000000    4160749568 
F8FFFFFF    4177526783 

So 4177526783 - 4160749568 +1 = 16777216 
So 16777216 is 1000000 in hexadecimal 

As a consequence for 

 pci 0000:08:00.0: reg 10 32bit mmio: [0xf8000000-0xf8ffffff] 

you will have 
------------------------------------------------------------------------ 
    "/* reserve MMIO BARs of gfx for 1:1 mapping */ 
                     DWordMemory( 
                         ResourceProducer, PosDecode, MinFixed, MaxFixed, 
                         Cacheable, ReadWrite, 
                        0x00000000, 
                        0xF8000000, // the min value in hexadecimal 
                        0xF8FFFFFF, // the max value in hexadecimal 
                        0x00000000, 
                        0x01000000) // value = max - min + 1 in hexadecimal value 
---------------------------------------------------------------------------- 

Do the same steps for 

2 --------> pci 0000:08:00.0: reg 14 64bit mmio pref: [0xd0000000-0xdfffffff] 
3 --------> pci 0000:08:00.0: reg 1c 64bit mmio: [0xf6000000-0xf7ffffff] 
4 --------> pci 0000:08:00.0: reg 30 32bit mmio pref: [0xf5f80000-0xf5ffffff] 

That's all! 

Ensure to put you vgabios-pt.bin in the required place. 

Compil and install. 

My graphic card GT 440 works like a charm with nvidia 275.33. 
I've tried you 280.26 nvidia drivers but without any success. This 
driver version requires more ressoures. 

The GPLPV drivers for HVM works well too! 


________________________________
De : komkon555 <komkon555@freenet.de>
À : xen-devel@lists.xensource.com
Envoyé le : Mercredi 7 Septembre 2011 10h05
Objet : Re: Re : [Xen-devel] Re: Patches for VGA-Passthrough XEN 4.2 unstable

Hallo. Can you please explain, what is exactly to do with dsd. I don't
understand it. Which entrance are what for? 
Thank you.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4777689.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

[-- Attachment #1.2: Type: text/html, Size: 6558 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] 102+ messages in thread

* Re: Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07  9:52                             ` Re : " David TECHER
@ 2011-09-07 12:26                               ` komkon555
  2011-09-07 12:51                                 ` Re : " David TECHER
  2011-09-07 13:25                                 ` komkon555
  0 siblings, 2 replies; 102+ messages in thread
From: komkon555 @ 2011-09-07 12:26 UTC (permalink / raw)
  To: xen-devel

Perfect, with the latest fixes and configurations it works! I can run dxdiag
and see all tests functional. Important is, that cuda-programming is also
functional (is what I exactly need). Thank you a lot! The next problem is
how to pass through the second (third, fourth) nvidia card to the next one
Windows-VM?  For me is most impotent to get 4 separate CUDA/OpenCL
programming areas.  Have you any ideas?

Tanks
Komkon555
 

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4778339.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 12:26                               ` komkon555
@ 2011-09-07 12:51                                 ` David TECHER
  2011-09-07 18:52                                   ` Konrad Rzeszutek Wilk
  2011-09-09  1:45                                   ` Weidong Han
  2011-09-07 13:25                                 ` komkon555
  1 sibling, 2 replies; 102+ messages in thread
From: David TECHER @ 2011-09-07 12:51 UTC (permalink / raw)
  To: komkon555, xen-devel


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

It is a great pleasure to know that is it working for you :)

I've just updated the patchs sent by 'JavMV' on May 2011. Even if I'am not a Xen Developer
it will be a great idea if a real Xen Developer takes care of the patchs to improve it for Xen 4.2.

The next step was to understand how the patch for 'tools/firmware/hvmloader/acpi/dsdt.asl'
works. Once I've understood, I've patched for my own graphic card.

That's all.


For my information, what kind of NVIDIA graphic card do you have? GT 430?GT 440, GTX?

Supporting  several cards?I do not know how to do.


My feeling is that using the same kind of manufacturer graphic card would be possible
because qemu-dm could only support one kind of VGA BIOS.

I know that in 2009 a patch was done to support more cards but I've tryid to updated it.




________________________________
De : komkon555 <komkon555@freenet.de>
À : xen-devel@lists.xensource.com
Envoyé le : Mercredi 7 Septembre 2011 14h26
Objet : Re: Re : Re : [Xen-devel] Re: Patches for VGA-Passthrough XEN 4.2 unstable

Perfect, with the latest fixes and configurations it works! I can run dxdiag
and see all tests functional. Important is, that cuda-programming is also
functional (is what I exactly need). Thank you a lot! The next problem is
how to pass through the second (third, fourth) nvidia card to the next one
Windows-VM?  For me is most impotent to get 4 separate CUDA/OpenCL
programming areas.  Have you any ideas?

Tanks
Komkon555


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4778339.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

[-- Attachment #1.2: Type: text/html, Size: 3227 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] 102+ messages in thread

* Re: Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 12:26                               ` komkon555
  2011-09-07 12:51                                 ` Re : " David TECHER
@ 2011-09-07 13:25                                 ` komkon555
  2011-09-07 13:54                                   ` JavMV
  1 sibling, 1 reply; 102+ messages in thread
From: komkon555 @ 2011-09-07 13:25 UTC (permalink / raw)
  To: xen-devel

My card is:
 VGA compatible controller: nVidia Corporation GT200 [GeForce GTX 260] (rev
a1)

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4778494.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 13:25                                 ` komkon555
@ 2011-09-07 13:54                                   ` JavMV
  2011-09-07 14:22                                     ` Re : " David TECHER
  0 siblings, 1 reply; 102+ messages in thread
From: JavMV @ 2011-09-07 13:54 UTC (permalink / raw)
  To: xen-devel

Congratulations!  these are nice news ^^, I have two questions, first one for
David:
Did u just adapt my patches or did you add some new things to them? (By the
way thank you for adapt them again, and for explain the dsdt modifications I
have realised that I made a mistake, maybe now I can make it work for my GTX
460).
The second one is for Komkom, would you mind to post a link for the
changeset of xen 4.2 about the date of my patches? (the one you said you
have tried before) I just want to know if my original pacthes are working
too.

Well, I'll work on this at the end of the month so I'll post here if this
work also for my graphic card (GTX 460) and if this is fine I will adapt the
patch for the secondary card to make you happier XD or maybe David is going
to do this faster than me because Im bussy until end of this month.

Best regards
Javier Manzano

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4778586.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 13:54                                   ` JavMV
@ 2011-09-07 14:22                                     ` David TECHER
  2011-09-07 14:32                                       ` komkon555
  0 siblings, 1 reply; 102+ messages in thread
From: David TECHER @ 2011-09-07 14:22 UTC (permalink / raw)
  To: JavMV, xen-devel


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

Javier,

1. Please be informed that the patched are available at http://www.davidgis.fr/download/gfx_patch.tar.bz2

wget -q http://www.davidgis.fr/download/gfx_patch.tar.bz2
tar xvjf gfx_patch.tar.bz2
for file in $(ls gfx_patch/*.patch);do patch -p0 < ../$file;done


2. Concerning your question, in xen-4.2.unstable one of the function was been placed in a new file.
   That's the reason why you will find the patch'tools/firmware/hvmloader/pci.c'
   I've did it because the branch 4.2 unstable placed the function in the file pci.c
   I can not tell you, you need to have a look (I am at work while I am writting this mail )

3. The patchs shoud work for revision 23799 on xen 4.2 unstable

    hg clone -r 23799 http://xenbits.xensource.com/hg/staging/xen-unstable.hg/


4. GTX 460: be informed that it will be a great pleasure to  know that you succeed in hacking  your GTX 460.
    I've got a 'EVGA GTX 460 SE' and it doesn't work. I think because EVGA overclocks
    the card. Perhaps I need to underclock the card using nibitor. I do not know. I've tryed yet.
   

  When I've tried to start my domU with GTX 460 the domU and dom0 crash.


   So let me know if you succeed :) 

  

  As far as I'am concern, you need to have a GTX 460 not super overclocked.


P.S: I've made a complete tutorial - but for French users only - available on my blog 

      http://www.davidgis.fr/blog/index.php?2011/08/28/818-xen-intel-vt-d-sur-core-5-2400-vga-passthrough-sur-carte-nvidia-msi-gt-440-partie-iv
       

David.




________________________________
De : JavMV <javier.manzano@edu.uah.es>
À : xen-devel@lists.xensource.com
Envoyé le : Mercredi 7 Septembre 2011 15h54
Objet : Re: Re : Re : [Xen-devel] Re: Patches for VGA-Passthrough XEN 4.2 unstable

Congratulations!  these are nice news ^^, I have two questions, first one for
David:
Did u just adapt my patches or did you add some new things to them? (By the
way thank you for adapt them again, and for explain the dsdt modifications I
have realised that I made a mistake, maybe now I can make it work for my GTX
460).
The second one is for Komkom, would you mind to post a link for the
changeset of xen 4.2 about the date of my patches? (the one you said you
have tried before) I just want to know if my original pacthes are working
too.

Well, I'll work on this at the end of the month so I'll post here if this
work also for my graphic card (GTX 460) and if this is fine I will adapt the
patch for the secondary card to make you happier XD or maybe David is going
to do this faster than me because Im bussy until end of this month.

Best regards
Javier Manzano

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4778586.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

[-- Attachment #1.2: Type: text/html, Size: 4763 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] 102+ messages in thread

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 14:22                                     ` Re : " David TECHER
@ 2011-09-07 14:32                                       ` komkon555
  2011-09-07 15:22                                         ` JavMV
  2011-09-21 13:44                                         ` JavMV
  0 siblings, 2 replies; 102+ messages in thread
From: komkon555 @ 2011-09-07 14:32 UTC (permalink / raw)
  To: xen-devel

Hallo. I had no success (BSOD while boot in) with patches from JavMV with
this config:  xen 4.2-unstable changeset 23350 (clearly patched) + jeremi
xen kernel 2.6.32.43/45 (xenfs static) on debian squeeze.

Best Regards
Komkon555


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4778727.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 14:32                                       ` komkon555
@ 2011-09-07 15:22                                         ` JavMV
  2011-09-07 16:21                                           ` komkon555
                                                             ` (2 more replies)
  2011-09-21 13:44                                         ` JavMV
  1 sibling, 3 replies; 102+ messages in thread
From: JavMV @ 2011-09-07 15:22 UTC (permalink / raw)
  To: xen-devel

I suppose you have modified the dsdt.asl file right? If you did it and it
crashed (If you didn't try it with this let me know because I have to
document the process of adapt the Tobias patches (Actually Han,Weidong
patches)) then there is something that Xen devels have added between those
changeset to the code that make the David's adaptation works (because David
says he didn't add code to the patches). 

I was working on a specific computer with XEN at university and I can't try
this patchset now, that is why I have to wait to end of month.. Im
impatient!!

Well thanks for the answers.

Javier Manzano.

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4778925.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 15:22                                         ` JavMV
@ 2011-09-07 16:21                                           ` komkon555
  2011-09-07 16:25                                           ` Re : " David TECHER
  2011-09-09  7:54                                           ` komkon555
  2 siblings, 0 replies; 102+ messages in thread
From: komkon555 @ 2011-09-07 16:21 UTC (permalink / raw)
  To: xen-devel

I tested your patches without any fix on DSD. So, I'll try to test it with
fixes this week.
Kom


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4779173.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 15:22                                         ` JavMV
  2011-09-07 16:21                                           ` komkon555
@ 2011-09-07 16:25                                           ` David TECHER
  2011-09-09  7:54                                           ` komkon555
  2 siblings, 0 replies; 102+ messages in thread
From: David TECHER @ 2011-09-07 16:25 UTC (permalink / raw)
  To: JavMV, xen-devel


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

Javier

Since you can test before the end of the month, please be informed to find the "all" patches here

Hope this helps.

David


------------------------------------------------------------

--- tools/firmware/hvmloader/acpi/dsdt.asl      2011-08-13 18:43:39.000000000 +0200
+++ tools/firmware/hvmloader/acpi/dsdt.asl      2011-08-13 18:58:25.000000000 +0200
@@ -173,15 +173,43 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2,
                         0x00000000,
                         0x00020000)

+                    /* reserve MMIO BARs of gfx for 1:1 mapping */
                     DWordMemory(
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         Cacheable, ReadWrite,
                         0x00000000,
-                        0xF0000000,
-                        0xF4FFFFFF,
+                        0xFA000000,
+                        0xFAFFFFFF,
                         0x00000000,
-                        0x05000000,
-                        ,, _Y01)
+                        0x01000000)
+
+                    DWordMemory(
+                        ResourceProducer, PosDecode, MinFixed, MaxFixed,
+                        NonCacheable, ReadWrite,
+                        0x00000000,
+                        0xC0000000,
+                        0xCFFFFFFF,
+                        0x00000000,
+                        0x10000000)
+
+                    DWordMemory(
+                        ResourceProducer, PosDecode, MinFixed, MaxFixed,
+                        Cacheable, ReadWrite,
+                        0x00000000,
+                        0xD0000000,
+                        0xD1FFFFFF,
+                        0x00000000,
+                        0x02000000)
+
+                    DWordMemory(
+                        ResourceProducer, PosDecode, MinFixed, MaxFixed,
+                        Cacheable, ReadWrite,
+                        0x00000000,
+                        0xFB000000,
+                        0xFB07FFFF,
+                        0x00000000,
+                        0x00080000,
+                       ,, _Y01)
                 })

                 CreateDWordField(PRT0, \_SB.PCI0._CRS._Y01._MIN, MMIN)
--- tools/firmware/hvmloader/hvmloader.c        2011-08-13 18:43:39.000000000 +0200
+++ tools/firmware/hvmloader/hvmloader.c        2011-08-13 19:16:21.000000000 +0200
@@ -31,6 +31,7 @@
 #include <xen/hvm/params.h>

 #define ROM_INCLUDE_VGABIOS
+#define ROM_INCLUDE_PTVGABIOS
 #define ROM_INCLUDE_ETHERBOOT
 #include "roms.inc"

@@ -113,6 +114,9 @@ asm (

 unsigned long scratch_start = SCRATCH_PHYSICAL_ADDRESS;

+/* virtual BDF of pass-throughed gfx */
+uint8_t gfx_bdf;
+
 static void init_hypercalls(void)
 {
     uint32_t eax, ebx, ecx, edx;
@@ -310,6 +314,20 @@ static int pci_load_option_roms(unsigned
     return rom_phys_addr - rom_base_addr;
 }

+static void init_vm86_tss(void)
+{
+    void *tss;
+    struct xen_hvm_param p;
+
+    tss = mem_alloc(128, 128);
+    memset(tss, 0, 128);
+    p.domid = DOMID_SELF;
+    p.index = HVM_PARAM_VM86_TSS;
+    p.value = virt_to_phys(tss);
+    hypercall_hvm_op(HVMOP_set_param, &p);
+    printf("vm86 TSS at %08lx\n", virt_to_phys(tss));
+}
+
 /* Replace possibly erroneous memory-size CMOS fields with correct values. */
 static void cmos_write_memory_size(void)
 {
@@ -336,25 +354,6 @@ static void cmos_write_memory_size(void)
     cmos_outb(0x35, (uint8_t)( alt_mem >> 8));
 }

-/*
- * Set up an empty TSS area for virtual 8086 mode to use.
- * The only important thing is that it musn't have any bits set
- * in the interrupt redirection bitmap, so all zeros will do.
- */
-static void init_vm86_tss(void)
-{
-    void *tss;
-    struct xen_hvm_param p;
-
-    tss = mem_alloc(128, 128);
-    memset(tss, 0, 128);
-    p.domid = DOMID_SELF;
-    p.index = HVM_PARAM_VM86_TSS;
-    p.value = virt_to_phys(tss);
-    hypercall_hvm_op(HVMOP_set_param, &p);
-    printf("vm86 TSS at %08lx\n", virt_to_phys(tss));
-}
-
 static void apic_setup(void)
 {
     /* Set the IOAPIC ID to the static value used in the MP/ACPI tables. */
@@ -487,8 +486,10 @@ int main(void)
             break;
         case VGA_pt:
             printf("Loading VGABIOS of passthroughed gfx ...\n");
-            vgabios_sz = round_option_rom(
-                (*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * 512);
+        memcpy((void *)VGABIOS_PHYSICAL_ADDRESS,
+               vgabios_pt, sizeof(vgabios_pt));
+        *(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS + sizeof(vgabios_pt)) = gfx_bdf;
+        vgabios_sz = round_option_rom(sizeof(vgabios_pt) + 1);
             break;
         default:
             printf("No emulated VGA adaptor ...\n");
@@ -525,7 +526,7 @@ int main(void)
         hypercall_hvm_op(HVMOP_set_param, &p);
     }

-    init_vm86_tss();
+   init_vm86_tss();

     cmos_write_memory_size();

--- tools/firmware/hvmloader/Makefile   2011-08-13 18:43:39.000000000 +0200
+++ tools/firmware/hvmloader/Makefile   2011-08-13 18:58:36.000000000 +0200
@@ -56,6 +56,7 @@ CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl
 else
 CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl-latest.cirrus.bin
 endif
+PTVGA_ROM     := ../vgabios/vgabios-pt.bin

 .PHONY: all
 all: subdirs-all
@@ -94,6 +95,11 @@ ifneq ($(CIRRUSVGA_ROM),)
        sh ./mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
        echo "#endif" >> $@.new
 endif
+ifneq ($(PTVGA_ROM),)
+       echo "#ifdef ROM_INCLUDE_PTVGABIOS" >> $@.new
+       sh ./mkhex vgabios_pt $(PTVGA_ROM) >> $@.new
+       echo "#endif" >> $@.new
+endif

        echo "#ifdef ROM_INCLUDE_ETHERBOOT" >> $@.new
        cat ../etherboot/eb-roms.h >> $@.new
--- tools/ioemu-remote/hw/pass-through.c        2011-08-13 23:15:13.000000000 +0200
+++ tools/ioemu-remote/hw/pass-through.c        2011-08-13 18:58:41.000000000 +0200
@@ -3243,6 +3243,8 @@ static int pt_cmd_reg_read(struct pt_dev
 }

 /* read BAR */
+static int gfx_first_read_BAR[7] = {1, 1, 1, 1, 1, 1, 1};
+
 static int pt_bar_reg_read(struct pt_dev *ptdev,
         struct pt_reg_tbl *cfg_entry,
         uint32_t *value, uint32_t valid_mask)
@@ -3265,6 +3267,17 @@ static int pt_bar_reg_read(struct pt_dev
     /* use fixed-up value from kernel sysfs */
     *value = ptdev->pci_dev->base_addr[index];

+    if ( ptdev->pci_dev->device_class == 0x300 )
+    {
+        if ( gfx_first_read_BAR[index] == 1 )
+        {
+            gfx_first_read_BAR[index] = 0;
+            PT_LOG("first read BARs of gfx\n");
+            return 0;
+        }
+    }
+
+
     /* set emulate mask depend on BAR flag */
     switch (ptdev->bases[index].bar_flag)
     {
--- tools/firmware/hvmloader/pci.c      2011-08-13 18:43:39.000000000 +0200
+++ tools/firmware/hvmloader/pci.c      2011-08-13 18:58:53.000000000 +0200
@@ -33,6 +33,10 @@ unsigned long pci_mem_end = PCI_MEM_END;

 enum virtual_vga virtual_vga = VGA_none;

+/* virtual BDF of pass-throughed gfx declared in hvmloader.c*/
+extern uint8_t gfx_bdf;
+
+
 void pci_setup(void)
 {
     uint32_t base, devfn, bar_reg, bar_data, bar_sz, cmd, mmio_total = 0;
@@ -93,9 +97,44 @@ void pci_setup(void)
             }
             else if ( virtual_vga == VGA_none )
             {
-                vga_devfn = devfn;
-                virtual_vga = VGA_pt;
+                 virtual_vga = VGA_pt;
+                 gfx_bdf = devfn;
+
+                 /* Make vBAR=pBAR */
+                 printf("Make vBAR = pBAR of assigned gfx\n");
+                 for ( bar = 0; bar < 7; bar++ )
+                 {
+                     bar_reg = PCI_BASE_ADDRESS_0 + 4*bar;
+                     if ( bar == 6 )
+                             bar_reg = PCI_ROM_ADDRESS;
+                     /* When first time read, it will return physical address */
+                     bar_data = pci_readl(devfn, bar_reg);
+                     pci_writel(devfn, bar_reg, bar_data);
+
+                     /* Now enable the memory or I/O mapping. */
+                     cmd = pci_readw(devfn, PCI_COMMAND);
+                     if ( (bar_reg == PCI_ROM_ADDRESS) ||
+                              ((bar_data & PCI_BASE_ADDRESS_SPACE) ==
+                               PCI_BASE_ADDRESS_SPACE_MEMORY) )
+                           cmd |= PCI_COMMAND_MEMORY;
+                     else
+                           cmd |= PCI_COMMAND_IO;
+                     cmd |= PCI_COMMAND_MASTER;
+                     pci_writew(devfn, PCI_COMMAND, cmd);
+                }
+
+                 /* Map the interrupt. */
+                 pin = pci_readb(devfn, PCI_INTERRUPT_PIN);
+                 if ( pin != 0 )
+                 {
+                     /* This is the barber's pole mapping used by Xen. */
+                     link = ((pin - 1) + (devfn >> 3)) & 3;
+                     isa_irq = pci_readb(PCI_ISA_DEVFN, 0x60 + link);
+                     pci_writeb(devfn, PCI_INTERRUPT_LINE, isa_irq);
+                 }
+                 continue;
             }
+
             break;
         case 0x0680:
             /* PIIX4 ACPI PM. Special device with special PCI config space. */
-------------------------------------------------------------------------------



________________________________
De : JavMV <javier.manzano@edu.uah.es>
À : xen-devel@lists.xensource.com
Envoyé le : Mercredi 7 Septembre 2011 17h22
Objet : Re: Re : Re : Re : [Xen-devel] Re: Patches for VGA-Passthrough XEN 4.2 unstable

I suppose you have modified the dsdt.asl file right? If you did it and it
crashed (If you didn't try it with this let me know because I have to
document the process of adapt the Tobias patches (Actually Han,Weidong
patches)) then there is something that Xen devels have added between those
changeset to the code that make the David's adaptation works (because David
says he didn't add code to the patches). 

I was working on a specific computer with XEN at university and I can't try
this patchset now, that is why I have to wait to end of month.. Im
impatient!!

Well thanks for the answers.

Javier Manzano.

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4778925.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

[-- Attachment #1.2: Type: text/html, Size: 23129 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] 102+ messages in thread

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 12:51                                 ` Re : " David TECHER
@ 2011-09-07 18:52                                   ` Konrad Rzeszutek Wilk
  2011-09-07 19:57                                     ` Re : " David TECHER
  2011-09-09  1:45                                   ` Weidong Han
  1 sibling, 1 reply; 102+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-09-07 18:52 UTC (permalink / raw)
  To: David TECHER; +Cc: komkon555, xen-devel

On Wed, Sep 07, 2011 at 01:51:29PM +0100, David TECHER wrote:
> It is a great pleasure to know that is it working for you :)
> 
> I've just updated the patchs sent by 'JavMV' on May 2011. Even if I'am not a Xen Developer
> it will be a great idea if a real Xen Developer takes care of the patchs to improve it for Xen 4.2.

Where are those patches? Can you attach them to this email?

> 
> The next step was to understand how the patch for 'tools/firmware/hvmloader/acpi/dsdt.asl'
> works. Once I've understood, I've patched for my own graphic card.

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

* Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 18:52                                   ` Konrad Rzeszutek Wilk
@ 2011-09-07 19:57                                     ` David TECHER
  0 siblings, 0 replies; 102+ messages in thread
From: David TECHER @ 2011-09-07 19:57 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: komkon555, xen-devel


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

Hi Konrad,


Here is.

David.



________________________________
De : Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
À : David TECHER <davidtecher@yahoo.fr>
Cc : komkon555 <komkon555@freenet.de>; "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Envoyé le : Mercredi 7 Septembre 2011 20h52
Objet : Re: Re : Re : Re : [Xen-devel] Re: Patches for VGA-Passthrough XEN 4.2 unstable

On Wed, Sep 07, 2011 at 01:51:29PM +0100, David TECHER wrote:
> It is a great pleasure to know that is it working for you :)
> 
> I've just updated the patchs sent by 'JavMV' on May 2011. Even if I'am not a Xen Developer
> it will be a great idea if a real Xen Developer takes care of the patchs to improve it for Xen 4.2.

Where are those patches? Can you attach them to this email?

> 
> The next step was to understand how the patch for 'tools/firmware/hvmloader/acpi/dsdt.asl'
> works. Once I've understood, I've patched for my own graphic card.

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

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

[-- Attachment #2: gfx.patch --]
[-- Type: application/octet-stream, Size: 8778 bytes --]

--- tools/firmware/hvmloader/acpi/dsdt.asl	2011-08-13 18:43:39.000000000 +0200
+++ tools/firmware/hvmloader/acpi/dsdt.asl	2011-08-13 18:58:25.000000000 +0200
@@ -173,15 +173,43 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2,
                         0x00000000,
                         0x00020000)
 
+                    /* reserve MMIO BARs of gfx for 1:1 mapping */
                     DWordMemory(
                         ResourceProducer, PosDecode, MinFixed, MaxFixed,
                         Cacheable, ReadWrite,
                         0x00000000,
-                        0xF0000000,
-                        0xF4FFFFFF,
+                        0xFA000000,
+                        0xFAFFFFFF,
                         0x00000000,
-                        0x05000000,
-                        ,, _Y01)
+                        0x01000000)
+
+                    DWordMemory(
+                        ResourceProducer, PosDecode, MinFixed, MaxFixed,
+                        NonCacheable, ReadWrite,
+                        0x00000000,
+                        0xC0000000,
+                        0xCFFFFFFF,
+                        0x00000000,
+                        0x10000000)
+
+                    DWordMemory(
+                        ResourceProducer, PosDecode, MinFixed, MaxFixed,
+                        Cacheable, ReadWrite,
+                        0x00000000,
+                        0xD0000000,
+                        0xD1FFFFFF,
+                        0x00000000,
+                        0x02000000)
+
+                    DWordMemory(
+                        ResourceProducer, PosDecode, MinFixed, MaxFixed,
+                        Cacheable, ReadWrite,
+                        0x00000000,
+                        0xFB000000,
+                        0xFB07FFFF,
+                        0x00000000,
+                        0x00080000,                        
+			,, _Y01)
                 })
 
                 CreateDWordField(PRT0, \_SB.PCI0._CRS._Y01._MIN, MMIN)
--- tools/firmware/hvmloader/hvmloader.c	2011-08-13 18:43:39.000000000 +0200
+++ tools/firmware/hvmloader/hvmloader.c	2011-08-13 19:16:21.000000000 +0200
@@ -31,6 +31,7 @@
 #include <xen/hvm/params.h>
 
 #define ROM_INCLUDE_VGABIOS
+#define ROM_INCLUDE_PTVGABIOS
 #define ROM_INCLUDE_ETHERBOOT
 #include "roms.inc"
 
@@ -113,6 +114,9 @@ asm (
 
 unsigned long scratch_start = SCRATCH_PHYSICAL_ADDRESS;
 
+/* virtual BDF of pass-throughed gfx */
+uint8_t gfx_bdf;
+
 static void init_hypercalls(void)
 {
     uint32_t eax, ebx, ecx, edx;
@@ -310,6 +314,20 @@ static int pci_load_option_roms(unsigned
     return rom_phys_addr - rom_base_addr;
 }
 
+static void init_vm86_tss(void)
+{
+    void *tss;
+    struct xen_hvm_param p;
+
+    tss = mem_alloc(128, 128);
+    memset(tss, 0, 128);
+    p.domid = DOMID_SELF;
+    p.index = HVM_PARAM_VM86_TSS;
+    p.value = virt_to_phys(tss);
+    hypercall_hvm_op(HVMOP_set_param, &p);
+    printf("vm86 TSS at %08lx\n", virt_to_phys(tss));
+}
+
 /* Replace possibly erroneous memory-size CMOS fields with correct values. */
 static void cmos_write_memory_size(void)
 {
@@ -336,25 +354,6 @@ static void cmos_write_memory_size(void)
     cmos_outb(0x35, (uint8_t)( alt_mem >> 8));
 }
 
-/*
- * Set up an empty TSS area for virtual 8086 mode to use. 
- * The only important thing is that it musn't have any bits set 
- * in the interrupt redirection bitmap, so all zeros will do.
- */
-static void init_vm86_tss(void)
-{
-    void *tss;
-    struct xen_hvm_param p;
-
-    tss = mem_alloc(128, 128);
-    memset(tss, 0, 128);
-    p.domid = DOMID_SELF;
-    p.index = HVM_PARAM_VM86_TSS;
-    p.value = virt_to_phys(tss);
-    hypercall_hvm_op(HVMOP_set_param, &p);
-    printf("vm86 TSS at %08lx\n", virt_to_phys(tss));
-}
-
 static void apic_setup(void)
 {
     /* Set the IOAPIC ID to the static value used in the MP/ACPI tables. */
@@ -487,8 +486,10 @@ int main(void)
             break;
         case VGA_pt:
             printf("Loading VGABIOS of passthroughed gfx ...\n");
-            vgabios_sz = round_option_rom(
-                (*(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS+2)) * 512);
+        memcpy((void *)VGABIOS_PHYSICAL_ADDRESS,
+               vgabios_pt, sizeof(vgabios_pt));
+        *(uint8_t *)(VGABIOS_PHYSICAL_ADDRESS + sizeof(vgabios_pt)) = gfx_bdf;
+        vgabios_sz = round_option_rom(sizeof(vgabios_pt) + 1);
             break;
         default:
             printf("No emulated VGA adaptor ...\n");
@@ -525,7 +526,7 @@ int main(void)
         hypercall_hvm_op(HVMOP_set_param, &p);
     }
 
-    init_vm86_tss();
+   init_vm86_tss();
 
     cmos_write_memory_size();
 
--- tools/firmware/hvmloader/Makefile	2011-08-13 18:43:39.000000000 +0200
+++ tools/firmware/hvmloader/Makefile	2011-08-13 18:58:36.000000000 +0200
@@ -56,6 +56,7 @@ CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl
 else
 CIRRUSVGA_ROM := ../vgabios/VGABIOS-lgpl-latest.cirrus.bin
 endif
+PTVGA_ROM     := ../vgabios/vgabios-pt.bin
 
 .PHONY: all
 all: subdirs-all
@@ -94,6 +95,11 @@ ifneq ($(CIRRUSVGA_ROM),)
 	sh ./mkhex vgabios_cirrusvga $(CIRRUSVGA_ROM) >> $@.new
 	echo "#endif" >> $@.new
 endif
+ifneq ($(PTVGA_ROM),)
+	echo "#ifdef ROM_INCLUDE_PTVGABIOS" >> $@.new
+	sh ./mkhex vgabios_pt $(PTVGA_ROM) >> $@.new
+	echo "#endif" >> $@.new
+endif
 
 	echo "#ifdef ROM_INCLUDE_ETHERBOOT" >> $@.new
 	cat ../etherboot/eb-roms.h >> $@.new
--- tools/ioemu-remote/hw/pass-through.c	2011-08-13 23:15:13.000000000 +0200
+++ tools/ioemu-remote/hw/pass-through.c	2011-08-13 18:58:41.000000000 +0200
@@ -3243,6 +3243,8 @@ static int pt_cmd_reg_read(struct pt_dev
 }
 
 /* read BAR */
+static int gfx_first_read_BAR[7] = {1, 1, 1, 1, 1, 1, 1};
+
 static int pt_bar_reg_read(struct pt_dev *ptdev,
         struct pt_reg_tbl *cfg_entry,
         uint32_t *value, uint32_t valid_mask)
@@ -3265,6 +3267,17 @@ static int pt_bar_reg_read(struct pt_dev
     /* use fixed-up value from kernel sysfs */
     *value = ptdev->pci_dev->base_addr[index];
 
+    if ( ptdev->pci_dev->device_class == 0x300 )
+    {
+        if ( gfx_first_read_BAR[index] == 1 )
+        {
+            gfx_first_read_BAR[index] = 0;
+            PT_LOG("first read BARs of gfx\n");
+            return 0;
+        }
+    }
+
+
     /* set emulate mask depend on BAR flag */
     switch (ptdev->bases[index].bar_flag)
     {
--- tools/firmware/hvmloader/pci.c	2011-08-13 18:43:39.000000000 +0200
+++ tools/firmware/hvmloader/pci.c	2011-08-13 18:58:53.000000000 +0200
@@ -33,6 +33,10 @@ unsigned long pci_mem_end = PCI_MEM_END;
 
 enum virtual_vga virtual_vga = VGA_none;
 
+/* virtual BDF of pass-throughed gfx declared in hvmloader.c*/
+extern uint8_t gfx_bdf;
+
+
 void pci_setup(void)
 {
     uint32_t base, devfn, bar_reg, bar_data, bar_sz, cmd, mmio_total = 0;
@@ -93,9 +97,44 @@ void pci_setup(void)
             }
             else if ( virtual_vga == VGA_none )
             {
-                vga_devfn = devfn;
-                virtual_vga = VGA_pt;
+                 virtual_vga = VGA_pt;
+                 gfx_bdf = devfn;
+ 
+                 /* Make vBAR=pBAR */
+                 printf("Make vBAR = pBAR of assigned gfx\n");
+                 for ( bar = 0; bar < 7; bar++ )
+                 {
+                     bar_reg = PCI_BASE_ADDRESS_0 + 4*bar;
+                     if ( bar == 6 )
+                             bar_reg = PCI_ROM_ADDRESS;
+                     /* When first time read, it will return physical address */
+                     bar_data = pci_readl(devfn, bar_reg);
+                     pci_writel(devfn, bar_reg, bar_data);
+ 
+                     /* Now enable the memory or I/O mapping. */
+                     cmd = pci_readw(devfn, PCI_COMMAND);
+                     if ( (bar_reg == PCI_ROM_ADDRESS) ||
+                              ((bar_data & PCI_BASE_ADDRESS_SPACE) ==
+                               PCI_BASE_ADDRESS_SPACE_MEMORY) )
+                           cmd |= PCI_COMMAND_MEMORY;
+                     else
+                           cmd |= PCI_COMMAND_IO;
+                     cmd |= PCI_COMMAND_MASTER;
+                     pci_writew(devfn, PCI_COMMAND, cmd);
+                }
+ 
+                 /* Map the interrupt. */
+                 pin = pci_readb(devfn, PCI_INTERRUPT_PIN);
+                 if ( pin != 0 )
+                 {
+                     /* This is the barber's pole mapping used by Xen. */
+                     link = ((pin - 1) + (devfn >> 3)) & 3;
+                     isa_irq = pci_readb(PCI_ISA_DEVFN, 0x60 + link);
+                     pci_writeb(devfn, PCI_INTERRUPT_LINE, isa_irq);
+                 }
+                 continue;
             }
+
             break;
         case 0x0680:
             /* PIIX4 ACPI PM. Special device with special PCI config space. */

[-- Attachment #3: 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] 102+ messages in thread

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 12:51                                 ` Re : " David TECHER
  2011-09-07 18:52                                   ` Konrad Rzeszutek Wilk
@ 2011-09-09  1:45                                   ` Weidong Han
  2011-09-09  8:07                                     ` komkon555
  1 sibling, 1 reply; 102+ messages in thread
From: Weidong Han @ 2011-09-09  1:45 UTC (permalink / raw)
  To: David TECHER; +Cc: komkon555, xen-devel

On 2011-9-7 20:51, David TECHER wrote:
> It is a great pleasure to know that is it working for you :)
>
> I've just updated the patchs sent by 'JavMV' on May 2011. Even if I'am
> not a Xen Developer
> it will be a great idea if a real Xen Developer takes care of the patchs
> to improve it for Xen 4.2.
>
> The next step was to understand how the patch for
> 'tools/firmware/hvmloader/acpi/dsdt.asl'
> works. Once I've understood, I've patched for my own graphic card.
>
> That's all.
>
> For my information, what kind of NVIDIA graphic card do you have? GT
> 430?GT 440, GTX?
>
> Supporting several cards?I do not know how to do.
>
> My feeling is that using the same kind of manufacturer graphic card
> would be possible
> because qemu-dm could only support one kind of VGA BIOS.

Guest needs VGA BIOS to initialize assigned graphics card in guest. 
qemu-dm only know how to copy video BIOS of primary graphics card which 
locates at 0xC0000, but don't know where are video BIOS of other 
graphics cards. if want to pass-through more than one graphics cards, 
must know how to get and load VGA BIOS to guest for other graphics 
cards. One method is to use tools such as NiBiTor to extract VGA BIOS 
from graphics card to a file, then load it to guest.

Weidong


>
> I know that in 2009 a patch was done to support more cards but I've
> tryid to updated it.
>
>
>
> ------------------------------------------------------------------------
> *De :* komkon555 <komkon555@freenet.de>
> *À :* xen-devel@lists.xensource.com
> *Envoyé le :* Mercredi 7 Septembre 2011 14h26
> *Objet :* Re: Re : Re : [Xen-devel] Re: Patches for VGA-Passthrough XEN
> 4.2 unstable
>
> Perfect, with the latest fixes and configurations it works! I can run dxdiag
> and see all tests functional. Important is, that cuda-programming is also
> functional (is what I exactly need). Thank you a lot! The next problem is
> how to pass through the second (third, fourth) nvidia card to the next one
> Windows-VM? For me is most impotent to get 4 separate CUDA/OpenCL
> programming areas. Have you any ideas?
>
> Tanks
> Komkon555
>
>
> --
> View this message in context:
> http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4778339.html
> Sent from the Xen - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com <mailto:Xen-devel@lists.xensource.com>
> http://lists.xensource.com/xen-devel
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 15:22                                         ` JavMV
  2011-09-07 16:21                                           ` komkon555
  2011-09-07 16:25                                           ` Re : " David TECHER
@ 2011-09-09  7:54                                           ` komkon555
  2011-09-09 12:29                                             ` JavMV
                                                               ` (2 more replies)
  2 siblings, 3 replies; 102+ messages in thread
From: komkon555 @ 2011-09-09  7:54 UTC (permalink / raw)
  To: xen-devel

           Hi. There is the promised report to JavMV: with fixes on dsd are
your patches also functional. Windows XP starts and GTX260 works perfect
with driver version 275.33.
          Some news more: The best results I got with this configuration:
xen 4.1-unstable changeset 21668 (patched clearly with these 
http://lists.xensource.com/archives/html/xen-devel/2010-05/msg00441.html
patches , dsd fixed according to David TECHER) + jeremi xen kernel 2.6.32.45
(xenfs static). This configuration works excellent both: with primary and
secondary vga-adapter (GTX260). There are two Problem with all
configurations:
1. DomU can be started only once. Being  correctly shouted  down, starts
DomU no more.
2. Physical usb- keyboard and mouse can not be assigned to DomU (regular usb
assignment has no effect, PVUSB crashes)

Best regards
Kom.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4785386.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-09  1:45                                   ` Weidong Han
@ 2011-09-09  8:07                                     ` komkon555
  0 siblings, 0 replies; 102+ messages in thread
From: komkon555 @ 2011-09-09  8:07 UTC (permalink / raw)
  To: xen-devel


Weidong Han wrote:
> 
> Guest needs VGA BIOS to initialize assigned graphics card in guest. 
> qemu-dm only know how to copy video BIOS of primary graphics card which 
> locates at 0xC0000, but don't know where are video BIOS of other 
> graphics cards. if want to pass-through more than one graphics cards, 
> must know how to get and load VGA BIOS to guest for other graphics 
> cards. One method is to use tools such as NiBiTor to extract VGA BIOS 
> from graphics card to a file, then load it to guest.
> 
> Weidong
> 

Hallo. What about ATI/AMD cards: are they in the same situation?  Is it
possible for today to pass through multiple ATI/AMD devices?
Thank you.

Best regards
Kom.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4785425.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
@ 2011-09-09 11:31 ` Liwei
  2011-09-09 16:17   ` Wei Huang
                     ` (2 more replies)
  0 siblings, 3 replies; 102+ messages in thread
From: Liwei @ 2011-09-09 11:31 UTC (permalink / raw)
  To: komkon555; +Cc: xen-devel

> Date: Fri, 9 Sep 2011 01:07:50 -0700 (PDT)
> From: komkon555 <komkon555@freenet.de>
> Subject: Re: Re : Re : Re : [Xen-devel] Re: Patches for
>        VGA-Passthrough XEN     4.2 unstable
> To: xen-devel@lists.xensource.com
> Message-ID: <1315555670684-4785425.post@n5.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> Weidong Han wrote:
> >
> > Guest needs VGA BIOS to initialize assigned graphics card in guest.
> > qemu-dm only know how to copy video BIOS of primary graphics card which
> > locates at 0xC0000, but don't know where are video BIOS of other
> > graphics cards. if want to pass-through more than one graphics cards,
> > must know how to get and load VGA BIOS to guest for other graphics
> > cards. One method is to use tools such as NiBiTor to extract VGA BIOS
> > from graphics card to a file, then load it to guest.
> >
> > Weidong
> >
>
> Hallo. What about ATI/AMD cards: are they in the same situation?  Is it
> possible for today to pass through multiple ATI/AMD devices?
> Thank you.
>

Personally I'm having positive experiences with AMD cards. Currently
running two ATI 6870s in a 64-bit Windows 7 DomU. Best thing is,
they're working alright without any patches on xen-unstable. However,
similar to what you have experienced, DomU cannot be restarted in this
configuration. It can be fixed, but I haven't got the time to get down
to it.

Regarding your problem with passing through the USB controller, have
you tried it without the VGA passthrough patches? IMO it may not be
related to the passthrough patches.

> Best regards
> Kom.
>

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-09  7:54                                           ` komkon555
@ 2011-09-09 12:29                                             ` JavMV
  2011-09-09 13:28                                             ` Pasi Kärkkäinen
  2011-09-09 19:56                                             ` Re : " David TECHER
  2 siblings, 0 replies; 102+ messages in thread
From: JavMV @ 2011-09-09 12:29 UTC (permalink / raw)
  To: xen-devel

Thank you very much Kom

It seems that AMD cards works better with passthru, I should try it

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4786166.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-09  7:54                                           ` komkon555
  2011-09-09 12:29                                             ` JavMV
@ 2011-09-09 13:28                                             ` Pasi Kärkkäinen
  2011-09-09 16:09                                               ` Wei Huang
  2011-09-09 19:56                                             ` Re : " David TECHER
  2 siblings, 1 reply; 102+ messages in thread
From: Pasi Kärkkäinen @ 2011-09-09 13:28 UTC (permalink / raw)
  To: komkon555; +Cc: xen-devel

On Fri, Sep 09, 2011 at 12:54:07AM -0700, komkon555 wrote:
>            Hi. There is the promised report to JavMV: with fixes on dsd are
> your patches also functional. Windows XP starts and GTX260 works perfect
> with driver version 275.33.
>           Some news more: The best results I got with this configuration:
> xen 4.1-unstable changeset 21668 (patched clearly with these 
> http://lists.xensource.com/archives/html/xen-devel/2010-05/msg00441.html
> patches , dsd fixed according to David TECHER) + jeremi xen kernel 2.6.32.45
> (xenfs static). This configuration works excellent both: with primary and
> secondary vga-adapter (GTX260). There are two Problem with all
> configurations:
> 1. DomU can be started only once. Being  correctly shouted  down, starts
> DomU no more.
> 2. Physical usb- keyboard and mouse can not be assigned to DomU (regular usb
> assignment has no effect, PVUSB crashes)
> 

Did you try normal PCI passthru? passthru the whole USB controller pci device..

-- Pasi

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-09 13:28                                             ` Pasi Kärkkäinen
@ 2011-09-09 16:09                                               ` Wei Huang
  0 siblings, 0 replies; 102+ messages in thread
From: Wei Huang @ 2011-09-09 16:09 UTC (permalink / raw)
  To: Pasi Kärkkäinen; +Cc: komkon555, xen-devel

I used this approach before and it worked for me.

-Wei

On 09/09/2011 08:28 AM, Pasi Kärkkäinen wrote:
> On Fri, Sep 09, 2011 at 12:54:07AM -0700, komkon555 wrote:
>>             Hi. There is the promised report to JavMV: with fixes on dsd are
>> your patches also functional. Windows XP starts and GTX260 works perfect
>> with driver version 275.33.
>>            Some news more: The best results I got with this configuration:
>> xen 4.1-unstable changeset 21668 (patched clearly with these
>> http://lists.xensource.com/archives/html/xen-devel/2010-05/msg00441.html
>> patches , dsd fixed according to David TECHER) + jeremi xen kernel 2.6.32.45
>> (xenfs static). This configuration works excellent both: with primary and
>> secondary vga-adapter (GTX260). There are two Problem with all
>> configurations:
>> 1. DomU can be started only once. Being  correctly shouted  down, starts
>> DomU no more.
>> 2. Physical usb- keyboard and mouse can not be assigned to DomU (regular usb
>> assignment has no effect, PVUSB crashes)
>>
> Did you try normal PCI passthru? passthru the whole USB controller pci device..
>
> -- Pasi
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>

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

* Re: Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-09 11:31 ` Liwei
@ 2011-09-09 16:17   ` Wei Huang
  2011-09-09 16:42     ` Liwei
  2011-09-12 12:49   ` Tobias Geiger
  2012-01-05 23:15   ` romihs
  2 siblings, 1 reply; 102+ messages in thread
From: Wei Huang @ 2011-09-09 16:17 UTC (permalink / raw)
  To: Liwei; +Cc: komkon555, xen-devel

Curiously, have you tried crossfire with these two 6870 cards?

-Wei

> Personally I'm having positive experiences with AMD cards. Currently
> running two ATI 6870s in a 64-bit Windows 7 DomU. Best thing is,
> they're working alright without any patches on xen-unstable. However,
> similar to what you have experienced, DomU cannot be restarted in this
> configuration. It can be fixed, but I haven't got the time to get down
> to it.
>
> Regarding your problem with passing through the USB controller, have
> you tried it without the VGA passthrough patches? IMO it may not be
> related to the passthrough patches.
>
>> Best regards
>> Kom.
>>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>

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

* Re: Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-09 16:17   ` Wei Huang
@ 2011-09-09 16:42     ` Liwei
  0 siblings, 0 replies; 102+ messages in thread
From: Liwei @ 2011-09-09 16:42 UTC (permalink / raw)
  To: Wei Huang; +Cc: komkon555, xen-devel

On 10 September 2011 00:17, Wei Huang <wei.huang2@amd.com> wrote:
> Curiously, have you tried crossfire with these two 6870 cards?
>
> -Wei
>

Unfortunately no, the motherboard doesn't support crossfire (only SLI)
nor does it come with the required ribbon cable. Maybe I'll source one
from someone else or eBay and give it a try. I'm curious about it too.

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

* Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-09  7:54                                           ` komkon555
  2011-09-09 12:29                                             ` JavMV
  2011-09-09 13:28                                             ` Pasi Kärkkäinen
@ 2011-09-09 19:56                                             ` David TECHER
  2011-09-10 10:27                                               ` Pasi Kärkkäinen
  2 siblings, 1 reply; 102+ messages in thread
From: David TECHER @ 2011-09-09 19:56 UTC (permalink / raw)
  To: komkon555, xen-devel


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

Please have a look on http://wiki.xensource.com/xenwiki/VTdHowTo.

I've just applied what it is recommended on the wiki. It works  like a charm.



For VGA,
========

you can use PCI_STUB, I do not use it as module 

root@mercury:~# grep pci_stub -i /boot/config-2.6.39.3
CONFIG_PCI_STUB=y

root@mercury:~# lspci |grep VGA
01:00.0 VGA compatible controller: nVidia Corporation Device 0de0 (rev a1)



root@mercury:~# lspci -s 01:00.0 -n
01:00.0 0300: 10de:0de0 (rev a1)

Create a script with the following content

root@mercury:~# grep -vE '^(#|$)' start_windows.sh 
echo "10de 0de0" > /sys/bus/pci/drivers/pci-stub/new_id
echo "0000:01:00.0" > /sys/bus/pci/devices/0000:01:00.0/driver/unbind
echo "0000:01:00.0" > /sys/bus/pci/drivers/pci-stub/bind
xl  create /etc/xen/machines/mercury-xen03.cfg

For KeyBoard and Mouse
===================

Use passthrough. 

root@mercury:~# grep CONFIG_XEN_PCIDEV_BACKEND=  /boot/config-2.6.39.3
CONFIG_XEN_PCIDEV_BACKEND=y

I've got two USB controllers (1: mouse + keyboard, 2: for sound Logitech USB Speaker)

root@mercury:~# lspci |grep USB
00:1a.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #2 (rev 05)
00:1d.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #1 (rev 05)

Put it on grub so that dom0 will not use it

root@mercury:~# grep permissive /boot/grub/grub.cfg 
        module  /boot/vmlinuz-2.6.39.3 placeholder root=UUID=1cd457ae-85f4-4626-8f94-1f444fcf6d5c ro nomodeset xen-pciback.permissive xen-pciback.hide=(00:1a.0)(00:1d.0) quiet

In my  domU configuration file
======================
root@mercury:~# grep ^pci /etc/xen/machines/mercury-xen03.cfg
pci  = [ '01:00.0','00:1a.0','00:1d.0' ]






________________________________
De : komkon555 <komkon555@freenet.de>
À : xen-devel@lists.xensource.com
Envoyé le : Vendredi 9 Septembre 2011 9h54
Objet : Re: Re : Re : Re : [Xen-devel] Re: Patches for VGA-Passthrough XEN 4.2 unstable

           Hi. There is the promised report to JavMV: with fixes on dsd are
your patches also functional. Windows XP starts and GTX260 works perfect
with driver version 275.33.
          Some news more: The best results I got with this configuration:
xen 4.1-unstable changeset 21668 (patched clearly with these 
http://lists.xensource.com/archives/html/xen-devel/2010-05/msg00441.html
patches , dsd fixed according to David TECHER) + jeremi xen kernel 2.6.32.45
(xenfs static). This configuration works excellent both: with primary and
secondary vga-adapter (GTX260). There are two Problem with all
configurations:
1. DomU can be started only once. Being  correctly shouted  down, starts
DomU no more.
2. Physical usb- keyboard and mouse can not be assigned to DomU (regular usb
assignment has no effect, PVUSB crashes)

Best regards
Kom.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4785386.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

[-- Attachment #1.2: Type: text/html, Size: 4722 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] 102+ messages in thread

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-09 19:56                                             ` Re : " David TECHER
@ 2011-09-10 10:27                                               ` Pasi Kärkkäinen
  0 siblings, 0 replies; 102+ messages in thread
From: Pasi Kärkkäinen @ 2011-09-10 10:27 UTC (permalink / raw)
  To: David TECHER; +Cc: komkon555, xen-devel

On Fri, Sep 09, 2011 at 08:56:50PM +0100, David TECHER wrote:
>    Please have a look on http://wiki.xensource.com/xenwiki/VTdHowTo.

And in general:
http://wiki.xen.org/xenwiki/XenPCIpassthrough

-- Pasi

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

* Re: Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-09 11:31 ` Liwei
  2011-09-09 16:17   ` Wei Huang
@ 2011-09-12 12:49   ` Tobias Geiger
  2012-01-05 23:15   ` romihs
  2 siblings, 0 replies; 102+ messages in thread
From: Tobias Geiger @ 2011-09-12 12:49 UTC (permalink / raw)
  To: xen-devel

Am Freitag 09 September 2011, 13:31:19 schrieb Liwei:
> Personally I'm having positive experiences with AMD cards. Currently
> running two ATI 6870s in a 64-bit Windows 7 DomU. Best thing is,
> they're working alright without any patches on xen-unstable. However,
> similar to what you have experienced, DomU cannot be restarted in this
> configuration. It can be fixed, but I haven't got the time to get down
> to it.

Can you elaborate a little further what needs to be done to fix this problem?

It hits me nearly every day (windows still likes to reboot after nearly every 
windows update, so...).

Best regards
Tobias

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-07 14:32                                       ` komkon555
  2011-09-07 15:22                                         ` JavMV
@ 2011-09-21 13:44                                         ` JavMV
  2011-09-21 13:56                                           ` komkon555
  1 sibling, 1 reply; 102+ messages in thread
From: JavMV @ 2011-09-21 13:44 UTC (permalink / raw)
  To: xen-devel

Hi again, Im back on this issues ^^. I have tryed to replicate the same
situation that u tested for me Komkom (thanks again) but Im having problems
to get Xen working properly...
I have written all the install process that I followed on this thread 
http://xen.1045712.n5.nabble.com/Problems-starting-xend-on-Squeeze-td4271295.html#a4826038
http://xen.1045712.n5.nabble.com/Problems-starting-xend-on-Squeeze-td4271295.html#a4826038   
(I have used the David's tutorial to download the xen code 'hg clone -r
23350 http://xenbits.xensource.com/hg/staging/xen-unstable.hg/
xen_rev23350')
Can you tell me how did you proceed to get Xen running with this
configuration?:

komkon555 wrote:
> 
> xen 4.2-unstable changeset 23350 (clearly patched) + jeremi xen kernel
> 2.6.32.43/45 (xenfs static) on debian squeeze.
> Best Regards
> Komkon555
> 

komkon555 wrote:
> 
> Hi. There is the promised report to JavMV: with fixes on dsd are your
> patches also functional. Windows XP starts and GTX260 works perfect with
> driver version 275.33.
> 

Can anyone help me with this problem?  If I fix it I will be able to try the
patches on my graphic card (GTX 460) and maybe it will work like in this
video :  http://www.youtube.com/watch?v=Gtmwnx-k2qg
http://www.youtube.com/watch?v=Gtmwnx-k2qg 

Thanks in advance

Javier

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4826391.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-21 13:44                                         ` JavMV
@ 2011-09-21 13:56                                           ` komkon555
  2011-09-21 14:08                                             ` JavMV
  0 siblings, 1 reply; 102+ messages in thread
From: komkon555 @ 2011-09-21 13:56 UTC (permalink / raw)
  To: xen-devel

Hi. Sorry, what does not run exactly?

Kom.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4826432.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-21 13:56                                           ` komkon555
@ 2011-09-21 14:08                                             ` JavMV
  2011-09-21 14:24                                               ` JavMV
  2011-09-21 14:32                                               ` komkon555
  0 siblings, 2 replies; 102+ messages in thread
From: JavMV @ 2011-09-21 14:08 UTC (permalink / raw)
  To: xen-devel

Hi,
I have installed the jeremy kernel 2.6.32.45 with xenfs static and
(following the process I described in the link above) it is working with a
functional xen system (so I can do xm list and see Dom0 running) but like I
need the changeset 23350 to try the patches I execute:
    hg clone -r 23350
http://xenbits.xensource.com/hg/staging/xen-unstable.hg/ xen_rev23350
and after compile, install and reboot xend can't start anymore and xenstored
returns the error 'FATAL: Failed to initialize dom0 state: Invalid argument'

I imagine that the error is maybe caused by mixed xen versions dont know
sure... 


-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4826479.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-21 14:08                                             ` JavMV
@ 2011-09-21 14:24                                               ` JavMV
  2011-09-21 14:32                                               ` komkon555
  1 sibling, 0 replies; 102+ messages in thread
From: JavMV @ 2011-09-21 14:24 UTC (permalink / raw)
  To: xen-devel

Also the directory /proc/xen is empty unless I add manually the line 'xenfs
/proc/xen xenfs defaults 0 0' to /etc/fstab and restart... this is strange I
dont know why this is not automatically done 

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4826544.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-21 14:08                                             ` JavMV
  2011-09-21 14:24                                               ` JavMV
@ 2011-09-21 14:32                                               ` komkon555
  2011-09-21 14:40                                                 ` komkon555
  1 sibling, 1 reply; 102+ messages in thread
From: komkon555 @ 2011-09-21 14:32 UTC (permalink / raw)
  To: xen-devel

So, in this case you should try first of all 
http://pasik.reaktio.net/xen/kernel-config/config-2.6.32.43-pvops-dom0-xen-stable-x86_64
this  configuration file for xen-kernel (compile it from the very beginning
with last one). Just edit this config to "xenfs=y". Delete all original
(stock) xen-programms (kernel, xen, xen-utils and so on) and xendomain,
xencommon, xend from /etc/init.d/. Than compile jeremy kernel with new
config: 
 $ cd /usr/src/linux
 $ make oldconfig
 $ sudo make
 $ sudo apt-get install kernel-package fakeroot
 $ export CONCURRENCY_LEVEL=<number_of_cores +1>
 $ sudo make-kpkg clean
 $ sudo fakeroot make-kpkg --initrd --append-to-version=-pv kernel-image
kernel-headers
 $ sudo dpkg -i ../<linux-image-2.6.XXX.deb>
See details with this  http://wiki.xensource.com/xenwiki/XenParavirtOps link
.
Than compile and install xen-unstable.
After reboot you have to run /etc/init.d/xencommons start and
/etc/init.d/xend start manually. If any reports about missing modules load
them first.

Best regards.
  


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4826582.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-21 14:32                                               ` komkon555
@ 2011-09-21 14:40                                                 ` komkon555
  2011-09-21 14:47                                                   ` komkon555
  0 siblings, 1 reply; 102+ messages in thread
From: komkon555 @ 2011-09-21 14:40 UTC (permalink / raw)
  To: xen-devel

After xen-unstable ist compiled do not forget tu run "sudo update-grub"! It
is very impotent  tu run proper combination of xen kernel and  xen-unstable
while boot in!

Kom.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4826614.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-21 14:40                                                 ` komkon555
@ 2011-09-21 14:47                                                   ` komkon555
  2011-09-21 14:52                                                     ` JavMV
  0 siblings, 1 reply; 102+ messages in thread
From: komkon555 @ 2011-09-21 14:47 UTC (permalink / raw)
  To: xen-devel

My .config for jeremy 2.6.32.45 is attached.
Kom.
http://xen.1045712.n5.nabble.com/file/n4826635/config config 

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4826635.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-21 14:47                                                   ` komkon555
@ 2011-09-21 14:52                                                     ` JavMV
  2011-09-21 15:13                                                       ` Re : " David TECHER
  0 siblings, 1 reply; 102+ messages in thread
From: JavMV @ 2011-09-21 14:52 UTC (permalink / raw)
  To: xen-devel

Haha yeah! thank you, I realise that if I did update grub then the version of
xen-tools and xen-kernel match up so now I can make xend run normally, I
have to manually execute 'xenstored', 'xenconsoled' and then 'xend start'
because xend fail to start at boot but anyways I have xend running now so I
will fix the automatically start later.

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4826655.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-21 14:52                                                     ` JavMV
@ 2011-09-21 15:13                                                       ` David TECHER
  2011-09-22 12:15                                                         ` JavMV
  0 siblings, 1 reply; 102+ messages in thread
From: David TECHER @ 2011-09-21 15:13 UTC (permalink / raw)
  To: JavMV [via Xen]; +Cc: xen-devel


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

Once you are OK, can you tell us if VGA Passthrough works for your GTX 460.

I mean once you update dsd with the required memory ranges for you card.


If it is ok, could you give us information about the manufactuer's informations for you GTX 460 (MSI, Gigabite, and so on)..

I am little exciting to know if it works for you :) I hope


For the moment I came to the conclusion that the video you speak about (Ubisoft on Youtube) was not done with a GTX 460  (that's my personal impression)


A lot of people - I am one of them - have tryed with a GTX 460. I've never seen someone succeeding to use it.

David



________________________________
De : JavMV [via Xen] <ml-node+s1045712n4826655h3@n5.nabble.com>
À : David TECHER <davidtecher@yahoo.fr>
Envoyé le : Mercredi 21 Septembre 2011 16h52
Objet : Re: Re : Re : Re : [Xen-devel] Re: Patches for VGA-Passthrough XEN 4.2 unstable


Haha yeah! thank you, I realise that if I did update grub then the version of xen-tools and xen-kernel match up so now I can make xend run normally, I have to manually execute 'xenstored', 'xenconsoled' and then 'xend start' because xend fail to start at boot but anyways I have xend running now so I will fix the automatically start later. 
JavMV

________________________________
 
If you reply to this email, your message will be added to the discussion below:http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4826655.html 
To unsubscribe from Patches for VGA-Passthrough XEN 4.2 unstable, click here. 

[-- Attachment #1.2: Type: text/html, Size: 3226 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] 102+ messages in thread

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-21 15:13                                                       ` Re : " David TECHER
@ 2011-09-22 12:15                                                         ` JavMV
  2011-09-22 12:45                                                           ` komkon555
  2011-09-22 18:27                                                           ` Pasi Kärkkäinen
  0 siblings, 2 replies; 102+ messages in thread
From: JavMV @ 2011-09-22 12:15 UTC (permalink / raw)
  To: xen-devel

Hi again, I didn't answer you before because I'm having troubles to enable IO
virtualisation on XEN, I don't know why because it works for me on the past,
maybe I should try a full and clean installation from the start instead of
keep using my actual installation which can run xen but starting it manually
(due to errors)...

Well I have enabled the next BIOS options:
    XD Technology <Enable>
    VT Technology <Enable>
    Intel(R) VT for Directed I/O (VT-d) <Enable>

So I think everything is OK but    "  # xm dmesg  "    show these lines:

   (XEN) [VT-D]dmar.c:456:   Non-existent device (0:2.1) is reported in this
DRHD\047s scope!
   (XEN) [VT-D]dmar.c:479:   The DRHD is invalid due to there are devices
under its scope are not PCI 
   discoverable! Pls try option iommu=force or iommu=workaround_bios_bug if
you really want VT-d
   (XEN) Failed to parse ACPI DMAR. * Disabling VT-d.*
   (XEN) Table is not found!
   (XEN) Using ACPI (MADT) for SMP configuration information
    ...
  * (XEN) I/O virtualisation disabled*
    ...
   (XEN) HVM: ASIDs disabled.
   *(XEN) HVM: VMX enabled*
   ...

I have tryed adding the options iommu=1, iommu=force or
iommu=workaround_bios_bug in grub menu entry:

    multiboot /boot/xen-4.2-unstable.gz placeholder
    module /boot/vmlinuz-2.6.32.45 placeholder root=UUID=..... ro
*iommu=force*
    module /boot/intrd.img-2.6.32.45

I don't know what is wrong now, this is frustrating (I/O) VT-d works for the
same computer on the past, could this problem be caused by the mixed
installations? I will try to reinstall everything after format the computer
but I will wait if you know how to fix this issue without reinstall
everything again.

Javier




-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4829929.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-22 12:15                                                         ` JavMV
@ 2011-09-22 12:45                                                           ` komkon555
  2011-09-22 12:55                                                             ` JavMV
  2011-09-22 18:27                                                           ` Pasi Kärkkäinen
  1 sibling, 1 reply; 102+ messages in thread
From: komkon555 @ 2011-09-22 12:45 UTC (permalink / raw)
  To: xen-devel

JavMV, what about your BIOS setup? Is vt-d (iommu) enabled in BIOS?

Best regards
Kom.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4830015.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-22 12:45                                                           ` komkon555
@ 2011-09-22 12:55                                                             ` JavMV
  2011-09-22 17:41                                                               ` JavMV
  0 siblings, 1 reply; 102+ messages in thread
From: JavMV @ 2011-09-22 12:55 UTC (permalink / raw)
  To: xen-devel

Well I think that vt-d(iommu) is the same feature than the next one:
    Intel(R) VT for Directed I/O (VT-d) <Enable>
An extract from wikipedia tell us this:
    Intel has published a specification for IOMMU technology as
Virtualization Technology for Directed I/O,
    abbreviated VT-d
So I have already enabled the necessary options (and there isn't any other
option in my BIOS related with this), besides with the same options enabled
in BIOS I was able to use passthrough in the past

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4830056.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-22 12:55                                                             ` JavMV
@ 2011-09-22 17:41                                                               ` JavMV
  0 siblings, 0 replies; 102+ messages in thread
From: JavMV @ 2011-09-22 17:41 UTC (permalink / raw)
  To: xen-devel

I have done a full reinstall this time clean install without errors and the
problem persists, 
so I'm thinking that the problem is maybe the version of Dom0 kernel, 
maybe next versions are better or have more patches applied... what do you
think? 

I will try to install xen like the first time:
 #aptitude install xen-linux-system-2.6.32-5-xen-686 (para 32bits) y
 #aptitude install xen-linux-system-2.6.32-5-xen-amd64 (para amd64).
 

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4830942.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-22 12:15                                                         ` JavMV
  2011-09-22 12:45                                                           ` komkon555
@ 2011-09-22 18:27                                                           ` Pasi Kärkkäinen
  2011-09-22 21:54                                                             ` JavMV
  1 sibling, 1 reply; 102+ messages in thread
From: Pasi Kärkkäinen @ 2011-09-22 18:27 UTC (permalink / raw)
  To: JavMV; +Cc: xen-devel

On Thu, Sep 22, 2011 at 05:15:22AM -0700, JavMV wrote:
> Hi again, I didn't answer you before because I'm having troubles to enable IO
> virtualisation on XEN, I don't know why because it works for me on the past,
> maybe I should try a full and clean installation from the start instead of
> keep using my actual installation which can run xen but starting it manually
> (due to errors)...
> 
> Well I have enabled the next BIOS options:
>     XD Technology <Enable>
>     VT Technology <Enable>
>     Intel(R) VT for Directed I/O (VT-d) <Enable>
> 
> So I think everything is OK but    "  # xm dmesg  "    show these lines:
> 
>    (XEN) [VT-D]dmar.c:456:   Non-existent device (0:2.1) is reported in this
> DRHD\047s scope!
>    (XEN) [VT-D]dmar.c:479:   The DRHD is invalid due to there are devices
> under its scope are not PCI 
>    discoverable! Pls try option iommu=force or iommu=workaround_bios_bug if
> you really want VT-d
>    (XEN) Failed to parse ACPI DMAR. * Disabling VT-d.*
>    (XEN) Table is not found!
>    (XEN) Using ACPI (MADT) for SMP configuration information
>     ...
>   * (XEN) I/O virtualisation disabled*
>     ...


So this looks like a broken BIOS.

Are you running the latest BIOS version?
Which motherboard is that?

-- Pasi


>    (XEN) HVM: ASIDs disabled.
>    *(XEN) HVM: VMX enabled*
>    ...
> 
> I have tryed adding the options iommu=1, iommu=force or
> iommu=workaround_bios_bug in grub menu entry:
> 
>     multiboot /boot/xen-4.2-unstable.gz placeholder
>     module /boot/vmlinuz-2.6.32.45 placeholder root=UUID=..... ro
> *iommu=force*
>     module /boot/intrd.img-2.6.32.45
> 
> I don't know what is wrong now, this is frustrating (I/O) VT-d works for the
> same computer on the past, could this problem be caused by the mixed
> installations? I will try to reinstall everything after format the computer
> but I will wait if you know how to fix this issue without reinstall
> everything again.
> 
> Javier
> 
> 
> 
> 
> -----
> JavMV
> --
> View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4829929.html
> Sent from the Xen - Dev mailing list archive at Nabble.com.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-22 18:27                                                           ` Pasi Kärkkäinen
@ 2011-09-22 21:54                                                             ` JavMV
  2011-09-23 11:34                                                               ` JavMV
  0 siblings, 1 reply; 102+ messages in thread
From: JavMV @ 2011-09-22 21:54 UTC (permalink / raw)
  To: xen-devel

I will try to upgrade the BIOS tomorrow, now I haven't got access to the
computer.
Thanks passi, you are everywhere! XD

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4831624.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-22 21:54                                                             ` JavMV
@ 2011-09-23 11:34                                                               ` JavMV
  2011-09-23 14:00                                                                 ` JavMV
  0 siblings, 1 reply; 102+ messages in thread
From: JavMV @ 2011-09-23 11:34 UTC (permalink / raw)
  To: xen-devel

Hello, I have update my BIOS trying to fix the problem, my Board is an Intel
DQ35MP, 
the previous version of my BIOS was 0882 (date 2008), now I have the version
1143 (the latest version available, it is from 2010). 
With all of these changes the problem persist but I found another "idiot"
thing ^^ look at this lines:
    multiboot /boot/xen-4.2-unstable.gz placeholder
    module /boot/vmlinuz-2.6.32.45 placeholder root=UUID=..... ro
iommu=force
    module /boot/intrd.img-2.6.32.45 

The option iommu=force is in wrong place! This is because I configure it
using /etc/default/grub, well the option must be in the first line with
/boot/xen so I modified manually while grub menu show up (by pressing 'E') 

*Now I have VT-d enabled! * I will write later I hope telling you I finally
did vga-passthru XD

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4833174.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-23 11:34                                                               ` JavMV
@ 2011-09-23 14:00                                                                 ` JavMV
  2011-09-23 14:52                                                                   ` JavMV
  2011-09-23 17:21                                                                   ` Pasi Kärkkäinen
  0 siblings, 2 replies; 102+ messages in thread
From: JavMV @ 2011-09-23 14:00 UTC (permalink / raw)
  To: xen-devel

Hi again, ... do you wanna hear a funny story?

Well here it is, The Vt-d features doesn't work if I use the changeset 23799
(David's patches are for this one), but Vt-d features works if I use
changeset 23350 but in this changeset there is a bug related with VNC viewer
which shows a white screen all time instead of guest screen (
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1766
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1766 ).

So I must use a changeset lower than 23799 (*because this have some changes
that provokes VT-d  (iommu) fails on my computer*) but I need a changeset
that have already fixed the VNC bug (greater than 23350) in order to have
access to the winxp guest, and then I will need luck to patch them with one
of the adaptations (mine or David's) otherwise I will have to adapt them
again. 

So now, do you know where I can find a list with all the changesets and
their respective changes applied? 

Best regards

Javier

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4833637.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-23 14:00                                                                 ` JavMV
@ 2011-09-23 14:52                                                                   ` JavMV
  2011-09-23 15:12                                                                     ` komkon555
  2011-09-23 17:21                                                                   ` Pasi Kärkkäinen
  1 sibling, 1 reply; 102+ messages in thread
From: JavMV @ 2011-09-23 14:52 UTC (permalink / raw)
  To: xen-devel

 Am I still able to use gfx_passthru if I get this messages from xm dmesg?:
    ...
    (XEN) Intel VT-d Snoop Control not enabled.
    (XEN) Intel VT-d Dom0 DMA Passthrough not enabled.
    (XEN) Intel VT-d Queued Invalidation not enabled.
    (XEN) Intel VT-d Interrupt Remapping not enabled.
    (XEN) [VT-D]iommu.c:847: iommu_fault_status: Fault Overflow
    (XEN) [VT-D]iommu.c:850: iommu_fault_status: Primary Pending Fault
    (XEN) [VT-D]iommu.c:825: DMAR:[DMA Write] Request device [00:02.0] fault
addr ffffff000, iommu reg = fff16000
    ...
    (XEN) Enabling APIC mode:  Flat.  Using 1 I/O APICs
    (XEN) I/O virtualisation enabled
    ...

I can see I/O enabled but all the VT-d features are disabled, so maybe
that's why with the last revision of XEN I can't have I/O virtualisation
enabled, anyone have an answer?

Thanks in advance

-----
JavMV
--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4833862.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-23 14:52                                                                   ` JavMV
@ 2011-09-23 15:12                                                                     ` komkon555
  0 siblings, 0 replies; 102+ messages in thread
From: komkon555 @ 2011-09-23 15:12 UTC (permalink / raw)
  To: xen-devel

My report is this one:
xm dmesg | grep VT-d

(XEN) Intel VT-d Snoop Control not enabled.
(XEN) Intel VT-d Dom0 DMA Passthrough not enabled.
(XEN) Intel VT-d Queued Invalidation enabled.
(XEN) Intel VT-d Interrupt Remapping enabled.
(XEN) Intel VT-d Shared EPT tables not enabled.

Kom.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4833943.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-23 14:00                                                                 ` JavMV
  2011-09-23 14:52                                                                   ` JavMV
@ 2011-09-23 17:21                                                                   ` Pasi Kärkkäinen
  2011-10-15 10:00                                                                     ` David TECHER
  1 sibling, 1 reply; 102+ messages in thread
From: Pasi Kärkkäinen @ 2011-09-23 17:21 UTC (permalink / raw)
  To: JavMV; +Cc: xen-devel

On Fri, Sep 23, 2011 at 07:00:12AM -0700, JavMV wrote:
> Hi again, ... do you wanna hear a funny story?
> 
> Well here it is, The Vt-d features doesn't work if I use the changeset 23799
> (David's patches are for this one), but Vt-d features works if I use
> changeset 23350 but in this changeset there is a bug related with VNC viewer
> which shows a white screen all time instead of guest screen (
> http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1766
> http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1766 ).
> 
> So I must use a changeset lower than 23799 (*because this have some changes
> that provokes VT-d  (iommu) fails on my computer*) but I need a changeset
> that have already fixed the VNC bug (greater than 23350) in order to have
> access to the winxp guest, and then I will need luck to patch them with one
> of the adaptations (mine or David's) otherwise I will have to adapt them
> again. 
> 
> So now, do you know where I can find a list with all the changesets and
> their respective changes applied? 
> 

Do you mean the mercurial changelog? http://xenbits.xen.org/xen-unstable.hg

Also you should open a new thread about the VT-d problem with the latest xen-unstable,
because that's a separate issue from vga passthru, and it should be solved first and separately.

-- Pasi

> Best regards
> 
> Javier
> 
> -----
> JavMV
> --
> View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4833637.html
> Sent from the Xen - Dev mailing list archive at Nabble.com.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-23 17:21                                                                   ` Pasi Kärkkäinen
@ 2011-10-15 10:00                                                                     ` David TECHER
  2011-10-26 11:54                                                                       ` Zoltan Hubai
  0 siblings, 1 reply; 102+ messages in thread
From: David TECHER @ 2011-10-15 10:00 UTC (permalink / raw)
  To: xen-devel

Hi

Finally I succeeded to use my graphic card EVGA GTX 460 SE 1024M with Xen
4.2 unstable.

Before I was using my MSI GT 440.

Kernel ---> 3.1.0-rc9 downloaded from
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=summary


My kernel's config is attached to this mail.

About Xen:

Download Xen

hg clone -r 23965 http://xenbits.xensource.com/staging/xen-unstable.hg/
xen-unstable.hg-rev-23965-ok

Make a first init build for tools

cd xen-unstable.hg-rev-23965-ok/tools
make -j4
make clean
cd ..

Apply the patches attached to this mail (patch -p0 < ....)

Copy the VGA BIOS extracted using nvlfash 5.100

cp /path/to/VGABIOS.ROM tools/firmware/vgabios/vgabios-pt.bin

Compil again

make -j4 tools

Install

make -j4 install-tools PYTHON_PREFIX_ARG= 

Since my old domU XP 64 bits was using GT 440, I replaced my old graphic
card with the EVGA GTX 460 SE.

Everything was OK (except that it is impossible to restart the domU withtout
restarting the dom0 as usual)

About dsdt.asl.patch file
=========================

For your information concerning the patch for dsd (I've already give the
informations in an other mail but I will give it again)

Get the identifier for your graphic card
root@mercury:/opt/tmp/gfx_patchs_gtx-460-se-evga# lspci |grep VGA
01:00.0 VGA compatible controller: nVidia Corporation Device 0e23 (rev a1)

Use dmesg to get the required ranges
root@mercury:/opt/tmp/gfx_patchs_gtx-460-se-evga# dmesg | grep 01:00.0 |
grep BAR
[    2.481779] pci 0000:01:00.0: BAR 0: reserving [mem 0xf8000000-0xf9ffffff
flags 0x40200] (d=0, p=0)
[    2.481782] pci 0000:01:00.0: BAR 1: reserving [mem 0xd0000000-0xd7ffffff
flags 0x14220c] (d=0, p=0)
[    2.481784] pci 0000:01:00.0: BAR 3: reserving [mem 0xd8000000-0xdbffffff
flags 0x14220c] (d=0, p=0)
[    2.481787] pci 0000:01:00.0: BAR 5: reserving [io  0xe000-0xe07f flags
0x40101] (d=0, p=0)


The 3 ranges [0xf8000000-0xf9fffff], [0xd0000000-0xd7ffffff],
[0xd8000000-0xdbfffff] need to be specify in dsdt.asl.patch

Moreover you need to use the formula

Maximum - Minimum + 1 for the difference.

As a example: for the first range [0xf8000000-0xf9fffff]

Maximum = (0xf9fffff) / Minimum = 0xf8000000 => Difference = 4194303999 -
4160749568 + 1 = 33554432 => hexadecimal = 0x02000000

That the reason why that in the patch, there are

+                        0xF8000000,
+                        0xF9FFFFFF,
                         0x00000000,
-                        0x05000000,
-                        ,, _Y01)
+                        0x02000000)

Do the same for the others ranges

Hope this help.

I do not make test for Windows 7.  I do not plan to try.

David








http://xen.1045712.n5.nabble.com/file/n4904945/config-3.1.0-rc9
config-3.1.0-rc9 
http://xen.1045712.n5.nabble.com/file/n4904945/dsdt.asl.patch dsdt.asl.patch 
http://xen.1045712.n5.nabble.com/file/n4904945/hvmloader.c.patch
hvmloader.c.patch 
http://xen.1045712.n5.nabble.com/file/n4904945/Makefile.patch Makefile.patch 
http://xen.1045712.n5.nabble.com/file/n4904945/pass-through.c.patch
pass-through.c.patch 
http://xen.1045712.n5.nabble.com/file/n4904945/pci.c.patch pci.c.patch 

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4904945.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-10-15 10:00                                                                     ` David TECHER
@ 2011-10-26 11:54                                                                       ` Zoltan Hubai
  2011-10-26 13:35                                                                         ` Re : " David TECHER
  0 siblings, 1 reply; 102+ messages in thread
From: Zoltan Hubai @ 2011-10-26 11:54 UTC (permalink / raw)
  To: xen-devel

Hi

First of all thx for David and the xen team.

My configuration is
MB: asrock Z68 extreme 4 gen 3
CPU: intel i7 2600
Memory: 8 gb
GFX1: nvidia 285 gtx (connected to monitor 1)
GFX2: built in intel 2000 on cpu (connected to monitor 2)

First I installed Ubuntu 11.10 x64, after that installed kernel 3.1.0 with
the ubuntu configuration as start and making the needed changes for xen.
Then I installed xen-unstable the way David has explained (extracting the
gfx firmware, patching, modifying dsdt.asl).
I also added the xen-pciback.hide=(01:00.0) kernel param.

Here is the dmesg part related to vga:
[    0.000000] Command line: root=UUID=51cc6b5d-8f21-43c4-83ca-cb25324d3212
ro xen-pciback.hide=(01:00.0)
[    1.974554] Kernel command line:
root=UUID=51cc6b5d-8f21-43c4-83ca-cb25324d3212 ro xen-pciback.hide=(01:00.0)
[    2.159340] pci 0000:01:00.0: [10de:05e3] type 0 class 0x000300
[    2.159356] pci 0000:01:00.0: reg 10: [mem 0xfa000000-0xfaffffff]
[    2.159374] pci 0000:01:00.0: reg 14: [mem 0xc0000000-0xcfffffff 64bit
pref]
[    2.159392] pci 0000:01:00.0: reg 1c: [mem 0xf8000000-0xf9ffffff 64bit]
[    2.159404] pci 0000:01:00.0: reg 24: [io  0xe000-0xe07f]
[    2.159415] pci 0000:01:00.0: reg 30: [mem 0xfb000000-0xfb07ffff pref]
[    2.191560] vgaarb: device added:
PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
[    2.191694] vgaarb: bridge control possible 0000:01:00.0
[    2.216347] pciback 0000:01:00.0: seizing device
[    2.456885] pciback 0000:01:00.0: Boot video device
[    2.513904] pciback 0000:01:00.0: Signaling PME through PCIe PME
interrupt
[    2.518151] pciback 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ
16
[    2.518216] pciback 0000:01:00.0: PCI INT A disabled
[   87.312028] xen-pciback: vpci: 0000:01:00.0: assign to virtual slot 0
[  322.481774] xen-pciback: vpci: 0000:01:00.0: assign to virtual slot 0
[  322.482524] pciback 0000:01:00.0: device has been assigned to another
domain! Over-writting the ownership, but beware.

and here is the dmesg for the intel gfx

[    2.156757] pci 0000:00:02.0: [8086:0102] type 0 class 0x000380
[    2.156782] pci 0000:00:02.0: reg 10: [mem 0xfb400000-0xfb7fffff 64bit]
[    2.156796] pci 0000:00:02.0: reg 18: [mem 0xb0000000-0xbfffffff 64bit
pref]
[    2.156806] pci 0000:00:02.0: reg 20: [io  0xf000-0xf03f]
[    7.867449] i915 0000:00:02.0: enabling device (0006 -> 0007)
[    7.867467] i915 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    7.867472] i915 0000:00:02.0: setting latency timer to 64
[    8.833292] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on
minor 0

In bios i setup pci express as startup device, so when ubuntu begins to load
first I see the loading on the monitor 1 connected to nvidia and when the
card is assigned to pciback then it automaticaly switches to the intel 2000
built in gfx on monitor 2.

First I had problem with executin /etc/init.d/xencomons start was getting
the following error
usr/lib64/xen/bin/qemu-dm: error while loading shared libraries:
libxenctrl.so.4.2: cannot open shared object file: No such file or directory
I solved it by adding /usr/lib64 to /etc/ld.so.conf and executing ldconfig
Then I had problem with executing /etc/init.d/xend start, was getting the
following error
RTNETLINK answers: File exists
xend would start but without networking, solved this by defining the xenbr0
interface in /etc/network/interfaces

So finally everything was working:

root@anubisxen:/usr/src# xm pci-list-assignable-devices
0000:01:00.0

First I tryed to install windows 7 x64 professional, that worked but after I
installed the latest nvidia 285.62 driver I got a BSOD.
Then I tryed to install windows xp (sp3) x86, installed the same driver and
also didn't work.
So after read David blog, I downloaded the 275.33 driver for xp and for my
suprise it was working.
I did the same for win7, and win7 also worked with the 275.33 driver.
I need to do some more testing, unfortunatly I created to small disk for
win7 so I run out of space, but will try it with a bigger disk and with some
benchmarks.
I tryed 3dmark 6 on winxp and it was running fine.

Will post more when I reinstall win7 with a bigger virtual disk, will
compare benchmarks from a virt machine and a real machine.

sorry for my poor english

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4939528.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-10-26 11:54                                                                       ` Zoltan Hubai
@ 2011-10-26 13:35                                                                         ` David TECHER
  2011-10-27  5:58                                                                           ` Zoltan Hubai
  0 siblings, 1 reply; 102+ messages in thread
From: David TECHER @ 2011-10-26 13:35 UTC (permalink / raw)
  To: Zoltan Hubai, xen-devel


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

Hi 


Thanks for sharing your experiment, this is very usefull/interesting ! ! !


Happy to see that it work for you on Win7.

Let me know for your next experiment with Win7.

My last experiment with EVGA GTX 460 SE 1024MB


http://www.davidgis.fr/blog/index.php?2011/10/17/837-xen-intel-vt-d-sur-core-5-2400-vga-passthrough-sur-carte-nvidia-evga-gtx-460-se-1024

I can play Crysis2 on XP 64 bits (Resolution:  1920x1080) with directX9.




________________________________
De : Zoltan Hubai <hubaiz@gmail.com>
À : xen-devel@lists.xensource.com
Envoyé le : Mercredi 26 Octobre 2011 13h54
Objet : Re: Re : Re : Re : Re : [Xen-devel] Re: Patches for VGA-Passthrough XEN 4.2 unstable

Hi

First of all thx for David and the xen team.

My configuration is
MB: asrock Z68 extreme 4 gen 3
CPU: intel i7 2600
Memory: 8 gb
GFX1: nvidia 285 gtx (connected to monitor 1)
GFX2: built in intel 2000 on cpu (connected to monitor 2)

First I installed Ubuntu 11.10 x64, after that installed kernel 3.1.0 with
the ubuntu configuration as start and making the needed changes for xen.
Then I installed xen-unstable the way David has explained (extracting the
gfx firmware, patching, modifying dsdt.asl).
I also added the xen-pciback.hide=(01:00.0) kernel param.

Here is the dmesg part related to vga:
[    0.000000] Command line: root=UUID=51cc6b5d-8f21-43c4-83ca-cb25324d3212
ro xen-pciback.hide=(01:00.0)
[    1.974554] Kernel command line:
root=UUID=51cc6b5d-8f21-43c4-83ca-cb25324d3212 ro xen-pciback.hide=(01:00.0)
[    2.159340] pci 0000:01:00.0: [10de:05e3] type 0 class 0x000300
[    2.159356] pci 0000:01:00.0: reg 10: [mem 0xfa000000-0xfaffffff]
[    2.159374] pci 0000:01:00.0: reg 14: [mem 0xc0000000-0xcfffffff 64bit
pref]
[    2.159392] pci 0000:01:00.0: reg 1c: [mem 0xf8000000-0xf9ffffff 64bit]
[    2.159404] pci 0000:01:00.0: reg 24: [io  0xe000-0xe07f]
[    2.159415] pci 0000:01:00.0: reg 30: [mem 0xfb000000-0xfb07ffff pref]
[    2.191560] vgaarb: device added:
PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
[    2.191694] vgaarb: bridge control possible 0000:01:00.0
[    2.216347] pciback 0000:01:00.0: seizing device
[    2.456885] pciback 0000:01:00.0: Boot video device
[    2.513904] pciback 0000:01:00.0: Signaling PME through PCIe PME
interrupt
[    2.518151] pciback 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ
16
[    2.518216] pciback 0000:01:00.0: PCI INT A disabled
[   87.312028] xen-pciback: vpci: 0000:01:00.0: assign to virtual slot 0
[  322.481774] xen-pciback: vpci: 0000:01:00.0: assign to virtual slot 0
[  322.482524] pciback 0000:01:00.0: device has been assigned to another
domain! Over-writting the ownership, but beware.

and here is the dmesg for the intel gfx

[    2.156757] pci 0000:00:02.0: [8086:0102] type 0 class 0x000380
[    2.156782] pci 0000:00:02.0: reg 10: [mem 0xfb400000-0xfb7fffff 64bit]
[    2.156796] pci 0000:00:02.0: reg 18: [mem 0xb0000000-0xbfffffff 64bit
pref]
[    2.156806] pci 0000:00:02.0: reg 20: [io  0xf000-0xf03f]
[    7.867449] i915 0000:00:02.0: enabling device (0006 -> 0007)
[    7.867467] i915 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    7.867472] i915 0000:00:02.0: setting latency timer to 64
[    8.833292] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on
minor 0

In bios i setup pci express as startup device, so when ubuntu begins to load
first I see the loading on the monitor 1 connected to nvidia and when the
card is assigned to pciback then it automaticaly switches to the intel 2000
built in gfx on monitor 2.

First I had problem with executin /etc/init.d/xencomons start was getting
the following error
usr/lib64/xen/bin/qemu-dm: error while loading shared libraries:
libxenctrl.so.4.2: cannot open shared object file: No such file or directory
I solved it by adding /usr/lib64 to /etc/ld.so.conf and executing ldconfig
Then I had problem with executing /etc/init.d/xend start, was getting the
following error
RTNETLINK answers: File exists
xend would start but without networking, solved this by defining the xenbr0
interface in /etc/network/interfaces

So finally everything was working:

root@anubisxen:/usr/src# xm pci-list-assignable-devices
0000:01:00.0

First I tryed to install windows 7 x64 professional, that worked but after I
installed the latest nvidia 285.62 driver I got a BSOD.
Then I tryed to install windows xp (sp3) x86, installed the same driver and
also didn't work.
So after read David blog, I downloaded the 275.33 driver for xp and for my
suprise it was working.
I did the same for win7, and win7 also worked with the 275.33 driver.
I need to do some more testing, unfortunatly I created to small disk for
win7 so I run out of space, but will try it with a bigger disk and with some
benchmarks.
I tryed 3dmark 6 on winxp and it was running fine.

Will post more when I reinstall win7 with a bigger virtual disk, will
compare benchmarks from a virt machine and a real machine.

sorry for my poor english

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4939528.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

[-- Attachment #1.2: Type: text/html, Size: 7142 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] 102+ messages in thread

* Re: Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-10-26 13:35                                                                         ` Re : " David TECHER
@ 2011-10-27  5:58                                                                           ` Zoltan Hubai
  2011-10-27 10:14                                                                             ` Re : " David TECHER
  0 siblings, 1 reply; 102+ messages in thread
From: Zoltan Hubai @ 2011-10-27  5:58 UTC (permalink / raw)
  To: xen-devel

The joy was a bit early :(

In windows 7 (32/64 bit) I managed to install the driver but every time I
tried to start 3dMark 6 or vantage it ended up in BSOD complaining about
nvlddmkm.sys, also entering the nvidia control panel "Adjust image settings
with preview" I got the same BSOD.
I also tried once more to install the latest drivers but with no luck. The
drivers install but they report that there is no nvidia hardware.

I noticed that if I shutdown the domu then I can start it again, but if I
restart the domu then I need to restart the dom0 (i got this with winxp and
win7 domu).

In winxp I managed to run the 3dmark 6 till end and I think the score was
~18000, not sure about it, but it run all the test with > 60 fps.

Didn't try to play yet on xp, first I need to passthru a kbd/mouse, will try
over weekend.

I saw some modified quadro drivers maybe I try those also.

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4942047.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-10-27  5:58                                                                           ` Zoltan Hubai
@ 2011-10-27 10:14                                                                             ` David TECHER
  2011-12-05 22:26                                                                               ` n4rC0t1C
  0 siblings, 1 reply; 102+ messages in thread
From: David TECHER @ 2011-10-27 10:14 UTC (permalink / raw)
  To: Zoltan Hubai, xen-devel


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

First of all, thanks for the tests you've done.


The fact that  you have to reboot the dom0 is a known problem with xp or win7.

I've got the same problems as you've got on win7 (BSOD and so on...)

Managing/implementing drivers is different on xp and win7. The error with 'nvlddmkm.sys' occured frequently while I was doing my tests too.


That's the reason why I stopped my tests on win7 :(


However I do not test quadro modified drivers.

Hope you will be more lucky with this drivers.

Let me know.

Thanks for testing.


David



________________________________
De : Zoltan Hubai <hubaiz@gmail.com>
À : xen-devel@lists.xensource.com
Envoyé le : Jeudi 27 Octobre 2011 7h58
Objet : Re: Re : Re : Re : Re : Re : [Xen-devel] Re: Patches for VGA-Passthrough XEN 4.2 unstable

The joy was a bit early :(

In windows 7 (32/64 bit) I managed to install the driver but every time I
tried to start 3dMark 6 or vantage it ended up in BSOD complaining about
nvlddmkm.sys, also entering the nvidia control panel "Adjust image settings
with preview" I got the same BSOD.
I also tried once more to install the latest drivers but with no luck. The
drivers install but they report that there is no nvidia hardware.

I noticed that if I shutdown the domu then I can start it again, but if I
restart the domu then I need to restart the dom0 (i got this with winxp and
win7 domu).

In winxp I managed to run the 3dmark 6 till end and I think the score was
~18000, not sure about it, but it run all the test with > 60 fps.

Didn't try to play yet on xp, first I need to passthru a kbd/mouse, will try
over weekend.

I saw some modified quadro drivers maybe I try those also.

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p4942047.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

[-- Attachment #1.2: Type: text/html, Size: 3467 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] 102+ messages in thread

* Re: Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-10-27 10:14                                                                             ` Re : " David TECHER
@ 2011-12-05 22:26                                                                               ` n4rC0t1C
  2011-12-06 11:22                                                                                 ` Re : " David TECHER
  0 siblings, 1 reply; 102+ messages in thread
From: n4rC0t1C @ 2011-12-05 22:26 UTC (permalink / raw)
  To: xen-devel

I've been able to successfully passthrough my nvidia vga card to a windowsxp
32 bit domU, using the patches provided by David in this thread. 
Performances are AMAZING! I've played entire single player campaing of
Battlefield 3 at 1680x1050@ULTRA settings in domU, with NO visible lags or
artifacts. DomU is really rock solid, not a single crash. Crysis2, Fifa12,
NBA2K12 also played really well at maximum quality settings and resolutions.
Adobe Suite, Flash 11 and CUDA also works as on bare metal systems (eg using
gpu to accelerate).
I've been able to passthrough an usb controller and the integreted audio
card too. 


I can swich between dom0 e domU by changing the input source of the monitor,
and using synergy to share keyboard and mouse over ssh.
At boot i bind the nvidia card to pciback in grub conf file.
Later I use pci-stub to passthrough audio and usb.
When I shutdown the domU, i can bind the audio card back to the dom0 in this
way:

echo "8086 1c20" > remove_id
echo "0000:00:1b.0" > /sys/bus/pci/drivers/pci-stub/unbind
alsa force-reload



Follows a bit of infos about my system config and hardware:

CPU: Intel i5-2500
MB: Asrock z68 EXTREME4 GEN3 (bios 1.10)
PRIMARY VGA: GIGABYTE GTX460 (GV-N460OC-1GI, rev. 1.0). (@dvi on monitor)
SECONDARY VGA: integrated intel hd3000, running gnome shell 3 in dom0
(xorg-edgers ppa) (@DP on monitor).


Ubuntu 11.10-64bit with kernel 3.1.4 from ubuntu developers ppa
Linux ibeast 3.1.4-030104-generic #201111281851 SMP Mon Nov 28 23:52:23 UTC
2011 x86_64 x86_64 x86_64 GNU/Linux


xl info:

host                   : ibeast
release                : 3.1.4-030104-generic
version                : #201111281851 SMP Mon Nov 28 23:52:23 UTC 2011
machine                : x86_64
nr_cpus                : 4
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 1
cpu_mhz                : 3300
hw_caps                :
bfebfbff:28000800:00000000:00003f40:17bae3ff:00000000:00000001:00000000
virt_caps              : hvm hvm_directio
total_memory           : 8100
free_memory            : 117
free_cpus              : 0
xen_major              : 4
xen_minor              : 2
xen_extra              : -unstable
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32
hvm-3.0-x86_32p hvm-3.0-x86_64 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : Fri Dec 02 09:05:26 2011 +0100 24341:60d4e257d04b
xen_commandline        : placeholder
cc_compiler            : gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) 
cc_compile_by          : ivo
cc_compile_domain      : 
cc_compile_date        : Fri Dec  2 13:14:41 CET 2011
xend_config_format     : 4

No remarkable changes made to xen default config files.


I just want to say thanks to every single xen developer out there, and David
for posting patched for nvidia cards. You just made my "life's dream" true.
Best Regards, 
Ivo

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5050354.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-05 22:26                                                                               ` n4rC0t1C
@ 2011-12-06 11:22                                                                                 ` David TECHER
  2011-12-06 12:04                                                                                   ` n4rC0t1C
  2011-12-10  8:12                                                                                   ` Sythrar
  0 siblings, 2 replies; 102+ messages in thread
From: David TECHER @ 2011-12-06 11:22 UTC (permalink / raw)
  To: n4rC0t1C, xen-devel


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

Hi

Thanks for your mail. It is a real pleasure

- to see that it works for you

- to see that you can play your favorite game with such settings :). I played Crysis 2 using 1920x1080 resolution, DirectX 9
 but this is the only game that I tested - single player -. I have to test as you did :) for the others games.


I' ve got the same CPU as you. Intel i5 2500 :) and a GTX 460 SE EVGA  1024.


Xen should work with a Linux domU too. I've did a few test on Ubuntu Lucid 64 bits.
You have to take care of the good version of Nvidia drivers for GTX 460to work. 

I do not remember  the real version but it is for driver 270.??

My last patches for Xen Staging (http://xenbits.xensource.com/staging/xen-unstable.hg) for revision >= 24332

are available at http://www.davidgis.fr/download/xen-4.2_rev24232_gfx-passthrough-patchs.tar.bz2

Thanks for the tip about audio.

Thanks for all.


Kind regards.

David




________________________________
 De : n4rC0t1C <shandivo@gmail.com>
À : xen-devel@lists.xensource.com 
Envoyé le : Lundi 5 Décembre 2011 23h26
Objet : Re: [Xen-devel] Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
 
I've been able to successfully passthrough my nvidia vga card to a windowsxp
32 bit domU, using the patches provided by David in this thread. 
Performances are AMAZING! I've played entire single player campaing of
Battlefield 3 at 1680x1050@ULTRA settings in domU, with NO visible lags or
artifacts. DomU is really rock solid, not a single crash. Crysis2, Fifa12,
NBA2K12 also played really well at maximum quality settings and resolutions.
Adobe Suite, Flash 11 and CUDA also works as on bare metal systems (eg using
gpu to accelerate).
I've been able to passthrough an usb controller and the integreted audio
card too. 


I can swich between dom0 e domU by changing the input source of the monitor,
and using synergy to share keyboard and mouse over ssh.
At boot i bind the nvidia card to pciback in grub conf file.
Later I use pci-stub to passthrough audio and usb.
When I shutdown the domU, i can bind the audio card back to the dom0 in this
way:

echo "8086 1c20" > remove_id
echo "0000:00:1b.0" > /sys/bus/pci/drivers/pci-stub/unbind
alsa force-reload



Follows a bit of infos about my system config and hardware:

CPU: Intel i5-2500
MB: Asrock z68 EXTREME4 GEN3 (bios 1.10)
PRIMARY VGA: GIGABYTE GTX460 (GV-N460OC-1GI, rev. 1.0). (@dvi on monitor)
SECONDARY VGA: integrated intel hd3000, running gnome shell 3 in dom0
(xorg-edgers ppa) (@DP on monitor).


Ubuntu 11.10-64bit with kernel 3.1.4 from ubuntu developers ppa
Linux ibeast 3.1.4-030104-generic #201111281851 SMP Mon Nov 28 23:52:23 UTC
2011 x86_64 x86_64 x86_64 GNU/Linux


xl info:

host                   : ibeast
release                : 3.1.4-030104-generic
version                : #201111281851 SMP Mon Nov 28 23:52:23 UTC 2011
machine                : x86_64
nr_cpus                : 4
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 1
cpu_mhz                : 3300
hw_caps                :
bfebfbff:28000800:00000000:00003f40:17bae3ff:00000000:00000001:00000000
virt_caps              : hvm hvm_directio
total_memory           : 8100
free_memory            : 117
free_cpus              : 0
xen_major              : 4
xen_minor              : 2
xen_extra              : -unstable
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32
hvm-3.0-x86_32p hvm-3.0-x86_64 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : Fri Dec 02 09:05:26 2011 +0100 24341:60d4e257d04b
xen_commandline        : placeholder
cc_compiler            : gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) 
cc_compile_by          : ivo
cc_compile_domain      : 
cc_compile_date        : Fri Dec  2 13:14:41 CET 2011
xend_config_format     : 4

No remarkable changes made to xen default config files.


I just want to say thanks to every single xen developer out there, and David
for posting patched for nvidia cards. You just made my "life's dream" true.
Best Regards, 
Ivo

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5050354.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

[-- Attachment #1.2: Type: text/html, Size: 7132 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] 102+ messages in thread

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-06 11:22                                                                                 ` Re : " David TECHER
@ 2011-12-06 12:04                                                                                   ` n4rC0t1C
  2011-12-06 13:57                                                                                     ` Re : " David TECHER
  2011-12-10  8:12                                                                                   ` Sythrar
  1 sibling, 1 reply; 102+ messages in thread
From: n4rC0t1C @ 2011-12-06 12:04 UTC (permalink / raw)
  To: xen-devel

Iep I used your last patches, (your website it's at the top of my bookmarks),
and they apply to xen-unstable rev. 24341 as well (which i'm using). 

I forgot to mention that I had to make a couple of fix to xen tree, cause it
wasn't compiling on my system due to  "error: format not a string literal
and no format arguments":


--- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c
+++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c
@@ -462,7 +462,7 @@
     path = libxl__xs_libxl_path(gc, domid);
     path = libxl__sprintf(gc, "%s/dm-version", path);
     return libxl__xs_write(gc, XBT_NULL, path, libxl__strdup(gc,
-       
libxl_device_model_version_to_string(dm_info->device_model_version)));
+       
libxl_device_model_version_to_string(dm_info->device_model_version)),"%s");
 }
 
 static int do_domain_create(libxl__gc *gc, libxl_domain_config *d_config,


--- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c
+++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c
@@ -516,7 +516,7 @@
         for (j = 0; j < num_devs; j++) {
             path = libxl__sprintf(gc,
"/local/domain/%d/device/%s/%s/backend",
                                   domid, kinds[i], devs[j]);
-            path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, path));
+            path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc,
path,"%s"));
             if (path && libxl__parse_backend_path(gc, path, &dev) == 0) {
                 dev.domid = domid;
                 dev.kind = kind;

and an due to an argument missing:

--- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c
+++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c
@@ -625,7 +625,7 @@
         break;
     }
     case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
-        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC);
+        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
         if (fd2 < 0) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
                              "Unable to create a QEMU save file\n");

As far as I know those doesn't break anything, but dont take too seriously,
i'm not an experienced developer :)


Forgot 2:
Since I'm using an ubuntu kernel, the xen support is not integrated, but you
need to add xen modules at your inittrd file. I did this by adding those:

xen-pciback passthrough=1
xen-blkback
xenfs
xen-netback
pci-stub

to /etc/xen/initramfs-tools/modules and the issuing update-initramfs. 

In the future, I'll try to boot a linux domU, right now I'm still smiling
cause I can fully wipe my Windows installation from the hard disk. And I'm
sure that in future Win7 will be supported too.

Thanks again David and everyone,
Ivo

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5051880.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re : Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-06 12:04                                                                                   ` n4rC0t1C
@ 2011-12-06 13:57                                                                                     ` David TECHER
  2011-12-06 15:19                                                                                       ` Tobias Geiger
  0 siblings, 1 reply; 102+ messages in thread
From: David TECHER @ 2011-12-06 13:57 UTC (permalink / raw)
  To: n4rC0t1C, xen-devel


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

Hi

Thanks for these informations. I am on Debian. So it could be usefull for Ubuntu users.

Thanks.

David



________________________________
 De : n4rC0t1C <shandivo@gmail.com>
À : xen-devel@lists.xensource.com 
Envoyé le : Mardi 6 Décembre 2011 13h04
Objet : Re: [Xen-devel] Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
 
Iep I used your last patches, (your website it's at the top of my bookmarks),
and they apply to xen-unstable rev. 24341 as well (which i'm using). 

I forgot to mention that I had to make a couple of fix to xen tree, cause it
wasn't compiling on my system due to  "error: format not a string literal
and no format arguments":


--- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c
+++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c
@@ -462,7 +462,7 @@
     path = libxl__xs_libxl_path(gc, domid);
     path = libxl__sprintf(gc, "%s/dm-version", path);
     return libxl__xs_write(gc, XBT_NULL, path, libxl__strdup(gc,
-      
libxl_device_model_version_to_string(dm_info->device_model_version)));
+      
libxl_device_model_version_to_string(dm_info->device_model_version)),"%s");
}

static int do_domain_create(libxl__gc *gc, libxl_domain_config *d_config,


--- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c
+++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c
@@ -516,7 +516,7 @@
         for (j = 0; j < num_devs; j++) {
             path = libxl__sprintf(gc,
"/local/domain/%d/device/%s/%s/backend",
                                   domid, kinds[i], devs[j]);
-            path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, path));
+            path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc,
path,"%s"));
             if (path && libxl__parse_backend_path(gc, path, &dev) == 0) {
                 dev.domid = domid;
                 dev.kind = kind;

and an due to an argument missing:

--- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c
+++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c
@@ -625,7 +625,7 @@
         break;
     }
     case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
-        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC);
+        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
         if (fd2 < 0) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
                              "Unable to create a QEMU save file\n");

As far as I know those doesn't break anything, but dont take too seriously,
i'm not an experienced developer :)


Forgot 2:
Since I'm using an ubuntu kernel, the xen support is not integrated, but you
need to add xen modules at your inittrd file. I did this by adding those:

xen-pciback passthrough=1
xen-blkback
xenfs
xen-netback
pci-stub

to /etc/xen/initramfs-tools/modules and the issuing update-initramfs. 

In the future, I'll try to boot a linux domU, right now I'm still smiling
cause I can fully wipe my Windows installation from the hard disk. And I'm
sure that in future Win7 will be supported too.

Thanks again David and everyone,
Ivo

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5051880.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

[-- Attachment #1.2: Type: text/html, Size: 5373 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] 102+ messages in thread

* Re: Re : Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-06 13:57                                                                                     ` Re : " David TECHER
@ 2011-12-06 15:19                                                                                       ` Tobias Geiger
  2011-12-06 15:56                                                                                         ` Re : " David TECHER
  2011-12-06 22:28                                                                                         ` David TECHER
  0 siblings, 2 replies; 102+ messages in thread
From: Tobias Geiger @ 2011-12-06 15:19 UTC (permalink / raw)
  To: xen-devel, David TECHER; +Cc: n4rC0t1C

Hello,

glad to hear it works for you!

As i run a similar setup, perhaps you can share your experience regarding 
DomU-Reboot with a VGA Card passed through to it: Does a reboot work, i.e. 
does the passed-through VGA Card work after a DomU reboot?

My hole System (DomU + Dom0) freezes after a reboot of DomU (exaclty then, 
when the passed-through VGA Card is accessed...), therefore the question.

Thanks for your info!
Greetings
Tobias

Am Dienstag, 6. Dezember 2011, 14:57:30 schrieb David TECHER:
> Hi
> 
> Thanks for these informations. I am on Debian. So it could be usefull for
> Ubuntu users.
> 
> Thanks.
> 
> David
> 
> 
> 
> ________________________________
>  De : n4rC0t1C <shandivo@gmail.com>
> À : xen-devel@lists.xensource.com
> Envoyé le : Mardi 6 Décembre 2011 13h04
> Objet : Re: [Xen-devel] Re : Re : Re : Re : Re : Re : Re : Re: Patches for
> VGA-Passthrough XEN 4.2 unstable
> 
> Iep I used your last patches, (your website it's at the top of my
> bookmarks), and they apply to xen-unstable rev. 24341 as well (which i'm
> using).
> 
> I forgot to mention that I had to make a couple of fix to xen tree, cause
> it wasn't compiling on my system due to  "error: format not a string
> literal and no format arguments":
> 
> 
> --- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c
> +++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c
> @@ -462,7 +462,7 @@
>      path = libxl__xs_libxl_path(gc, domid);
>      path = libxl__sprintf(gc, "%s/dm-version", path);
>      return libxl__xs_write(gc, XBT_NULL, path, libxl__strdup(gc,
> -     
> libxl_device_model_version_to_string(dm_info->device_model_version)));
> +     
> libxl_device_model_version_to_string(dm_info->device_model_version)),"%s");
> }
> 
> static int do_domain_create(libxl__gc *gc, libxl_domain_config *d_config,
> 
> 
> --- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c
> +++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c
> @@ -516,7 +516,7 @@
>          for (j = 0; j < num_devs; j++) {
>              path = libxl__sprintf(gc,
> "/local/domain/%d/device/%s/%s/backend",
>                                    domid, kinds[i], devs[j]);
> -            path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, path));
> +            path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc,
> path,"%s"));
>              if (path && libxl__parse_backend_path(gc, path, &dev) == 0) {
>                  dev.domid = domid;
>                  dev.kind = kind;
> 
> and an due to an argument missing:
> 
> --- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c
> +++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c
> @@ -625,7 +625,7 @@
>          break;
>      }
>      case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
> -        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC);
> +        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
>          if (fd2 < 0) {
>              LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
>                               "Unable to create a QEMU save file\n");
> 
> As far as I know those doesn't break anything, but dont take too seriously,
> i'm not an experienced developer :)
> 
> 
> Forgot 2:
> Since I'm using an ubuntu kernel, the xen support is not integrated, but
> you need to add xen modules at your inittrd file. I did this by adding
> those:
> 
> xen-pciback passthrough=1
> xen-blkback
> xenfs
> xen-netback
> pci-stub
> 
> to /etc/xen/initramfs-tools/modules and the issuing update-initramfs.
> 
> In the future, I'll try to boot a linux domU, right now I'm still smiling
> cause I can fully wipe my Windows installation from the hard disk. And I'm
> sure that in future Win7 will be supported too.
> 
> Thanks again David and everyone,
> Ivo
> 
> --
> View this message in context:
> http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unsta
> ble-tp4406265p5051880.html Sent from the Xen - Dev mailing list archive at
> Nabble.com.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

* Re : Re : Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-06 15:19                                                                                       ` Tobias Geiger
@ 2011-12-06 15:56                                                                                         ` David TECHER
  2011-12-06 22:28                                                                                         ` David TECHER
  1 sibling, 0 replies; 102+ messages in thread
From: David TECHER @ 2011-12-06 15:56 UTC (permalink / raw)
  To: xen-devel


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

Tobias

I am at office for the moment. I will have a try when I go back to home in a couple of hours.

Thanks.

David.



________________________________
 De : Tobias Geiger [via Xen] <ml-node+s1045712n5052398h36@n5.nabble.com>
À : David TECHER <davidtecher@yahoo.fr> 
Envoyé le : Mardi 6 Décembre 2011 16h21
Objet : Re: Re : Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
 

Hello, 

glad to hear it works for you! 

As i run a similar setup, perhaps you can share your experience regarding 
DomU-Reboot with a VGA Card passed through to it: Does a reboot work, i.e. 
does the passed-through VGA Card work after a DomU reboot? 

My hole System (DomU + Dom0) freezes after a reboot of DomU (exaclty then, 
when the passed-through VGA Card is accessed...), therefore the question. 

Thanks for your info! 
Greetings 
Tobias 

Am Dienstag, 6. Dezember 2011, 14:57:30 schrieb David TECHER: 

> Hi 
> 
> Thanks for these informations. I am on Debian. So it could be usefull for 
> Ubuntu users. 
> 
> Thanks. 
> 
> David 
> 
> 
> 
> ________________________________ 
>  De : n4rC0t1C <[hidden email]> 
> À : [hidden email] 
> Envoyé le : Mardi 6 Décembre 2011 13h04 
> Objet : Re: [Xen-devel] Re : Re : Re : Re : Re : Re : Re : Re: Patches for 
> VGA-Passthrough XEN 4.2 unstable 
> 
> Iep I used your last patches, (your website it's at the top of my 
> bookmarks), and they apply to xen-unstable rev. 24341 as well (which i'm 
> using). 
> 
> I forgot to mention that I had to make a couple of fix to xen tree, cause 
> it wasn't compiling on my system due to  "error: format not a string 
> literal and no format arguments": 
> 
> 
> --- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c 
> +++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c 
> @@ -462,7 +462,7 @@ 
>      path = libxl__xs_libxl_path(gc, domid); 
>      path = libxl__sprintf(gc, "%s/dm-version", path); 
>      return libxl__xs_write(gc, XBT_NULL, path, libxl__strdup(gc, 
> -     
> libxl_device_model_version_to_string(dm_info->device_model_version))); 
> +     
> libxl_device_model_version_to_string(dm_info->device_model_version)),"%s"); 
> } 
> 
> static int do_domain_create(libxl__gc *gc, libxl_domain_config *d_config, 
> 
> 
> --- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c 
> +++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c 
> @@ -516,7 +516,7 @@ 
>          for (j = 0; j < num_devs; j++) { 
>              path = libxl__sprintf(gc, 
> "/local/domain/%d/device/%s/%s/backend", 
>                                    domid, kinds[i], devs[j]); 
> -            path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, path)); 
> +            path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, 
> path,"%s")); 
>              if (path && libxl__parse_backend_path(gc, path, &dev) == 0) { 
>                  dev.domid = domid; 
>                  dev.kind = kind; 
> 
> and an due to an argument missing: 
> 
> --- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c 
> +++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c 
> @@ -625,7 +625,7 @@ 
>          break; 
>      } 
>      case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: 
> -        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC); 
> +        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644); 
>          if (fd2 < 0) { 
>              LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, 
>                               "Unable to create a QEMU save file\n"); 
> 
> As far as I know those doesn't break anything, but dont take too seriously, 
> i'm not an experienced developer :) 
> 
> 
> Forgot 2: 
> Since I'm using an ubuntu kernel, the xen support is not integrated, but 
> you need to add xen modules at your inittrd file. I did this by adding 
> those: 
> 
> xen-pciback passthrough=1 
> xen-blkback 
> xenfs 
> xen-netback 
> pci-stub 
> 
> to /etc/xen/initramfs-tools/modules and the issuing update-initramfs. 
> 
> In the future, I'll try to boot a linux domU, right now I'm still smiling 
> cause I can fully wipe my Windows installation from the hard disk. And I'm 
> sure that in future Win7 will be supported too. 
> 
> Thanks again David and everyone, 
> Ivo 
> 
> -- 
> View this message in context: 
> http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unsta
> ble-tp4406265p5051880.html Sent from the Xen - Dev mailing list archive at 
> Nabble.com. 
> 
> _______________________________________________ 
> Xen-devel mailing list 
> [hidden email] 
> http://lists.xensource.com/xen-devel

_______________________________________________ 
Xen-devel mailing list 
[hidden email] 
http://lists.xensource.com/xen-devel


________________________________
 
If you reply to this email, your message will be added to the discussion below:http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5052398.html 
To unsubscribe from Patches for VGA-Passthrough XEN 4.2 unstable, click here.
NAML

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5052523.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

[-- Attachment #1.2: Type: text/html, Size: 9588 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] 102+ messages in thread

* Re : Re : Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-06 15:19                                                                                       ` Tobias Geiger
  2011-12-06 15:56                                                                                         ` Re : " David TECHER
@ 2011-12-06 22:28                                                                                         ` David TECHER
  2011-12-07 11:01                                                                                           ` n4rC0t1C
  2011-12-07 11:44                                                                                           ` Tobias Geiger
  1 sibling, 2 replies; 102+ messages in thread
From: David TECHER @ 2011-12-06 22:28 UTC (permalink / raw)
  To: xen-devel


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

Tobias,

When I restart my domU, my domU freezes (the boot screen of Windows XP is frozen with blue progression bar). Only my dom0 is available.

David.



________________________________
 De : Tobias Geiger [via Xen] <ml-node+s1045712n5052398h36@n5.nabble.com>
À : David TECHER <davidtecher@yahoo.fr> 
Envoyé le : Mardi 6 Décembre 2011 16h21
Objet : Re: Re : Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
 

Hello, 

glad to hear it works for you! 

As i run a similar setup, perhaps you can share your experience regarding 
DomU-Reboot with a VGA Card passed through to it: Does a reboot work, i.e. 
does the passed-through VGA Card work after a DomU reboot? 

My hole System (DomU + Dom0) freezes after a reboot of DomU (exaclty then, 
when the passed-through VGA Card is accessed...), therefore the question. 

Thanks for your info! 
Greetings 
Tobias 

Am Dienstag, 6. Dezember 2011, 14:57:30 schrieb David TECHER: 

> Hi 
> 
> Thanks for these informations. I am on Debian. So it could be usefull for 
> Ubuntu users. 
> 
> Thanks. 
> 
> David 
> 
> 
> 
> ________________________________ 
>  De : n4rC0t1C <[hidden email]> 
> À : [hidden email] 
> Envoyé le : Mardi 6 Décembre 2011 13h04 
> Objet : Re: [Xen-devel] Re : Re : Re : Re : Re : Re : Re : Re: Patches for 
> VGA-Passthrough XEN 4.2 unstable 
> 
> Iep I used your last patches, (your website it's at the top of my 
> bookmarks), and they apply to xen-unstable rev. 24341 as well (which i'm 
> using). 
> 
> I forgot to mention that I had to make a couple of fix to xen tree, cause 
> it wasn't compiling on my system due to  "error: format not a string 
> literal and no format arguments": 
> 
> 
> --- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c 
> +++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c 
> @@ -462,7 +462,7 @@ 
>      path = libxl__xs_libxl_path(gc, domid); 
>      path = libxl__sprintf(gc, "%s/dm-version", path); 
>      return libxl__xs_write(gc, XBT_NULL, path, libxl__strdup(gc, 
> -     
> libxl_device_model_version_to_string(dm_info->device_model_version))); 
> +     
> libxl_device_model_version_to_string(dm_info->device_model_version)),"%s"); 
> } 
> 
> static int do_domain_create(libxl__gc *gc, libxl_domain_config *d_config, 
> 
> 
> --- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c 
> +++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c 
> @@ -516,7 +516,7 @@ 
>          for (j = 0; j < num_devs; j++) { 
>              path = libxl__sprintf(gc, 
> "/local/domain/%d/device/%s/%s/backend", 
>                                    domid, kinds[i], devs[j]); 
> -            path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, path)); 
> +            path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, 
> path,"%s")); 
>              if (path && libxl__parse_backend_path(gc, path, &dev) == 0) { 
>                  dev.domid = domid; 
>                  dev.kind = kind; 
> 
> and an due to an argument missing: 
> 
> --- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c 
> +++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c 
> @@ -625,7 +625,7 @@ 
>          break; 
>      } 
>      case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: 
> -        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC); 
> +        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644); 
>          if (fd2 < 0) { 
>              LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, 
>                               "Unable to create a QEMU save file\n"); 
> 
> As far as I know those doesn't break anything, but dont take too seriously, 
> i'm not an experienced developer :) 
> 
> 
> Forgot 2: 
> Since I'm using an ubuntu kernel, the xen support is not integrated, but 
> you need to add xen modules at your inittrd file. I did this by adding 
> those: 
> 
> xen-pciback passthrough=1 
> xen-blkback 
> xenfs 
> xen-netback 
> pci-stub 
> 
> to /etc/xen/initramfs-tools/modules and the issuing update-initramfs. 
> 
> In the future, I'll try to boot a linux domU, right now I'm still smiling 
> cause I can fully wipe my Windows installation from the hard disk. And I'm 
> sure that in future Win7 will be supported too. 
> 
> Thanks again David and everyone, 
> Ivo 
> 
> -- 
> View this message in context: 
> http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unsta
> ble-tp4406265p5051880.html Sent from the Xen - Dev mailing list archive at 
> Nabble.com. 
> 
> _______________________________________________ 
> Xen-devel mailing list 
> [hidden email] 
> http://lists.xensource.com/xen-devel

_______________________________________________ 
Xen-devel mailing list 
[hidden email] 
http://lists.xensource.com/xen-devel


________________________________
 
If you reply to this email, your message will be added to the discussion below:http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5052398.html 
To unsubscribe from Patches for VGA-Passthrough XEN 4.2 unstable, click here.
NAML

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5053675.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

[-- Attachment #1.2: Type: text/html, Size: 9543 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] 102+ messages in thread

* Re: Re : Re : Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-06 22:28                                                                                         ` David TECHER
@ 2011-12-07 11:01                                                                                           ` n4rC0t1C
  2011-12-07 11:44                                                                                           ` Tobias Geiger
  1 sibling, 0 replies; 102+ messages in thread
From: n4rC0t1C @ 2011-12-07 11:01 UTC (permalink / raw)
  To: xen-devel

Same happens to me, my domU freezes, dom0 is still usable. Sometimes domU
boots, but it's completely unusable due to graphics artifacts every time you
launch an application or move the mouse.

Ivo

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5055204.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-06 22:28                                                                                         ` David TECHER
  2011-12-07 11:01                                                                                           ` n4rC0t1C
@ 2011-12-07 11:44                                                                                           ` Tobias Geiger
  1 sibling, 0 replies; 102+ messages in thread
From: Tobias Geiger @ 2011-12-07 11:44 UTC (permalink / raw)
  To: xen-devel, allen.m.kay; +Cc: David TECHER

Hi David,

i tried it also (reboot DomU) and to my surprise it didnt crash anymore! :)

BUT the passed through Card in DomU has very decreased Performance after the 
reboot - i guess that has someting to do with what Allen Kay mentions in his 
slides here: http://www.linux-kvm.org/wiki/images/b/be/2011-forum-%24graphics-
direct-assignment.pdf (Slide 11) ?!

@Allen : i hope you dont mind me setting you CC here 

Greetings!
Tobias


Am Dienstag, 6. Dezember 2011, 23:28:39 schrieb David TECHER:
> Tobias,
> 
> When I restart my domU, my domU freezes (the boot screen of Windows XP is
> frozen with blue progression bar). Only my dom0 is available.
> 
> David.
> 
> 
> 
> ________________________________
>  De : Tobias Geiger [via Xen] <ml-node+s1045712n5052398h36@n5.nabble.com>
> À : David TECHER <davidtecher@yahoo.fr>
> Envoyé le : Mardi 6 Décembre 2011 16h21
> Objet : Re: Re : Re : Re : Re : Re : Re : Re : Re : Re: Patches for
> VGA-Passthrough XEN 4.2 unstable
> 
> 
> Hello,
> 
> glad to hear it works for you!
> 
> As i run a similar setup, perhaps you can share your experience regarding
> DomU-Reboot with a VGA Card passed through to it: Does a reboot work, i.e.
> does the passed-through VGA Card work after a DomU reboot?
> 
> My hole System (DomU + Dom0) freezes after a reboot of DomU (exaclty then,
> when the passed-through VGA Card is accessed...), therefore the question.
> 
> Thanks for your info!
> Greetings
> Tobias
> 
> Am Dienstag, 6. Dezember 2011, 14:57:30 schrieb David TECHER:
> > Hi
> > 
> > Thanks for these informations. I am on Debian. So it could be usefull for
> > Ubuntu users.
> > 
> > Thanks.
> > 
> > David
> > 
> > 
> > 
> > ________________________________
> >  De : n4rC0t1C <[hidden email]>
> > À : [hidden email]
> > Envoyé le : Mardi 6 Décembre 2011 13h04
> > Objet : Re: [Xen-devel] Re : Re : Re : Re : Re : Re : Re : Re: Patches
> > for VGA-Passthrough XEN 4.2 unstable
> > 
> > Iep I used your last patches, (your website it's at the top of my
> > bookmarks), and they apply to xen-unstable rev. 24341 as well (which i'm
> > using).
> > 
> > I forgot to mention that I had to make a couple of fix to xen tree, cause
> > it wasn't compiling on my system due to  "error: format not a string
> > literal and no format arguments":
> > 
> > 
> > --- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c
> > +++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_create.c
> > @@ -462,7 +462,7 @@
> >      path = libxl__xs_libxl_path(gc, domid);
> >      path = libxl__sprintf(gc, "%s/dm-version", path);
> >      return libxl__xs_write(gc, XBT_NULL, path, libxl__strdup(gc,
> > -    
> > libxl_device_model_version_to_string(dm_info->device_model_version)));
> > +    
> > libxl_device_model_version_to_string(dm_info->device_model_version)),"%s"
> > ); }
> > 
> > static int do_domain_create(libxl__gc *gc, libxl_domain_config *d_config,
> > 
> > 
> > --- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c
> > +++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_device.c
> > @@ -516,7 +516,7 @@
> >          for (j = 0; j < num_devs; j++) {
> >              path = libxl__sprintf(gc,
> > "/local/domain/%d/device/%s/%s/backend",
> >                                    domid, kinds[i], devs[j]);
> > -            path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc,
> > path)); +            path = libxl__xs_read(gc, XBT_NULL,
> > libxl__sprintf(gc, path,"%s"));
> >              if (path && libxl__parse_backend_path(gc, path, &dev) == 0)
> > { dev.domid = domid;
> >                  dev.kind = kind;
> > 
> > and an due to an argument missing:
> > 
> > --- /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c
> > +++ /usr/src/xen-unstable.hg-rev-24341-460gtx/tools/libxl/libxl_dom.c
> > @@ -625,7 +625,7 @@
> >          break;
> >      }
> >      case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
> > -        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC);
> > +        fd2 = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
> >          if (fd2 < 0) {
> >              LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
> >                               "Unable to create a QEMU save file\n");
> > 
> > As far as I know those doesn't break anything, but dont take too
> > seriously, i'm not an experienced developer :)
> > 
> > 
> > Forgot 2:
> > Since I'm using an ubuntu kernel, the xen support is not integrated, but
> > you need to add xen modules at your inittrd file. I did this by adding
> > those:
> > 
> > xen-pciback passthrough=1
> > xen-blkback
> > xenfs
> > xen-netback
> > pci-stub
> > 
> > to /etc/xen/initramfs-tools/modules and the issuing update-initramfs.
> > 
> > In the future, I'll try to boot a linux domU, right now I'm still smiling
> > cause I can fully wipe my Windows installation from the hard disk. And
> > I'm sure that in future Win7 will be supported too.
> > 
> > Thanks again David and everyone,
> > Ivo
> 
> _______________________________________________
> Xen-devel mailing list
> [hidden email]
> http://lists.xensource.com/xen-devel
> 
> 
> ________________________________
> 
> If you reply to this email, your message will be added to the discussion
> below:http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2
> -unstable-tp4406265p5052398.html To unsubscribe from Patches for
> VGA-Passthrough XEN 4.2 unstable, click here. NAML
> 
> --
> View this message in context:
> http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unsta
> ble-tp4406265p5053675.html Sent from the Xen - Dev mailing list archive at
> Nabble.com.

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

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-06 11:22                                                                                 ` Re : " David TECHER
  2011-12-06 12:04                                                                                   ` n4rC0t1C
@ 2011-12-10  8:12                                                                                   ` Sythrar
  2011-12-10 12:29                                                                                     ` n4rC0t1C
  2011-12-10 12:29                                                                                     ` n4rC0t1C
  1 sibling, 2 replies; 102+ messages in thread
From: Sythrar @ 2011-12-10  8:12 UTC (permalink / raw)
  To: xen-devel

n4rC0t1C, DomU VNC you tested with, if so, has good performance in game? 

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5063848.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-10  8:12                                                                                   ` Sythrar
@ 2011-12-10 12:29                                                                                     ` n4rC0t1C
  2011-12-13 21:03                                                                                       ` Sythrar
  2011-12-10 12:29                                                                                     ` n4rC0t1C
  1 sibling, 1 reply; 102+ messages in thread
From: n4rC0t1C @ 2011-12-10 12:29 UTC (permalink / raw)
  To: xen-devel

No vnc, physical DVI screen. And performances are really good, you'll not
notice you're under a domU, especially in 3D games.

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5064245.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-10  8:12                                                                                   ` Sythrar
  2011-12-10 12:29                                                                                     ` n4rC0t1C
@ 2011-12-10 12:29                                                                                     ` n4rC0t1C
  1 sibling, 0 replies; 102+ messages in thread
From: n4rC0t1C @ 2011-12-10 12:29 UTC (permalink / raw)
  To: xen-devel


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

No vnc, physical DVI screen. And performances are really good, you'll not
notice you're under a domU, especially in 3D games.

On Sat, Dec 10, 2011 at 9:12 AM, Sythrar [via Xen] <
ml-node+s1045712n5063848h66@n5.nabble.com> wrote:

> n4rC0t1C, DomU VNC you tested with, if so, has good performance in game?
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5063848.html
>  To unsubscribe from Patches for VGA-Passthrough XEN 4.2 unstable, click
> here<http://xen.1045712.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4406265&code=c2hhbmRpdm9AZ21haWwuY29tfDQ0MDYyNjV8LTE0MDgyODU1MjU=>
> .
> NAML<http://xen.1045712.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5064246.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

[-- Attachment #1.2: Type: text/html, Size: 2305 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] 102+ messages in thread

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-10 12:29                                                                                     ` n4rC0t1C
@ 2011-12-13 21:03                                                                                       ` Sythrar
  2011-12-14  9:43                                                                                         ` Tobias Geiger
  0 siblings, 1 reply; 102+ messages in thread
From: Sythrar @ 2011-12-13 21:03 UTC (permalink / raw)
  To: xen-devel

n4rC0t1C, test for me is to run domU with vnc and tell me how was the
performance. Thank you very much.
My dream is to play games on linux without wine.
sorry my english

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5072769.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-13 21:03                                                                                       ` Sythrar
@ 2011-12-14  9:43                                                                                         ` Tobias Geiger
  2011-12-14 13:37                                                                                           ` n4rC0t1C
  2012-02-16 13:38                                                                                           ` Jamesffs
  0 siblings, 2 replies; 102+ messages in thread
From: Tobias Geiger @ 2011-12-14  9:43 UTC (permalink / raw)
  To: xen-devel; +Cc: Sythrar

Hi Sythrar,

you can't see the output of the passed-through-VGA Card in VNC. At least not 
in the qemu-vnc server; The output to that emulated (Cirrus?) Card stops as 
soon as  the Driver for the passed-through-VGA Card is loaded within the DomU.
>From that moment on the you can only see the output on a Monitor attached to 
the passed-through-VGA Card. VNC is of course possible with the DomU 
facilities, i.e. install a VNC Server within DomU and attach a vncviewer to it 
- but its not really practical regarding 3D- or Movie Output (at least not 
without optimizations to the VNC Server/Client)

But your dream is possible: Buy a VT-D capable Motherboard and a ATI 6xxx 
Graphics-Card to pass through and you're good to go!
(Nvidia may also work with some patches, but the newer ATI ones don't need any 
patches)

Greetings
Tobias

Am Dienstag, 13. Dezember 2011, 22:03:59 schrieb Sythrar:
> n4rC0t1C, test for me is to run domU with vnc and tell me how was the
> performance. Thank you very much.
> My dream is to play games on linux without wine.
> sorry my english
> 
> --
> View this message in context:
> http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unsta
> ble-tp4406265p5072769.html Sent from the Xen - Dev mailing list archive at
> Nabble.com.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-14  9:43                                                                                         ` Tobias Geiger
@ 2011-12-14 13:37                                                                                           ` n4rC0t1C
  2012-02-16 13:38                                                                                           ` Jamesffs
  1 sibling, 0 replies; 102+ messages in thread
From: n4rC0t1C @ 2011-12-14 13:37 UTC (permalink / raw)
  To: xen-devel

Agreed 100% with what Tobias said. Ati is maybe easier and according to what
Liwei says in this thread, it works in Windows 7 domU too. 
My passthrough doesn't work in Win7 domu using 275.33 nvidia drivers. The
system boots, it recognizes the card, but everything is really slow, and
xl-top shows like the domu is always waiting for some kind of interrupt. As
soon as I open the nvidia control panel it reboots with error 
VIDEO_TDR_FAILURE (116). 
It's strange because all the memory and I/O assignments to the card are the
same as the bare metal Windows 7. 
I would really like to know what's the difference between how winxp and win7
access the video card.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5074485.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-09-09 11:31 ` Liwei
  2011-09-09 16:17   ` Wei Huang
  2011-09-12 12:49   ` Tobias Geiger
@ 2012-01-05 23:15   ` romihs
  2012-01-06  1:13     ` n4rC0t1C
  2 siblings, 1 reply; 102+ messages in thread
From: romihs @ 2012-01-05 23:15 UTC (permalink / raw)
  To: xen-devel

Hello,

I am not a developer, but am using this discussion as a guideline to getting
PCI passthrough working on my system.

I am trying to get a EVGA GTX480 SE passed through to the VM (Windows 7).

Also I am considering arranging my system so that the NVIDIA card will be
the secondary VGA interface, passed through to my DomU. The primary
interface (on-board VGA) will be used for Dom0.

I would like to ask if the current xen-unstable (24462) has the patches
discussed here incorporated into it or will I still have to patch this
version to get my NVDIA card passed through?


Also, has anyone successfully passed the GTX480 through to a Windows or
Linux DomU?

Thanks and best regards

Sandi

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5124160.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2012-01-05 23:15   ` romihs
@ 2012-01-06  1:13     ` n4rC0t1C
  2012-01-06 14:23       ` Re : " David TECHER
  0 siblings, 1 reply; 102+ messages in thread
From: n4rC0t1C @ 2012-01-06  1:13 UTC (permalink / raw)
  To: xen-devel

Forget about Windows 7. I didn't see a single working solution to passthrough
an nVidia card (at least not Quadro) to a win7 domu. 

However WindowsXP works almost painless. Just follow instructions and apply
patches from D. Teacher on his website and everything should work just fine. 
http://www.davidgis.fr/blog/index.php?2011/12/07/860-xen-42unstable-patches-for-vga-pass-through

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5124377.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re :  Patches for VGA-Passthrough XEN 4.2 unstable
  2012-01-06  1:13     ` n4rC0t1C
@ 2012-01-06 14:23       ` David TECHER
  2012-01-06 16:22         ` -+= Lta =+-
  0 siblings, 1 reply; 102+ messages in thread
From: David TECHER @ 2012-01-06 14:23 UTC (permalink / raw)
  To: n4rC0t1C, xen-devel


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

All informations given - by n4rc0tic - are right.

For XP: nvidia should work


For win7, you should be well-advised to use a ATI card.

David.



________________________________
 De : n4rC0t1C <shandivo@gmail.com>
À : xen-devel@lists.xensource.com 
Envoyé le : Vendredi 6 Janvier 2012 2h13
Objet : Re: [Xen-devel] Patches for VGA-Passthrough XEN 4.2 unstable
 
Forget about Windows 7. I didn't see a single working solution to passthrough
an nVidia card (at least not Quadro) to a win7 domu. 

However WindowsXP works almost painless. Just follow instructions and apply
patches from D. Teacher on his website and everything should work just fine. 
http://www.davidgis.fr/blog/index.php?2011/12/07/860-xen-42unstable-patches-for-vga-pass-through

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5124377.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

[-- Attachment #1.2: Type: text/html, Size: 2306 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] 102+ messages in thread

* Re: Re : Patches for VGA-Passthrough XEN 4.2 unstable
  2012-01-06 14:23       ` Re : " David TECHER
@ 2012-01-06 16:22         ` -+= Lta =+-
  2012-01-06 16:34           ` n4rC0t1C
  0 siblings, 1 reply; 102+ messages in thread
From: -+= Lta =+- @ 2012-01-06 16:22 UTC (permalink / raw)
  To: David TECHER; +Cc: n4rC0t1C, xen-devel


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

Hello,

I've just posted on the list my setup of a working win7 domu with an nvidia
card. You might wanna have a look.

--
Lta

On Fri, Jan 6, 2012 at 3:23 PM, David TECHER <davidtecher@yahoo.fr> wrote:

> All informations given - by n4rc0tic - are right.
>
> For XP: nvidia should work
>
> For win7, you should be well-advised to use a ATI card.
>
> David.
>
>   ------------------------------
> *De :* n4rC0t1C <shandivo@gmail.com>
> *À :* xen-devel@lists.xensource.com
> *Envoyé le :* Vendredi 6 Janvier 2012 2h13
> *Objet :* Re: [Xen-devel] Patches for VGA-Passthrough XEN 4.2 unstable
>
> Forget about Windows 7. I didn't see a single working solution to
> passthrough
> an nVidia card (at least not Quadro) to a win7 domu.
>
> However WindowsXP works almost painless. Just follow instructions and apply
> patches from D. Teacher on his website and everything should work just
> fine.
>
> http://www.davidgis.fr/blog/index.php?2011/12/07/860-xen-42unstable-patches-for-vga-pass-through
>
> --
> View this message in context:
> http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5124377.html
> Sent from the Xen - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>

[-- Attachment #1.2: Type: text/html, Size: 3193 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] 102+ messages in thread

* Re: Re : Patches for VGA-Passthrough XEN 4.2 unstable
  2012-01-06 16:22         ` -+= Lta =+-
@ 2012-01-06 16:34           ` n4rC0t1C
  2012-01-06 16:51             ` -+= Lta =+-
  0 siblings, 1 reply; 102+ messages in thread
From: n4rC0t1C @ 2012-01-06 16:34 UTC (permalink / raw)
  To: xen-devel


-+= Lta =+- wrote
> 
> Hello,
> 
> I've just posted on the list my setup of a working win7 domu with an
> nvidia
> card. You might wanna have a look.
> 
> --
> Lta
> 
> On Fri, Jan 6, 2012 at 3:23 PM, David TECHER &lt;davidtecher@&gt; wrote:
> 
> 

Sorry, where? Dind't find the post. REALLY interested.

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5126020.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Patches for VGA-Passthrough XEN 4.2 unstable
  2012-01-06 16:34           ` n4rC0t1C
@ 2012-01-06 16:51             ` -+= Lta =+-
  2012-01-06 16:58               ` Re : " David TECHER
  0 siblings, 1 reply; 102+ messages in thread
From: -+= Lta =+- @ 2012-01-06 16:51 UTC (permalink / raw)
  To: n4rC0t1C; +Cc: xen-devel


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

On Fri, Jan 6, 2012 at 5:34 PM, n4rC0t1C <shandivo@gmail.com> wrote:

>
> -+= Lta =+- wrote
> >
> > Hello,
> >
> > I've just posted on the list my setup of a working win7 domu with an
> > nvidia
> > card. You might wanna have a look.
> >
> > --
> > Lta
> >
> > On Fri, Jan 6, 2012 at 3:23 PM, David TECHER &lt;davidtecher@&gt; wrote:
> >
> >
>
> Sorry, where? Dind't find the post. REALLY interested.
>


Hi,

I must have sent him from the wrong address so the list refused it. I've
resent it with the right one, it should be in your inbox somewhere

Regards,
Lta


>
> --
> View this message in context:
> http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5126020.html
> Sent from the Xen - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>

[-- Attachment #1.2: Type: text/html, Size: 1893 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] 102+ messages in thread

* Re : Re : Patches for VGA-Passthrough XEN 4.2 unstable
  2012-01-06 16:51             ` -+= Lta =+-
@ 2012-01-06 16:58               ` David TECHER
  2012-01-06 17:00                 ` David TECHER
  0 siblings, 1 reply; 102+ messages in thread
From: David TECHER @ 2012-01-06 16:58 UTC (permalink / raw)
  To: -+= Lta =+-, n4rC0t1C; +Cc: xen-devel


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

Interested too.

I did a search on my inbox found nothing even in the incoming mails you sent



________________________________
 De : -+= Lta =+- <lta@akr.fm>
À : n4rC0t1C <shandivo@gmail.com> 
Cc : xen-devel@lists.xensource.com 
Envoyé le : Vendredi 6 Janvier 2012 17h51
Objet : Re: [Xen-devel] Re : Patches for VGA-Passthrough XEN 4.2 unstable
 




On Fri, Jan 6, 2012 at 5:34 PM, n4rC0t1C <shandivo@gmail.com> wrote:


>-+= Lta =+- wrote
>
>>
>> Hello,
>>
>> I've just posted on the list my setup of a working win7 domu with an
>> nvidia
>> card. You might wanna have a look.
>>
>> --
>> Lta
>>
>> On Fri, Jan 6, 2012 at 3:23 PM, David TECHER &lt;davidtecher@&gt; wrote:
>>
>>
>
>Sorry, where? Dind't find the post. REALLY interested.
>


Hi,


I must have sent him from the wrong address so the list refused it. I've resent it with the right one, it should be in your inbox somewhere

Regards,
Lta
 

>--
>View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5126020.html
>
>Sent from the Xen - Dev mailing list archive at Nabble.com.
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@lists.xensource.com
>http://lists.xensource.com/xen-devel
>

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

[-- Attachment #1.2: Type: text/html, Size: 3592 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] 102+ messages in thread

* Re : Re : Patches for VGA-Passthrough XEN 4.2 unstable
  2012-01-06 16:58               ` Re : " David TECHER
@ 2012-01-06 17:00                 ` David TECHER
  0 siblings, 0 replies; 102+ messages in thread
From: David TECHER @ 2012-01-06 17:00 UTC (permalink / raw)
  To: -+= Lta =+-, n4rC0t1C; +Cc: xen-devel


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

Sorry I found it. The title was different.

I will have a look

Thanks



________________________________
 De : David TECHER <davidtecher@yahoo.fr>
À : -+= Lta =+- <lta@akr.fm>; n4rC0t1C <shandivo@gmail.com> 
Cc : "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com> 
Envoyé le : Vendredi 6 Janvier 2012 17h58
Objet : Re : [Xen-devel] Re : Patches for VGA-Passthrough XEN 4.2 unstable
 

Interested too.

I did a search on my inbox found nothing even in the incoming mails you sent



________________________________
 De : -+= Lta =+- <lta@akr.fm>
À : n4rC0t1C <shandivo@gmail.com> 
Cc : xen-devel@lists.xensource.com 
Envoyé le : Vendredi 6 Janvier 2012 17h51
Objet : Re: [Xen-devel] Re : Patches for VGA-Passthrough XEN 4.2 unstable
 




On Fri, Jan 6, 2012 at 5:34 PM, n4rC0t1C <shandivo@gmail.com> wrote:


>-+= Lta =+- wrote
>
>>
>> Hello,
>>
>> I've just posted on the list my setup of a working win7 domu with an
>> nvidia
>> card. You might wanna have a look.
>>
>> --
>> Lta
>>
>> On Fri, Jan 6, 2012 at 3:23 PM, David TECHER &lt;davidtecher@&gt; wrote:
>>
>>
>
>Sorry, where? Dind't find the post. REALLY interested.
>


Hi,


I must have sent him from the wrong address so the list refused it. I've resent it with the right one, it should be in your inbox somewhere

Regards,
Lta
 

>--
>View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5126020.html
>
>Sent from the Xen - Dev mailing list archive at Nabble.com.
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@lists.xensource.com
>http://lists.xensource.com/xen-devel
>

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

[-- Attachment #1.2: Type: text/html, Size: 4820 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] 102+ messages in thread

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2011-12-14  9:43                                                                                         ` Tobias Geiger
  2011-12-14 13:37                                                                                           ` n4rC0t1C
@ 2012-02-16 13:38                                                                                           ` Jamesffs
  2012-02-17  8:34                                                                                             ` Tobias Geiger
  1 sibling, 1 reply; 102+ messages in thread
From: Jamesffs @ 2012-02-16 13:38 UTC (permalink / raw)
  To: xen-devel

Hello, I'm trying vga-passthrough with an nVIDIA card.
I am at the end of the way, I have applied the patches without problems. I
have configured my winxp DomU as follow:

kernel = '/usr/lib/xen/boot/hvmloader'
builder = 'hvm'
memory = '512'
device_model='/usr/lib/xen/bin/qemu-dm'

#Number of CPU’s
vcpus = 1	

# Disks
disk = [ 'file:/xen/domains/win01/disk.img,ioemu:hda,w',
'file:/home/WindowsXP-SP2/image.iso,ioemu:hdc:cdrom,r' ]

# Hostname
name = 'win01'

# Networking
vif = ['type=ioemu, bridge=xenbr0']

#Passthrough
*gfx_passthru=1
pci  = [ '01:00.0' ]*

boot='cd'
*vnc=1
vncviewer=1*
acpi = 1
sdl=0
serial='pty'
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'

I have read that it is not possible to use VNC if I passed-through-VGA Card,
as Tobias says here:



Tobias Geiger wrote
> 
> Hi Sythrar,
> 
> you can't see the output of the passed-through-VGA Card in VNC. At least
> not 
> in the qemu-vnc server; The output to that emulated (Cirrus?) Card stops
> as 
> soon as  the Driver for the passed-through-VGA Card is loaded within the
> DomU.
> From that moment on the you can only see the output on a Monitor attached
> to 
> the passed-through-VGA Card. VNC is of course possible with the DomU 
> facilities, i.e. install a VNC Server within DomU and attach a vncviewer
> to it 
> - but its not really practical regarding 3D- or Movie Output (at least not 
> without optimizations to the VNC Server/Client)
> 
> Greetings
> Tobias
> 

So I have two probems, 
I don't know how to attach a Monitor to the passed-through-VGA Card,
how can I do this in the cfg file?
Should I use another option to disable the cirrus emulated card in the cfg
file?

Could anyone with an nVIDIA card passed-throughed post his config file here? 
Thanks you very much to everyone in advance

James.


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5489530.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

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

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2012-02-16 13:38                                                                                           ` Jamesffs
@ 2012-02-17  8:34                                                                                             ` Tobias Geiger
  2012-02-17 11:32                                                                                               ` Jamesffs
  0 siblings, 1 reply; 102+ messages in thread
From: Tobias Geiger @ 2012-02-17  8:34 UTC (permalink / raw)
  To: xen-devel

Hi James 

You can either remove the "pci =  [ '01:00.0' ]" (btw what are the * in your 
config?!) until you are ready to install the Driver for the passed through 
card, or you can fiddle around with gfx_passthru=1/0 , 0 meaning the pci-card 
will be there as a secondary card within domU, 1 meaning the cirrus gets 
disabled and the pci-card passed through will be the only card within domu. 

Personaly i prefer the first one.

Greetings
Tobias

P.S.: This usage question would better suit to xen-users, but...

Am Donnerstag, 16. Februar 2012, 14:38:57 schrieb Jamesffs:
> Hello, I'm trying vga-passthrough with an nVIDIA card.
> I am at the end of the way, I have applied the patches without problems. I
> have configured my winxp DomU as follow:
> 
> kernel = '/usr/lib/xen/boot/hvmloader'
> builder = 'hvm'
> memory = '512'
> device_model='/usr/lib/xen/bin/qemu-dm'
> 
> #Number of CPU’s
> vcpus = 1
> 
> # Disks
> disk = [ 'file:/xen/domains/win01/disk.img,ioemu:hda,w',
> 'file:/home/WindowsXP-SP2/image.iso,ioemu:hdc:cdrom,r' ]
> 
> # Hostname
> name = 'win01'
> 
> # Networking
> vif = ['type=ioemu, bridge=xenbr0']
> 
> #Passthrough
> *gfx_passthru=1
> pci  = [ '01:00.0' ]*
> 
> boot='cd'
> *vnc=1
> vncviewer=1*
> acpi = 1
> sdl=0
> serial='pty'
> on_poweroff = 'destroy'
> on_reboot = 'restart'
> on_crash = 'restart'
> 
> I have read that it is not possible to use VNC if I passed-through-VGA
> Card, as Tobias says here:
> 
> 
> 
> Tobias Geiger wrote
> 
> > Hi Sythrar,
> > 
> > you can't see the output of the passed-through-VGA Card in VNC. At least
> > not
> > in the qemu-vnc server; The output to that emulated (Cirrus?) Card stops
> > as
> > soon as  the Driver for the passed-through-VGA Card is loaded within the
> > DomU.
> > From that moment on the you can only see the output on a Monitor attached
> > to
> > the passed-through-VGA Card. VNC is of course possible with the DomU
> > facilities, i.e. install a VNC Server within DomU and attach a vncviewer
> > to it
> > - but its not really practical regarding 3D- or Movie Output (at least
> > not without optimizations to the VNC Server/Client)
> > 
> > Greetings
> > Tobias
> 
> So I have two probems,
> I don't know how to attach a Monitor to the passed-through-VGA Card,
> how can I do this in the cfg file?
> Should I use another option to disable the cirrus emulated card in the cfg
> file?
> 
> Could anyone with an nVIDIA card passed-throughed post his config file
> here? Thanks you very much to everyone in advance
> 
> James.
> 
> 
> --
> View this message in context:
> http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unsta
> ble-tp4406265p5489530.html Sent from the Xen - Dev mailing list archive at
> Nabble.com.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel


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

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

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2012-02-17  8:34                                                                                             ` Tobias Geiger
@ 2012-02-17 11:32                                                                                               ` Jamesffs
  2012-02-17 16:19                                                                                                 ` Tobias Geiger
  0 siblings, 1 reply; 102+ messages in thread
From: Jamesffs @ 2012-02-17 11:32 UTC (permalink / raw)
  To: xen-devel

Hi Tobias, thank you for the answer.

The * on my cfg appear because I used bold letter there.(They dont exists on
my real cfg)

In order to install the driver I need to see the graphic card in my Windows
DomU, so I must passed through the card first right? 
So I used the options 'pci =  [ '01:00.0' ]' and 'gfx_passthru=1' to
passthru the card, but when I do this (after bind the device with pci-stub)
I just can see (through VNC) a screen with qemu console and after a while
the DomU crash. When u said before that it is not possible to see the DomU
with VNC I thought that I should use a monitor attached to the graphic card
but Im not sure how to do that.

Anyway Im start thinking that the DomU crash is due to VT-d is not enabled
properly, after using the parameter iommu=1 i have the following output in
xl dmesg:

(XEN) I/O virtualisation enabled
.
.
(XEN) Intel VT-d Snoop Control not enabled.
(XEN) Intel VT-d Dom0 DMA Passthrough not enabled.
(XEN) Intel VT-d Queued Invalidation not enabled.
(XEN) Intel VT-d Interrupt Remapping not enabled. 
(XEN) Intel VT-d Shared EPT table not enabled.

So maybe the problem is there... 

Well thank you for your help


--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5492208.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2012-02-17 11:32                                                                                               ` Jamesffs
@ 2012-02-17 16:19                                                                                                 ` Tobias Geiger
  2012-02-20 11:55                                                                                                   ` Jamesffs
  0 siblings, 1 reply; 102+ messages in thread
From: Tobias Geiger @ 2012-02-17 16:19 UTC (permalink / raw)
  To: Jamesffs; +Cc: xen-devel

Hi James,

ah ok - somehow my client didnt display anything in bold, therefore my 
irritation :)

But i'm nearly equally irritated by your Problem(description)...

1st, for reference, here is my xl dmesg output regarding iommu:

(XEN) Intel VT-d Snoop Control not enabled.
(XEN) Intel VT-d Dom0 DMA Passthrough not enabled.
(XEN) Intel VT-d Queued Invalidation enabled.
(XEN) Intel VT-d Interrupt Remapping enabled.
(XEN) Intel VT-d Shared EPT tables not enabled.
(XEN) I/O virtualisation enabled

Yours indicates a few more "not enabled" features, but iirc the only 
important one here is the last "I/O virtualisation enabled", but dont 
nail me down on that;
Is "01:00.0" the output of "xl pci-list-assignable-devices" ? if not, 
you have a config/hardware problem you need to solve first.

lets assume your hardware is capable and your xen is conf'ed correct 
(xen cmdline and dom0-kernel cmdline regarding pcipassthrough and iommu) 
then:

after you installed your domu os (i assume here its windows), with 
gfx_passthrough=0 (so that the cirrus-card gets used as primary within 
domu), you should see within the qemu-vnc on localhost:5900 (or 
whereever it listens according to your domu-config), 2 Graphics-devices: 
one cirrus, working "normaly" and one representing your passed-through 
card, which is disabled because no device driver is loaded for it.
 From here on you should be able to normaly install the driver for the 
card (nvidia/ati-catalyst installer...), and after a reboot, the card 
should get initialized and bring a picture to the physically connected 
monitor of the passedtrough card.
After all that you can set gfx_passthrough=1 for the pure cosmetic 
reason that the cirrus card gets removed from the devicemanager (and you 
therefore only see the qemu-command-console when you vnc to 
localhost:5900) - but its not necessary at all.

Good luck!
Greetings
Tobias

Am 17.02.2012 12:32, schrieb Jamesffs:
> Hi Tobias, thank you for the answer.
>
> The * on my cfg appear because I used bold letter there.(They dont exists on
> my real cfg)
>
> In order to install the driver I need to see the graphic card in my Windows
> DomU, so I must passed through the card first right?
> So I used the options 'pci =  [ '01:00.0' ]' and 'gfx_passthru=1' to
> passthru the card, but when I do this (after bind the device with pci-stub)
> I just can see (through VNC) a screen with qemu console and after a while
> the DomU crash. When u said before that it is not possible to see the DomU
> with VNC I thought that I should use a monitor attached to the graphic card
> but Im not sure how to do that.
>
> Anyway Im start thinking that the DomU crash is due to VT-d is not enabled
> properly, after using the parameter iommu=1 i have the following output in
> xl dmesg:
>
> (XEN) I/O virtualisation enabled
> .
> .
> (XEN) Intel VT-d Snoop Control not enabled.
> (XEN) Intel VT-d Dom0 DMA Passthrough not enabled.
> (XEN) Intel VT-d Queued Invalidation not enabled.
> (XEN) Intel VT-d Interrupt Remapping not enabled.
> (XEN) Intel VT-d Shared EPT table not enabled.
>
> So maybe the problem is there...
>
> Well thank you for your help
>
>
> --
> View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5492208.html
> Sent from the Xen - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2012-02-17 16:19                                                                                                 ` Tobias Geiger
@ 2012-02-20 11:55                                                                                                   ` Jamesffs
  2012-02-20 12:16                                                                                                     ` Jamesffs
  0 siblings, 1 reply; 102+ messages in thread
From: Jamesffs @ 2012-02-20 11:55 UTC (permalink / raw)
  To: xen-devel

Hi again,
Let's assume that "I/O virtualisation enabled" is the only required VT-d
option.

After using pci-stub for seize the graphic card I can see that it is
available in the assignable devices:
  root@debian:~# xm pci-list-assignable-devices
  0000:01:00.0
  0000:01:00.1
I can see it in Dom0 too:
  root@debian:~# lspci | grep nVidia
  01:00.0 VGA compatible controller: nVidia Corporation GF104 [GeForce GTX
460] (rev a1)
  01:00.1 Audio device: nVidia Corporation GF104 High Definition Audio
Controller (rev a1)
So now the nvidia card (which I understand that has an audio part too) can
be assigned to the Windows guest.
I use the following config file:
root@debian:~# cat /etc/xen/win01.cfg
  kernel = "/usr/lib/xen/boot/hvmloader"
  builder='hvm'
  vcpus = 1
  name = "winXP"
  #vif = [ 'type=ioemu, bridge=xenbr0' ]
  #viridian = 1
  gfx_passthru=0
  #pci=['01:00.0']
  pci = [ '01:00.0', '01:00.1' ]
  monitor=1
  acpi = 1
  apic = 1
  pae = 1
  disk = [ 'file:/home/xen/domains/win01/disk.img,ioemu:hda,w',
'file:/home/javier/winxpSP3.iso,hdc:cdrom,r' ]
  device_model = "/usr/lib/xen/bin/qemu-dm"
  boot="c"
  sdl=0
  vnc=1
  vncconsole=1
 #vncpasswd=''
  serial='pty'
  usbdevice='tablet'
  on_poweroff='destroy'
  on_reboot='destroy'
  on_crash='restart'

I create the guest using another PC with ssh conection (putty) because when
I create the guest the host screen goes black due to the graphic card is not
owned by Dom0 anymore. 
Well, the error appear here and the guest is not started:
  root@debian:~# xm create win01.cfg
  Using config file "/etc/xen/win01.cfg".
  Error: Timed out waiting for device model action

Just to be sure, I think my Dom0 kernel is well configured:

  root@debian:~# cat /boot/config-2.6.32.45 | grep XEN
  CONFIG_XEN=y
  CONFIG_XEN_PVHVM=y
  CONFIG_XEN_MAX_DOMAIN_MEMORY=128
  CONFIG_XEN_SAVE_RESTORE=y
  CONFIG_XEN_DEBUG_FS=y
  CONFIG_SWIOTLB_XEN=y
  CONFIG_MICROCODE_XEN=y
  CONFIG_XEN_DOM0=y
  CONFIG_XEN_PRIVILEGED_GUEST=y
  CONFIG_XEN_DOM0_PCI=y
  CONFIG_XEN_PCI_PASSTHROUGH=y
  CONFIG_PCI_XEN=y
  CONFIG_XEN_PCIDEV_FRONTEND=y
  CONFIG_XEN_BLKDEV_FRONTEND=y
  CONFIG_NETXEN_NIC=m
  CONFIG_XEN_NETDEV_FRONTEND=m
  CONFIG_XEN_KBDDEV_FRONTEND=y
  CONFIG_HVC_XEN=y
  CONFIG_XEN_WDT=y
  CONFIG_XEN_FBDEV_FRONTEND=y
  CONFIG_XEN_BALLOON=y
  CONFIG_XEN_SCRUB_PAGES=y
  CONFIG_XEN_DEV_EVTCHN=y
  CONFIG_XEN_BACKEND=y
  CONFIG_XEN_NETDEV_BACKEND=y
  CONFIG_XEN_BLKDEV_BACKEND=y
  CONFIG_XEN_BLKDEV_TAP=m
  CONFIG_XEN_BLKBACK_PAGEMAP=y
  CONFIG_XEN_PCIDEV_BACKEND=y
  # CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set
  CONFIG_XEN_PCIDEV_BACKEND_PASS=y
  # CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
  # CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER is not set
  # CONFIG_XEN_PCIDEV_BE_DEBUG is not set
  CONFIG_XENFS=y
  CONFIG_XEN_COMPAT_XENFS=y
  CONFIG_XEN_SYS_HYPERVISOR=y
  CONFIG_XEN_XENBUS_FRONTEND=y
  CONFIG_XEN_GNTDEV=y
  CONFIG_XEN_S3=y
  CONFIG_ACPI_PROCESSOR_XEN=m
  CONFIG_XEN_PLATFORM_PCI=y
  
I can create the guest removing the pci=[] line from the win01.cfg file:
  root@debian:~# xm create win01.cfg
  Using config file "/etc/xen/win01.cfg".
  Started domain winXP (id=7)
If I try to attach the graphic card in warm mode (The guest is already
started) then I see the same error:
  root@debian:~# xm pci-attach 7 01:00.0
  Error: Timed out waiting for device model action
  Usage: xm pci-attach [-o|--options=<opt>] <Domain> <domain:bus:slot.func>
[virtual slot]
  Insert a new pass-through pci device.

That's all, sorry for the long post, I just want to provide enough
information, thank you again for your time.

James

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5498806.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2012-02-20 11:55                                                                                                   ` Jamesffs
@ 2012-02-20 12:16                                                                                                     ` Jamesffs
  2012-02-20 13:32                                                                                                       ` Tobias Geiger
  0 siblings, 1 reply; 102+ messages in thread
From: Jamesffs @ 2012-02-20 12:16 UTC (permalink / raw)
  To: xen-devel

I forgot to mention that only using gfx_passthru=0 option (and not
pci=[01:00.0])and with the output pci-list-assignable-devices showing the
graphic card, I cannot see the card on Windows Guest so If i try to install
the nVidia driver it reports that there isn't any compatible hardware.

--
View this message in context: http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unstable-tp4406265p5498848.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: Re : Re : Re : Re : Re : Re : Re : Re: Patches for VGA-Passthrough XEN 4.2 unstable
  2012-02-20 12:16                                                                                                     ` Jamesffs
@ 2012-02-20 13:32                                                                                                       ` Tobias Geiger
  0 siblings, 0 replies; 102+ messages in thread
From: Tobias Geiger @ 2012-02-20 13:32 UTC (permalink / raw)
  To: xen-devel; +Cc: Jamesffs

Seems to me youre trying to passthrough your primary card of dom0 - i have no 
experience with that at all, may well be this is not possible. i only pass 
through non-primary cards...
even if it is possible - with nvidia you normaly need manual corrections, 
meaning you can't pass it through withough modifications to the xen source (see 
david techers blog/homepage).

Greetings!
Tobias

Am Montag, 20. Februar 2012, 13:16:19 schrieb Jamesffs:
> I forgot to mention that only using gfx_passthru=0 option (and not
> pci=[01:00.0])and with the output pci-list-assignable-devices showing the
> graphic card, I cannot see the card on Windows Guest so If i try to install
> the nVidia driver it reports that there isn't any compatible hardware.
> 
> --
> View this message in context:
> http://xen.1045712.n5.nabble.com/Patches-for-VGA-Passthrough-XEN-4-2-unsta
> ble-tp4406265p5498848.html Sent from the Xen - Dev mailing list archive at
> Nabble.com.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

end of thread, other threads:[~2012-02-20 13:32 UTC | newest]

Thread overview: 102+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-18 11:47 Patches for VGA-Passthrough XEN 4.2 unstable JavMV
2011-05-23 10:48 ` Stefano Stabellini
2011-05-23 12:35   ` Pasi Kärkkäinen
2011-05-23 12:49     ` Pavel Mateja
2011-05-30 10:53       ` JavMV
2011-05-31 12:10         ` JavMV
2011-06-23 19:18           ` JavMV
2011-06-27 15:33             ` Konrad Rzeszutek Wilk
2011-06-27 15:42               ` JavMV
     [not found] ` <1312297850948-4659036.post@n5.nabble.com>
2011-08-30 10:21   ` komkon555
2011-08-30 13:55     ` JavMV
2011-08-30 15:00       ` komkon555
2011-08-30 16:06         ` JavMV
2011-08-31  8:16           ` komkon555
2011-08-31  8:38             ` Pasi Kärkkäinen
2011-08-31  8:49               ` komkon555
2011-08-31 12:56                 ` komkon555
2011-08-31 15:19                   ` Pasi Kärkkäinen
2011-09-05 14:02                     ` David TECHER
2011-09-06 11:57                       ` komkon555
2011-09-06 21:17                         ` Re : " David TECHER
2011-09-07  8:05                           ` komkon555
2011-09-07  9:45                             ` David TECHER
2011-09-07  9:52                             ` Re : " David TECHER
2011-09-07 12:26                               ` komkon555
2011-09-07 12:51                                 ` Re : " David TECHER
2011-09-07 18:52                                   ` Konrad Rzeszutek Wilk
2011-09-07 19:57                                     ` Re : " David TECHER
2011-09-09  1:45                                   ` Weidong Han
2011-09-09  8:07                                     ` komkon555
2011-09-07 13:25                                 ` komkon555
2011-09-07 13:54                                   ` JavMV
2011-09-07 14:22                                     ` Re : " David TECHER
2011-09-07 14:32                                       ` komkon555
2011-09-07 15:22                                         ` JavMV
2011-09-07 16:21                                           ` komkon555
2011-09-07 16:25                                           ` Re : " David TECHER
2011-09-09  7:54                                           ` komkon555
2011-09-09 12:29                                             ` JavMV
2011-09-09 13:28                                             ` Pasi Kärkkäinen
2011-09-09 16:09                                               ` Wei Huang
2011-09-09 19:56                                             ` Re : " David TECHER
2011-09-10 10:27                                               ` Pasi Kärkkäinen
2011-09-21 13:44                                         ` JavMV
2011-09-21 13:56                                           ` komkon555
2011-09-21 14:08                                             ` JavMV
2011-09-21 14:24                                               ` JavMV
2011-09-21 14:32                                               ` komkon555
2011-09-21 14:40                                                 ` komkon555
2011-09-21 14:47                                                   ` komkon555
2011-09-21 14:52                                                     ` JavMV
2011-09-21 15:13                                                       ` Re : " David TECHER
2011-09-22 12:15                                                         ` JavMV
2011-09-22 12:45                                                           ` komkon555
2011-09-22 12:55                                                             ` JavMV
2011-09-22 17:41                                                               ` JavMV
2011-09-22 18:27                                                           ` Pasi Kärkkäinen
2011-09-22 21:54                                                             ` JavMV
2011-09-23 11:34                                                               ` JavMV
2011-09-23 14:00                                                                 ` JavMV
2011-09-23 14:52                                                                   ` JavMV
2011-09-23 15:12                                                                     ` komkon555
2011-09-23 17:21                                                                   ` Pasi Kärkkäinen
2011-10-15 10:00                                                                     ` David TECHER
2011-10-26 11:54                                                                       ` Zoltan Hubai
2011-10-26 13:35                                                                         ` Re : " David TECHER
2011-10-27  5:58                                                                           ` Zoltan Hubai
2011-10-27 10:14                                                                             ` Re : " David TECHER
2011-12-05 22:26                                                                               ` n4rC0t1C
2011-12-06 11:22                                                                                 ` Re : " David TECHER
2011-12-06 12:04                                                                                   ` n4rC0t1C
2011-12-06 13:57                                                                                     ` Re : " David TECHER
2011-12-06 15:19                                                                                       ` Tobias Geiger
2011-12-06 15:56                                                                                         ` Re : " David TECHER
2011-12-06 22:28                                                                                         ` David TECHER
2011-12-07 11:01                                                                                           ` n4rC0t1C
2011-12-07 11:44                                                                                           ` Tobias Geiger
2011-12-10  8:12                                                                                   ` Sythrar
2011-12-10 12:29                                                                                     ` n4rC0t1C
2011-12-13 21:03                                                                                       ` Sythrar
2011-12-14  9:43                                                                                         ` Tobias Geiger
2011-12-14 13:37                                                                                           ` n4rC0t1C
2012-02-16 13:38                                                                                           ` Jamesffs
2012-02-17  8:34                                                                                             ` Tobias Geiger
2012-02-17 11:32                                                                                               ` Jamesffs
2012-02-17 16:19                                                                                                 ` Tobias Geiger
2012-02-20 11:55                                                                                                   ` Jamesffs
2012-02-20 12:16                                                                                                     ` Jamesffs
2012-02-20 13:32                                                                                                       ` Tobias Geiger
2011-12-10 12:29                                                                                     ` n4rC0t1C
2011-09-09 11:31 ` Liwei
2011-09-09 16:17   ` Wei Huang
2011-09-09 16:42     ` Liwei
2011-09-12 12:49   ` Tobias Geiger
2012-01-05 23:15   ` romihs
2012-01-06  1:13     ` n4rC0t1C
2012-01-06 14:23       ` Re : " David TECHER
2012-01-06 16:22         ` -+= Lta =+-
2012-01-06 16:34           ` n4rC0t1C
2012-01-06 16:51             ` -+= Lta =+-
2012-01-06 16:58               ` Re : " David TECHER
2012-01-06 17:00                 ` David TECHER

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.