Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 11-28-06, 01:21 PM   #13
klaartje
Registered User
 
Join Date: Nov 2006
Posts: 1
Smile Re: Unified Xen and real-time preemption patch for 1.0-9625

Thanks for your patching.

I used it on gentoo amd64 with xen 3.0.3. nvidia-drivers 9629.

xen beryl are all working now.

For any gentoo users reading this, you have to create some extra dirs.

I need to reload the patch after changing the kernel, so I share this lazy script:

#bin/bash!
mkdir -p /lib/modules/2.6.16.29-xen/kernel/drivers/video
cd /path/NVIDIA-Linux-x86_64-1.0-9629-pkg2/usr/src/nv
cp nvidia.ko /lib/modules/2.6.16.29-xen/kernel/drivers/video/
depmod -a 2.6.16.29-xen

Thanks again, and happy wobbling
klaartje is offline   Reply With Quote
Old 12-21-06, 10:33 AM   #14
aetherane
Registered User
 
Join Date: Dec 2006
Posts: 2
Default Re: Unified Xen and real-time preemption patch for 1.0-9625

Quote:
Originally Posted by mnencia
If you are a debian user, you can find an unofficial package for 1.0.9629 drivers with xen patch applied at

http://www.prato.linux.it/~mnencia/debian/nvidia

You can point your apt to:

deb http://www.prato.linux.it/~mnencia/debian nvidia/
deb-src http://www.prato.linux.it/~mnencia/debian nvidia/

I hope this is useful for someone...
What kernel is this for or does it not matter? - I'm using etch 2.6.18-3
aetherane is offline   Reply With Quote
Old 12-21-06, 03:19 PM   #15
Penguinfan
Fedora Core 6
 
Join Date: Oct 2006
Location: Brisbane
Posts: 6
Default Re: Unified Xen and real-time preemption patch for 1.0-9625

This patch for 9625 still seems to work with 1.0.9746.

However, the installer now does a test to see if you're running Xen and refuses to continue if you are :-/. Tried the expert mode and it didn't give an option to continue there either.

For the desperate here's what I did to get it going for now (your mileage may vary):
1) Extract and patch kernel with the xenrt patch
2) Boot into a non-xen environment and install the patched version (via NVIDIA-Linux-x86-1.0-9746-pkg1/nvidia-installer)
3) cd NVIDIA-Linux-x86-1.0-9746-pkg1/usr/src/nv (the stuff you extracted)
4) In the Makefile comment out (#) the line "@if ! $(CONFTEST) xen_sanity_check full_output; then exit 1; fi"
5) Build the kernel module and install it
Quote:
make SYSSRC=/usr/src/kernel/<insert kernel version> module
cp nvidia.ko /lib/modules/<insert kernel version>/kernel/drivers/video
depmod -a <insert kernel version>
Hopefully I didn't miss anything. I did try to run the regular installer under Xen before doing manual compilation, so it might be best to do that anyway in case it generated the Makefile.

I hope this doesn't indicate an nvidia don't care about Xen at all.

Thanks again to JaXXoN for the patch.

EDIT: My system is FC6, so if the source and module folders differ on your distribution you'll need to modify the commands above.
Penguinfan is offline   Reply With Quote
Old 12-21-06, 04:42 PM   #16
cloccc3
Registered User
 
Join Date: Feb 2005
Posts: 17
Default Re: Unified Xen and real-time preemption patch for 1.0-9625

Quote:
Originally Posted by Penguinfan
This patch for 9625 still seems to work with 1.0.9746.
amd64, gentoo distribution, sys-kernel/xen-sources-2.6.16.28-r1 :
Code:
WARNING: /lib/modules/2.6.16.28-xen/video/nvidia.ko needs unknown symbol xen_tlb_flush
cloccc3 is offline   Reply With Quote
Old 12-22-06, 12:40 AM   #17
Penguinfan
Fedora Core 6
 
Join Date: Oct 2006
Location: Brisbane
Posts: 6
Default Re: Unified Xen and real-time preemption patch for 1.0-9625

Ah well, it worked for me. I'm certainly no kernel hacker - I just commented out the line that seemed most suspect and it worked.

