From: Boris Derzhavets Subject: Re: [Xen-devel] Re: pv_ops kernel and nvidia binary driver Date: Tue, 14 Jul 2009 13:57:05 -0700 (PDT) Message-ID: <603560.27474.qm@web56107.mail.re3.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2138418538==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-users-bounces@lists.xensource.com Errors-To: xen-users-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: Michael Ralston , xen-devel@lists.xensource.com, xen-users@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============2138418538== Content-Type: multipart/alternative; boundary="0-312907219-1247605025=:27474" --0-312907219-1247605025=:27474 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =A0 By running "sh NVIDIA-Linux-x86_64-185.18.14-pkg2.run -x" i was able to get some extraction in folder bellow. It's hard for me to dec= ide could it be patched similar schema in http://fluxcoil.net/doku.php/xen/= docs for xenified kernel or no.=20 =A0 Kernels 2.6.29.4 , 2.6.30.1 xenified via rebased patch set from Andy do contain patched driver for GeForce 8000 series . It just works fine. Nvidia driver extraction :- root@SeverUbuntuJaunty:/usr/src/NVIDIA-Linux-x86_64-185.18.14-pkg2# ls -CR .: LICENSE=A0 nvidia-installer=A0 pkg-history.txt=A0 usr ./usr: bin=A0 include=A0 lib=A0 lib32=A0 share=A0 src=A0 X11R6 ./usr/bin: makeself.sh=A0=A0=A0 nvidia-bug-report.sh=A0 nvidia-smi=A0=A0=A0=A0=A0 tls_= test mkprecompiled=A0 nvidia-settings=A0=A0=A0=A0=A0=A0 nvidia-xconfig=A0 tls_te= st_dso.so ./usr/include: cuda=A0 GL=A0 vdpau ./usr/include/cuda: cudaGL.h=A0 cuda.h ./usr/include/GL: glext.h=A0 gl.h=A0 glxext.h=A0 glx.h ./usr/include/vdpau: vdpau.h=A0 vdpau_x11.h ./usr/lib: libcuda.so.185.18.14=A0=A0=A0 libGL.so.185.18.14=A0=A0=A0=A0=A0=A0=A0=A0=A0= libvdpau_nvidia.so.185.18.14=A0 tls libGLcore.so.185.18.14=A0 libnvidia-cfg.so.185.18.14=A0 libvdpau.so.185.18.= 14 libGL.la=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 libnvidia-tls.so.185.= 18.14=A0 libvdpau_trace.so.185.18.14 ./usr/lib/tls: libnvidia-tls.so.185.18.14 ./usr/lib32: libcuda.so.185.18.14=A0=A0=A0 libGL.la=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 lib= nvidia-tls.so.185.18.14=A0=A0=A0 libvdpau.so.185.18.14=A0=A0=A0=A0=A0=A0=A0= tls libGLcore.so.185.18.14=A0 libGL.so.185.18.14=A0 libvdpau_nvidia.so.185.18.1= 4=A0 libvdpau_trace.so.185.18.14 ./usr/lib32/tls: libnvidia-tls.so.185.18.14 ./usr/share: applications=A0 doc=A0 man=A0 pixmaps ./usr/share/applications: nvidia-settings.desktop ./usr/src: nv ./usr/src/nv: conftest.sh=A0=A0 Makefile.kbuild=A0 nv.h=A0 nv-memdbg.h=A0 nvtypes.h=A0 os= -agp.h=A0=A0=A0 README=A0=A0 cpuopsys.h=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Makef= ile.nvidia=A0 nv-i2c.c=A0=A0=A0=A0 nv-misc.h=A0=A0 nv-vm.c=A0=A0=A0 os-inte= rface.c=A0 rmretval.h gcc-version-check.c=A0 nvacpi.c=A0=A0=A0=A0 nv-kernel= .o=A0 nvreadme.h=A0=A0 nv-vm.h=A0=A0=A0 os-interface.h makefile=A0=A0 nv.c=A0=A0 nv-linux.h=A0=A0 nv-reg.h=A0=A0=A0=A0 os-agp.c=A0= =A0 os-registry.c ./usr/X11R6: lib ./usr/X11R6/lib: libXvMCNVIDIA.a=A0 libXvMCNVIDIA.so.185.18.14=A0 modules ./usr/X11R6/lib/modules: drivers=A0 extensions=A0 libnvidia-wfb.so.185.18.14 ./usr/X11R6/lib/modules/drivers: nvidia_drv.so ./usr/X11R6/lib/modules/extensions: libglx.so.185.18.14 Boris. --- On Tue, 7/14/09, Jeremy Fitzhardinge wrote: From: Jeremy Fitzhardinge Subject: Re: [Xen-devel] Re: [Xen-users] pv_ops kernel and nvidia binary dr= iver To: "Boris Derzhavets" Cc: xen-users@lists.xensource.com, "Michael Ralston" , xen-devel@lists.xensource.com Date: Tuesday, July 14, 2009, 3:52 PM On 07/11/09 23:03, Boris Derzhavets wrote: > A while ago Jeremy responded the same question. > Per Jeremy:-=A0 unmodified binary Nvidia driver would crash under Xen. > Modified driver should in the pvops kernel. > > It's also my major concern as well. > > Boris > > --- On *Sun, 7/12/09, Michael Ralston //* wrote: > > >=A0 =A0=A0=A0From: Michael Ralston >=A0 =A0=A0=A0Subject: [Xen-users] pv_ops kernel and nvidia binary driver >=A0 =A0=A0=A0To: xen-users@lists.xensource.com >=A0 =A0=A0=A0Date: Sunday, July 12, 2009, 1:48 AM > >=A0 =A0=A0=A0Just wondering what it will take to get the nvidia binary dri= ver >=A0 =A0=A0=A0working on a pv_ops kernel. > >=A0 =A0=A0=A0It makes it difficult to debug without the source to the nvid= ia >=A0 =A0=A0=A0driver, but I think it should be possible to get it to work w= ithout >=A0 =A0=A0=A0changing the binary driver. If the dom0 kernel had access to = all the >=A0 =A0=A0=A0resources that a bare metal kernel did, then it should work r= ight? > The problem comes down to whether the nvidia driver assumes the kernel's (pseudo-)physical addresses are really machine physical or not.=A0 If it doesn't do the appropriate conversions between physical and machine addresses using the standard Linux DMA API (or similar), then it will end up misprogramming the hardware and reading/writing random memory.=20 There's not a lot we can do about that if that happens within the binary part of the nvidia driver.=A0 If the binary code calls out to the source-available parts of the driver to do those conversions, then it would be possible to fix there. There are other potential pitfalls the nvidia driver could be falling into, but that's the most likely. =A0 =A0 J =0A=0A=0A --0-312907219-1247605025=:27474 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
  By running "sh NVIDIA-Linux-x86_64-185= .18.14-pkg2.run -x"
