nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   [PATCH] xen-3.0.2-2 and nv-1.0-8756 (http://www.nvnews.net/vbulletin/showthread.php?t=68648)

JaXXoN 04-17-06 09:57 PM

[PATCH] xen-3.0.2-2 and nv-1.0-8756
 
2 Attachment(s)
Hi!

I created a set of patches for xen-3.0.2-2 and nv-1.0-8756 based
on the patches/discussion at:

http://www.nvnews.net/vbulletin/showthread.php?t=66383

The patches have been successfully tested on Fedora Core 4
using an Athlon AMD64 X2 4400+ and two GeForce 7800GTX
graphics cards (triple head setup). However, i experienced a
small performance drop when running glxgears (~14000FPS
instead of (~16000FPS).

You may like to try the following instructions to get things going
on your system:


1. Create a working directory and put both nvidia xen patches into
the archive directory:
Code:

mkdir -p /usr/local/xen/archive
cp <path to patch>/patch-2.6-xen-sparse-nv /usr/local/xen/archive
cp <path to patch>/patch-nv-1.0-8756-xen-3.0.2-2 /usr/local/xen/archive

2. Download the xen source package and the vanilla linux kernel tree:
Code:

cd /usr/local/xen/archive
wget http://bits.xensource.com/Xen/latest/xen-3.0.2-src.tgz
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.16.tar.bz2
wget http://bits.xensource.com/Xen/latest/xen-3.0-x86_32-fc4.bin.tar

3. Prepare the xen0 kernel build:
Code:

cd /usr/local/xen
tar -xzf archive/xen-3.0.2-src.tgz
cd xen-3.0.2-2
ln -s ../archive/linux-2.6.16.tar.bz2 .

4. Patch the kernel sparse directory:
Code:

cd /usr/local/xen/xen-3.0.2-2/linux-2.6-xen-sparse
patch -p1 < /usr/local/xen/archive/patch-2.6-xen-sparse-nv

5. Build the xen0 kernel:
Code:

cd /usr/local/xen/xen-3.0.2-2
make kernels

6. Install the kernel, modules and related files:
Code:

cd /usr/local/xen/xen-3.0.2-2/linux-2.6.16-xen
cp vmlinuz /boot/vmlinuz-2.6.16-xen
cp System.map /boot/System.map-2.6.16-xen
cp .config /boot/config-2.6.16-xen
make modules_install
mkinitrd /boot/initrd-2.6.16-xen.img 2.6.16-xen

7. Create a menu option for the grub bootloader in /boot/grub/menu.lst:
Code:

title Xen 3.0 / XenLinux 2.6.16
      kernel /boot/xen-3.0.2-2.gz console=vga
      module /boot/vmlinuz-2.6.16-xen root=<root-dev> ro console=tty0
      module /boot/initrd-2.6.16-xen.img

8. Patch and compile the nvidia kernel module:
Code:

cd /usr/local/xen
cp -r <nvidia sources> nv-1.0-8756-xen-3.0.2-2
cd nv-1.0-8756-xen-3.0.2-2
patch -p1 < /usr/local/xen/archive/patch-nv-1.0-8756-xen-3.0.2-2
make clean
make SYSSRC=/usr/local/xen/xen-3.0.2-2/linux-2.6.16-xen module

9. Install the nvidia kernel module
Code:

cd /usr/local/xen/nv-1.0-8756-xen-3.0.2-2
mkdir -p /lib/modules/2.6.16-xen/kernel/drivers/video
cp nvidia.ko /lib/modules/2.6.16-xen/kernel/drivers/video
depmod -a 2.6.16-xen

10. Install the xen base and tools package:
Code:

yum install bridge-utils
cd /usr/local/xen
tar -xf /usr/local/xen/archive/xen-3.0-x86_32-fc4.bin.tar
cd xen-3.0-x86_32-fc4.bin
rpm -i xen-3.0.2.2-86.1_fc4.i386.rpm

Now reboot your system.


Feedback appreciated!

Bernhard

metagroboliser 04-17-06 11:22 PM

Re: [PATCH] xen-3.0.2-2 and nv-1.0-8756
 
Thanks for posting this mate! However, have you had a chance to try this using the prepackaged Xen kernel shipped w/ FC5? I'm having trouble getting vanilla 8756 to compile against FC5xen0 (see my thread here) ... is there a variant of your procedure I could try for FC5xen0?

cheers.

JaXXoN 04-18-06 08:07 AM

Re: [PATCH] xen-3.0.2-2 and nv-1.0-8756
 
Quote:

Originally Posted by metagroboliser
have you had a chance to try this using the prepackaged Xen kernel shipped w/ FC5?

The situation is the pre-packaged xen0 kernels typically do not export
some symbols required for the nvidia kernel module - so i didn't even tried ...

The instructions given above should also work for FC5, except
step 10 - you may try if the xen-3.0.1 tools provided by FC5 are
working. Otherwise, you need to install xen.gz and the tools from
the source package.

regards

Bernhard

JaXXoN 04-18-06 06:54 PM

Re: [PATCH] xen-3.0.2-2 and nv-1.0-8756
 
Quote:

Originally Posted by metagroboliser
have you had a chance to try this using the prepackaged Xen kernel shipped w/ FC5?

Please find nvidia kernel driver installation instruction for prepackaged Xen kernels at:

http://www.nvnews.net/vbulletin/showthread.php?t=68703

regards

Bernhard

eduthepenguin 04-30-06 06:57 PM

Re: [PATCH] xen-3.0.2-2 and nv-1.0-8756
 
Edit: Ok, I was a total n00b and didn't read the stickies first, sorry. I'm gonna try that first, and then come back to this.

Hi.

I'm fairly (ok, completely) new to Linux, and after installing the Fedora Core 5 distribution today, I've been trying my damndest to make my GeForce 4 Go 64mb card with it.

I've tried following these steps, but I got stuck once I hit step 6. Apparently there's no vmlinuz-2.6.16-xen file, so I can't go past it.

For some context:

Computer: HP Pavilion ZV5000
Distribution: Fedora Core 5
Video Adapter: GeForce 4 Go 64mb

I also never updated the distribution after installing, I dunno if that might have something to do with it.

Any tips?

Thanks in advance.

haveaniceday 08-13-06 07:45 AM

Re: [PATCH] xen-3.0.2-2 and nv-1.0-8756
 
Hi everybody,

I managed it to run nv-1.0-8756 with SuSE 10.1 and 2.6.16.21-0.13-xen and xen 3.0.2
(Method: http://www.nvnews.net/vbulletin/showthread.php?t=68703)

The NVIDIA driver is using the TLS-support. How can I avoid the following message:
Code:

NVRM: loading NVIDIA Linux x86 Kernel Module  1.0-8762  Mon May 15 13:06:38 PDT 2006
NVRM: builtin PAT support disabled, falling back to MTRRs.
agpgart: Found an AGP 3.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode
agpgart: SiS delay workaround: giving bridge time to recover.
agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode
  ***************************************************************
  ** WARNING: Currently emulating unsupported memory accesses  **
  **          in /lib/tls glibc libraries. The emulation is    **
  **          slow. To ensure full performance you should      **
  **          install a 'xen-friendly' (nosegneg) version of  **
  **          the library, or disable tls support by executing **
  **          the following as root:                          **
  **          mv /lib/tls /lib/tls.disabled                    **
  ** Offending process: X (pid=26855)                          **
  ***************************************************************
Continuing...
mtrr: reg: 2 has count=0

The X-Server is not starting if /usr/lib/tls is renamed to /usr/lib/tls.disabled
Code:

peedy:/usr/lib> ls -ld tls tls/*
drwxr-xr-x 2 root root 4096 2006-07-21 19:35 tls
lrwxrwxrwx 1 root root  25 2006-08-12 14:59 tls/libnvidia-tls.so.1 -> libnvidia-tls.so.1.0.8762
-rwxr-xr-x 1 root root 2324 2006-07-21 19:35 tls/libnvidia-tls.so.1.0.8762
peedy:/usr/lib>

I suppose the driver nv-1.0-8756 just runs with tls and there is no way to avoid
this for xen ?
Does FC5 use tls in combination with xen ?

Best regards,

Christian

JaXXoN 08-13-06 10:13 AM

Re: [PATCH] xen-3.0.2-2 and nv-1.0-8756
 
Quote:

Originally Posted by haveaniceday
I managed it to run nv-1.0-8756 with SuSE 10.1 and 2.6.16.21-0.13-xen and xen 3.0.2
(Method: http://www.nvnews.net/vbulletin/showthread.php?t=68703)

BTW.: recent FC5 xen kernels do not any more require to manually
link the nvidia kernel module - the symbols in question seem now
to be exported non-GPL. (but the source patch itself is still required).

Quote:

Originally Posted by haveaniceday
The NVIDIA driver is using the TLS-support. How can I avoid the following message:

IIRC i also get these messages, but X starts fine for me.
Could you please provide an nvidia bug report for details?

regards

Bernhard

haveaniceday 08-14-06 02:54 PM

Re: [PATCH] xen-3.0.2-2 and nv-1.0-8756
 
Quote:

Originally Posted by JaXXoN
Could you please provide an nvidia bug report for details?

Hi Bernhard,

I think an nvidia bug report is not required. The driver itself is working. I just
looked for a way to avoid the "TLS"

So there is no analysis required.

Best regards,

Christian

PS: A small script for the "SuSE 10.1" fans.
- boot the xen kernel
- run the commands below
- reboot
- use regular sax2-configuration

Code:

NVIDIA=NVIDIA-Linux-x86-1.0-8762-pkg1.run
KERNEL=2.6.16.21-0.13-xen
PATCH=patch-nv-1.0-8756-xen-3.0.2-2.txt

cd /usr/src
if [ ! -r $NVIDIA ]
then
        echo "Please put $NVIDIA to /usr/src/"
        exit 1
fi

if [ ! -r $PATCH ]
then
        echo "Please put patch $PATCH to /usr/src/"
        exit
fi

cd /usr/src/linux
make cloneconfig
make modules_prepare
cd ..

sh ./$NVIDIA -x

NVIDIADIR=$
cd /usr/src/${NVIDIA//.run}/usr/src/nv

patch -p1 < /usr/src/$PATCH
make clean
make SYSSRC=/usr/src/linux module

XEN_TLB_FLUSH=`grep [^_]xen_tlb_flush$ /boot/System.map-$KERNEL | colrm 9`
FORCE_EVTCHN_CALLBACK=`grep [^_]force_evtchn_callback$ /boot/System.map-$KERNEL | colrm 9`
XEN_FEATURES=`grep [^_]xen_features$ /boot/System.map-$KERNEL | colrm 9`
set -x
ld -m elf_i386 --defsym xen_tlb_flush=0x${XEN_TLB_FLUSH} --defsym xen_features=0x${XEN_FEATURES} --defsym force_evtchn_callback=0x${FORCE_EVTCHN_CALLBACK} -r -o nvidia.ko nvidia.o nvidia.mod.o
cp nvidia.ko /lib/modules/$KERNEL/kernel/drivers/video/nvidia.ko
depmod -a


JaXXoN 08-14-06 02:59 PM

Re: [PATCH] xen-3.0.2-2 and nv-1.0-8756
 
Quote:

Originally Posted by haveaniceday
I think an nvidia bug report is not required. The driver itself is working. I just
looked for a way to avoid the "TLS"

Sorry for the missanderstanding, what i meant is: disable TLS
(rename the directory), then start X (which will fail as far as
i understood) and generate the bug report.

regards

Bernhard

haveaniceday 08-14-06 04:06 PM

Re: [PATCH] xen-3.0.2-2 and nv-1.0-8756
 
4 Attachment(s)
The log just show an interrupt after GLX is loaded.

libglx.so.1.0.8762 is using libnvidia-tls.so.1 . So the only solution will be a
change from NVIDIA. May be they can offer a "tls-free" library for xen systems.

Best regards,

Christian

Amr_not_Amr 10-27-06 01:57 AM

Re: [PATCH] xen-3.0.2-2 and nv-1.0-8756
 
What about the new Xen 3.0.3?
Until now I couldn't find any way to get it work ..
I've nvidia Geforce 6600 , 256 MB ... running Xen 3.0.3 on ubuntu drapper ...
my monitor is Sony G220-R ..
Isn't there any way to get the X working correctly on it?
Won't the new driver which is still beta now be compatible with Xen?

Amr_not_Amr 10-27-06 03:56 AM

Re: [PATCH] xen-3.0.2-2 and nv-1.0-8756
 
I could get it work
http://www.nvnews.net/vbulletin/showthread.php?t=78632
:)


All times are GMT -5. The time now is 05:17 PM.

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