Has this machine gotten nvidia drivers to work in Dom0 before?
If not you may be missing a library or some kernel option the nvidia driver needs.

Hopefully someone more Gentooy can offer a suggestion.
Penguinfan is offline   Reply With Quote
Old 12-22-06, 07:41 AM   #18
cloccc3
Registered User
 
Join Date: Feb 2005
Posts: 17
Default Re: Unified Xen and real-time preemption patch for 1.0-9625

Quote:
Originally Posted by Penguinfan
Ah well, it worked for me.
Pay attention. I work on a amd64 environment, while you tried NVIDIA-Linux-x86-1.0-9746-pkg1.

That's may be an important difference.

The problem with xen_tlb_flush is well knew over the web.
Now, I need to understand why does the patch work just on x86 and if is there a patch for x86_64.
When I've found it, or when I'll sure the problem is in the distribution, I'll contact gentoo developers.
cloccc3 is offline   Reply With Quote
Old 12-22-06, 09:34 AM   #19
JaXXoN
Registered User
 
Join Date: Jul 2005
Location: Munich
Posts: 910
Default Re: Unified Xen and real-time preemption patch for 1.0-9625

Quote:
Originally Posted by cloccc3
Code:
WARNING: /lib/modules/2.6.16.28-xen/video/nvidia.ko needs unknown symbol xen_tlb_flush
Hi!

The situation is that xen_tlb_flush has been exported to modules
als GPL-only.

There are three solutions:

a) modify the export declaration for the symbol in question and
recompile the kernel. Be aware that this might have legal
implications, depending on in which country you are living in.

b) add the line MODULE_LICENSE("GPL"); to one of the C files
of the nvidia driver. Be aware that this might have legal
implications, depending on in which country you are living in.

c) Manually define the missing symbol entry. For details, check
http://www.nvnews.net/vbulletin/showthread.php?t=68703

regards

Bernhard
JaXXoN is offline   Reply With Quote
Old 12-22-06, 02:17 PM   #20
cloccc3
Registered User
 
Join Date: Feb 2005
Posts: 17
Default Re: Unified Xen and real-time preemption patch for 1.0-9625

Quote:
Originally Posted by JaXXoN
c) Manually define the missing symbol entry. For details, check
http://www.nvnews.net/vbulletin/showthread.php?t=68703
Thank's.
Hacking kernel is better then figthing against laws.
cloccc3 is offline   Reply With Quote

Old 02-07-07, 11:16 AM   #21
shutdown
Registered User
 
Join Date: Nov 2005
Posts: 45
Default Re: Unified Xen and real-time preemption patch for 1.0-9625

Is there still someone working on this patch? Sadly I am unable to find a patch for newer realtime-preempted kernels and even with this patch the nvidia driver fails to install on 2.6.20-rt3:

Code:
nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Wed Feb  7 15:55:00 2007

option status:
  license pre-accepted    : false
  update                  : false
  force update            : false
  expert                  : false
  uninstall               : false
  driver info             : false
  precompiled interfaces  : true
  no ncurses color        : false
  query latest version    : false
  OpenGL header files     : true
  no questions            : false
  silent                  : false
  no recursion            : false
  no backup               : false
  kernel module only      : true
  sanity                  : false
  add this kernel         : false
  no runlevel check       : false
  no network              : false
  no ABI note             : false
  no RPMs                 : false
  no kernel module        : false
  force SELinux           : default
  no X server check       : false
  force tls               : (not specified)
  force compat32 tls      : (not specified)
  X install prefix        : (not specified)
  X library install path  : (not specified)
  X module install path   : (not specified)
  OpenGL install prefix   : (not specified)
  OpenGL install libdir   : (not specified) 
  compat32 install chroot : (not specified)
  compat32 install prefix : (not specified)
  compat32 install libdir : (not specified)
  utility install prefix  : (not specified)
  utility install libdir  : (not specified)
  doc install prefix      : (not specified)
  kernel name             : (not specified)   
  kernel include path     : (not specified)
  kernel source path      : (not specified)
  kernel output path      : (not specified)
  kernel install path     : (not specified)
  proc mount point        : /proc
  ui                      : (not specified)
  tmpdir                  : /tmp
  ftp mirror              : ftp://download.nvidia.com
  RPM file list           : (not specified)