i was able to get some extraction in folder bellow. = It's hard for me to decide could it be patched similar schema in http://flu= xcoil.net/doku.php/xen/docs
for xenified kernel or no.
  Kernel= s 2.6.29.4 , 2.6.30.1 xenified via rebased patch set from Andy
do contai= n patched driver for GeForce 8000 series . It just works fine.

Nvidi= a driver extraction :-

root@SeverUbuntuJaunty:/usr/src/NVIDIA-Linux-= x86_64-185.18.14-pkg2# ls -CR
.:
LICENSE  nvidia-installer = pkg-history.txt  usr

./usr:
bin  include  lib&nbs= p; lib32  share  src  X11R6

./usr/bin:
makeself.sh=     nvidia-bug-report.sh  nvidia-smi   &= nbsp;  tls_test
mkprecompiled  nvidia-settings       nvidia-xconfig  t= ls_test_dso.so

./usr/include:
cuda  GL  vdpau

./= usr/include/cuda:
cudaGL.h  cuda.h

./usr/include/GL:
glex= t.h  gl.h  glxext.h  glx.h

./usr/include/vdpau:
vd= pau.h  vdpau_x11.h

./usr/lib:
libcuda.so.185.18.14 &nbs= p;  libGL.so.185.18.14        =   libvdpau_nvidia.so.185.18.14  tls
libGLcore.so.185.18.14&nbs= p; libnvidia-cfg.so.185.18.14  libvdpau.so.185.18.14
libGL.la =             &nb= sp;  libnvidia-tls.so.185.18.14  libvdpau_trace.so.185.18.14
<= br>./usr/lib/tls:
libnvidia-tls.so.185.18.14