Using: nvidia-installer ncurses user interface
-> License accepted.
-> No precompiled kernel interface was found to match your kernel; would you li
   ke the installer to attempt to download a kernel interface for your kernel f
   rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: No)
-> No precompiled kernel interface was found to match your kernel; this means
   that the installer will need to compile a new kernel interface.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> Kernel source path: '/lib/modules/2.6.20-rt3-shutdown/source'
-> Kernel output path: '/lib/modules/2.6.20-rt3-shutdown/build'
-> Performing rivafb check.
-> Performing nvidiafb check.
-> Performing Xen check.
-> Cleaning kernel module build directory.
   executing: 'cd ./usr/src/nv; make clean'...
   rm -f -f nv.o nv-vm.o os-agp.o os-interface.o os-registry.o nv-i2c.o nv.o nv
   -vm.o os-agp.o os-interface.o os-registry.o nv-i2c.o nvidia.mod.o
   rm -f -f build-in.o nv-linux.o *.d .*.{cmd,flags}
   rm -f -f nvidia.{o,ko,mod.{o,c}} nv_compiler.h *~
   rm -f -f stprof stprof.o symtab.h Modules.symvers
   rm -f -rf .tmp_versions
[...]
   In file included from include/linux/sched.h:56,  
                    from include/linux/utsname.h:35,  
                    from /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr
   /src/nv/nv-linux.h:19,
                    from /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr
   /src/nv/nv.c:14:
   include/linux/nodemask.h: In function ‘__first_node’:
   include/linux/nodemask.h:229: warning: signed and unsigned type in condition
   al expression   
   include/linux/nodemask.h: In function ‘__next_node’:   
   include/linux/nodemask.h:235: warning: signed and unsigned type in condition
   al expression
   include/linux/nodemask.h: In function ‘__first_unset_node’:
   include/linux/nodemask.h:253: warning: signed and unsigned type in condition
   al expression
   In file included from include/asm/pci.h:92,
                    from include/linux/pci.h:736,
                    from /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr
   /src/nv/nv-linux.h:77,
                    from /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr
   /src/nv/nv.c:14:
   include/asm-generic/pci-dma-compat.h: In function ‘pci_map_page’:
   include/asm-generic/pci-dma-compat.h:49: warning: pointer of type ‘void *   
   XX used in arithmetic
   In file included from include/linux/compat.h:14,
                    from include/asm/mtrr.h:106,
                    from /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr
   /src/nv/nv-linux.h:106,
                    from /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr
   /src/nv/nv.c:14:
   include/asm/compat.h: In function ‘compat_alloc_user_space’:
   include/asm/compat.h:202: warning: pointer of type ‘void *’ used in arit
   hmetic
   /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr/src/nv/nv.c: At top l
   evel:
   /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr/src/nv/nv.c:128: warn
   ing: ‘kmem_cache_t’ is deprecated
   /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr/src/nv/nv.c: In funct
   ion ‘nv_kern_open’:
   /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr/src/nv/nv.c:1930: err
   or: ‘SA_INTERRUPT’ undeclared (first use in this function)
   /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr/src/nv/nv.c:1930: err
   or: (Each undeclared identifier is reported only once
   /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr/src/nv/nv.c:1930: err
   or: for each function it appears in.)
   /usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr/src/nv/nv.c:1930: err
   or: ‘SA_SHIRQ’ undeclared (first use in this function)
   make[4]: *** [/usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr/src/nv/
   nv.o] Error 1
   make[3]: *** [_module_/usr/src/modules/NVIDIA-Linux-x86_64-1.0-9746-pkg2/usr
   /src/nv] Error 2   
   make[2]: *** [modules] Error 2
   NVIDIA: left KBUILD.
   nvidia.ko failed to build!
   make[1]: *** [module] Error 1
   make: *** [module] Error 2
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed.  Please see the file
       '/var/log/nvidia-installer.log' for details.  You may find suggestions  
       on fixing installation problems in the README available on the Linux
       driver download page at www.nvidia.com.
The patch applied without any errors, but as you can easily see the driver module won't build.
Is there a new patch available or will anyone make a new patch?

Shutdown
shutdown is offline   Reply With Quote
Old 02-10-07, 09:07 AM   #22
shutdown
Registered User
 
Join Date: Nov 2005
Posts: 45
Default Re: Unified Xen and real-time preemption patch for 1.0-9625

You have to do some additional patching in nv.c:
Replace "SA_INTERRUPT | SA_SHIRQ" with "IRQF_DISABLED | IRQF_SHARED" and you can compile the nVidia driver.
Sadly the new -rt5 patch against 2.6.20 doesn't work on my system, it simply refuses to boot, the system seems to hang immediately, no messages are printed...
2.6.20-rt3 works perfectly, so I can wait for 2.6.20-rt6

Shutdown

Last edited by shutdown; 02-10-07 at 11:54 AM.
shutdown is offline   Reply With Quote
Old 02-10-07, 09:44 AM   #23
JaXXoN
Registered User
 
Join Date: Jul 2005
Location: Munich
Posts: 910
Default Re: Unified Xen and real-time preemption patch for 1.0-9625

Quote:
Originally Posted by shutdown
Replace "SA_INTERRUPT | SA_SHIRQ" with "IRQF_DISABLED | IRQF_SHARED"
So they finaly moved from "Signal Action" to "Interrupt Flags"? :-)

Quote:
Originally Posted by shutdown
Sadly the new -rt5 patch against 2.6.20 doesn't work on my system, it simply refuses to boot, the system seems to hang immediately, no messages are printed...
No messages at all? Did you tried using serial console?

regards

Bernhard
JaXXoN is offline   Reply With Quote
Old 02-10-07, 10:24 AM   #24
shutdown
Registered User
 
Join Date: Nov 2005
Posts: 45
Default Re: Unified Xen and real-time preemption patch for 1.0-9625

Quote:
Originally Posted by JaXXoN
So they finaly moved from "Signal Action" to "Interrupt Flags"? :-)
Actually I haven't figured it out myself, I got this information from a German Debian forum.
They knew that the interrupt flags have to be used instead of signal action, but actually they were not aware of the patch available from here. By combining the patch and the interrupt flags I was able to build a working nvidia driver module
And because I am not familiar with kernel hacking at all, I can't even tell what "Signal Action" or "Interrupt Flags" are used for or what's the difference...maybe you could give me a short overview of what we're talking about

Quote:
Originally Posted by JaXXoN
No messages at all? Did you tried using serial console?
No, I haven't. I was just too lazy to try anything but just booting the kernel image, and after I selected the new kernel image in the GRUB-menu, my monitor became black and nothing else happened. The hard drive of my computer did not make any sounds as well and so I concluded that the kernel did not work.
To be sure I even unpacked 2.6.20 again, patched and compiled it with the working config of 2.6.20-rt3 (from /proc/config.gz), but without success.
I hope -rt6 will be released some time next week, so I can give it a try.
If -rt6 won't work as well I'll try serial console (has to be enabled somewhere in the kernel config I think, haven't used that for quite long...).

Did you try 2.6.20-rt*?

Shutdown

Addition: I am running an AMD64 Debian Etch system, so 32 bit systems may behave different.

Addition2: According to http://kerneltrap.org/node/7699 Andrew Morton, maintainer of the -mm kernel tree, wants to have high-resolution-timers and dyntick merged in vanilla 2.6.21. Both patchsets are part of the -rt patches, so this will lead to less difference between vanilla and -rt and as a result better compatibility with the nvidia driver or other "external" kernel modules. (At least I hope so)

Addition3: If you want to try the -rt kernels with a working nvidia kernel module yourself, you can be lazy now - I created an all-in-one patch based on the patch from the first post in this topic by removing the offsets and adding the Interrupt Flags-Line.
Should work for 2.6.20 with Xen, but not tested.
See attachment, have fun
Attached Files
File Type: txt patch-nv-1.0-9746_realtime-preempt.txt (4.3 KB, 824 views)

Last edited by shutdown; 02-10-07 at 11:16 AM.
shutdown is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:41 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©1998 - 2014, nV News.