./usr/lib32:
libc= uda.so.185.18.14    libGL.la     &n= bsp;      libnvidia-tls.so.185.18.14    libvdpau.so.185.18.14 &n= bsp;      tls
libGLcore.so.185.18.14  libG= L.so.185.18.14  libvdpau_nvidia.so.185.18.14  libvdpau_trace.so.1= 85.18.14

./usr/lib32/tls:
libnvidia-tls.so.185.18.14

./usr= /share:
applications  doc  man  pixmaps

./usr/shar= e/applications:
nvidia-settings.desktop

./usr/src:
nv

.= /usr/src/nv:
conftest.sh   Makefile.kbuild  nv.h  nv= -memdbg.h  nvtypes.h  os-agp.h    README &nbs= p; cpuopsys.h           M= akefile.nvidia  nv-i2c.c     nv-misc.h  = nv-vm.c    os-interface.c  rmretval.h gcc-version-chec= k.c  nvacpi.c     nv-kernel.o  nvreadme.h&nbs= p;  nv-vm.h    os-interface.h
makefile   nv.c   nv-linux.h &n= bsp; nv-reg.h     os-agp.c   os-registry.c
./usr/X11R6:
lib

./usr/X11R6/lib:
libXvMCNVIDIA.a  l= ibXvMCNVIDIA.so.185.18.14  modules

./usr/X11R6/lib/modules:
= drivers  extensions  libnvidia-wfb.so.185.18.14

./usr/X11R= 6/lib/modules/drivers:
nvidia_drv.so

./usr/X11R6/lib/modules/exte= nsions:
libglx.so.185.18.14

Boris.

--- On Tue, 7/14/09,= Jeremy Fitzhardinge <jeremy@goop.org> wrote:

From: Jeremy Fitzhardinge <jeremy@goop.org>
Su= bject: Re: [Xen-devel] Re: [Xen-users] pv_ops kernel and nvidia binary driv= er
To: "Boris Derzhavets" <bderzhavets@yahoo.com>
Cc: xen-users= @lists.xensource.com, "Michael Ralston" <michael@ralston.id.au>, xen-devel@lists.xensource.com
Date: Tuesday, July 14, 2009, 3:52 PM
=
On 07/11/09 23:03, Boris Derzhavets wrote:
= > A while ago Jeremy responded the same question.
> Per Jeremy:-&n= bsp; unmodified binary Nvidia driver would crash under Xen.
> Modifie= d driver should in the pvops kernel.
>
> It's also my major con= cern as well.
>
> Boris
>
> --- On *Sun, 7/12/09, M= ichael Ralston /<michael@ralston.id.au>/* wrote:=
>
>
>     From: Michael Ralston <= michael@ralston.id.au>
>    &n= bsp;Subject: [Xen-users] pv_ops kernel and nvidia binary driver
>&nbs= p;    To: xen-users@lists.xe= nsource.com
>     Date: Sunday, July 12, 2009= , 1:48 AM
>
>     Just wondering what it wi= ll take to get the nvidia binary driver
>     wor= king on a pv_ops kernel.
>
>     It makes i= t difficult to debug without the source to the nvidia
>   &= nbsp; driver, but I think it should be possible to get it to work with= out
>     changing the binary driver. If the dom0= kernel had access to all the
>     resources tha= t a bare metal kernel did, then it should work right?
>

The pr= oblem comes down to whether the nvidia driver assumes the kernel's
(pseu= do-)physical addresses are really machine physical or not.  If it
d= oesn't do the appropriate conversions between physical and machine
addresses using the standard Linux DMA API (or similar), then i= t will
end up misprogramming the hardware and reading/writing random mem= ory.
There's not a lot we can do about that if that happens within the = binary
part of the nvidia driver.  If the binary code calls out to = the
source-available parts of the driver to do those conversions, then i= t
would be possible to fix there.

There are other potential pitfa= lls the nvidia driver could be falling
into, but that's the most likely.=

    J

=0A=0A = --0-312907219-1247605025=:27474-- --===============2138418538== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users --===============2138418538==--