From: Yong LIU <yongliu@cs.uit.no>
To: xen-devel@lists.xensource.com
Subject: install nvidia drvier into Dom0 successfully
Date: Wed, 15 Mar 2006 12:46:44 +0100 [thread overview]
Message-ID: <4417FEA4.6070700@cs.uit.no> (raw)
I use xen-3.0-testing(downloaded with hg). My nvidia card is Quadro FX
3400. OS is
Rocks 4.0(i386). The version of Nvidia driver is 1.0.8178, patched with
01-22-2006 patch.
I can play 3D games now. Thank Jacob for help.
Yong
diff -Nur NVIDIA-Linux-x86-1.0-8178-pkg1/usr/src/nv/Makefile.kbuild
nv/Makefile.kbuild
--- NVIDIA-Linux-x86-1.0-8178-pkg1/usr/src/nv/Makefile.kbuild
2006-03-15 10:46:52.000000000 +0100
+++ nv/Makefile.kbuild 2006-03-15 12:18:16.000000000 +0100
@@ -262,7 +262,7 @@
# KBUILD build parameters.
#
-KBUILD_PARAMS += KBUILD_VERBOSE=1 -C $(KERNEL_SOURCES) SUBDIRS=$(PWD)
+KBUILD_PARAMS += KBUILD_VERBOSE=1 -C $(KERNEL_SOURCES) SUBDIRS=$(PWD)
ARCH=xen
#
# NVIDIA sanity checks.
diff -Nur NVIDIA-Linux-x86-1.0-8178-pkg1/usr/src/nv/nv.c nv/nv.c
--- NVIDIA-Linux-x86-1.0-8178-pkg1/usr/src/nv/nv.c 2006-03-15
10:46:52.000000000 +0100
+++ nv/nv.c 2006-03-15 11:06:11.000000000 +0100
@@ -8,7 +8,6 @@
* _NVRM_COPYRIGHT_END_
*/
-
#include "nv-misc.h"
#include "os-interface.h"
#include "nv-linux.h"
@@ -924,6 +923,10 @@
{
unsigned long pat1, pat2;
+#ifdef CONFIG_XEN
+ nv_pat_enabled=1;
+#endif
+
if (nv_pat_enabled)
return 1;
@@ -952,6 +955,10 @@
{
unsigned long pat1, pat2;
+#ifdef CONFIG_XEN
+ nv_pat_enabled=0;
+#endif
+
if (!nv_pat_enabled)
return;
@@ -2015,7 +2022,11 @@
return -ENXIO;
}
+#ifdef CONFIG_XEN
+ if (io_remap_page_range(vma, vma->vm_start,
+#else
if (NV_REMAP_PAGE_RANGE(vma->vm_start,
+#endif
NV_VMA_OFFSET(vma),
NV_VMA_SIZE(vma),
vma->vm_page_prot))
@@ -2039,8 +2050,11 @@
return -ENXIO;
}
}
-
+#ifdef CONFIG_XEN
+ if (io_remap_page_range(vma, vma->vm_start,
+#else
if (NV_REMAP_PAGE_RANGE(vma->vm_start,
+#endif
NV_VMA_OFFSET(vma),
NV_VMA_SIZE(vma),
vma->vm_page_prot))
@@ -2078,7 +2092,11 @@
NV_ATOMIC_INC(at->usage_count);
nv_up(nvl->at_lock);
+#ifdef CONFIG_XEN
+ if (io_remap_page_range(vma, vma->vm_start,
+#else
if (NV_REMAP_PAGE_RANGE(vma->vm_start,
+#endif
NV_VMA_OFFSET(vma),
NV_VMA_SIZE(vma),
vma->vm_page_prot))
diff -Nur NVIDIA-Linux-x86-1.0-8178-pkg1/usr/src/nv/nv-linux.h nv/nv-linux.h
--- NVIDIA-Linux-x86-1.0-8178-pkg1/usr/src/nv/nv-linux.h 2006-03-15
10:46:52.000000000 +0100
+++ nv/nv-linux.h 2006-03-15 10:58:08.000000000 +0100
@@ -202,9 +202,13 @@
* tiny, and the kernel panics when it is exhausted. try to warn the
user that
* they need to boost the size of their pool.
*/
+#ifdef CONFIG_XEN
+#undef CONFIG_SWIOTLB
+#else
#if defined(CONFIG_SWIOTLB)
#define NV_SWIOTLB 1
#endif
+#endif
/*
* early 2.6 kernels changed their swiotlb codepath, running into a
diff -Nur NVIDIA-Linux-x86-1.0-8178-pkg1/usr/src/nv/nv-vm.c nv/nv-vm.c
--- NVIDIA-Linux-x86-1.0-8178-pkg1/usr/src/nv/nv-vm.c 2006-03-15
10:46:52.000000000 +0100
+++ nv/nv-vm.c 2006-03-15 10:59:04.000000000 +0100
@@ -544,7 +544,11 @@
page_ptr = at->page_table[i];
page_ptr->phys_addr = phys_addr;
page_ptr->virt_addr = virt_addr;
+#ifdef CONFIG_XEN
+ page_ptr->dma_addr = phys_to_machine(page_ptr->phys_addr);
+#else
page_ptr->dma_addr = page_ptr->phys_addr;
+#endif
/* lock the page for dma purposes */
nv_lock_page(page_ptr);
diff -Nur NVIDIA-Linux-x86-1.0-8178-pkg1/usr/src/nv/os-agp.c nv/os-agp.c
--- NVIDIA-Linux-x86-1.0-8178-pkg1/usr/src/nv/os-agp.c 2005-12-15
01:57:35.000000000 +0100
+++ nv/os-agp.c 2006-03-15 10:59:15.000000000 +0100
@@ -303,7 +303,11 @@
page_ptr->phys_addr = (ptr->memory[i] & PAGE_MASK);
page_ptr->virt_addr = (unsigned long) __va(page_ptr->phys_addr);
+#ifdef CONFIG_XEN
+ page_ptr->dma_addr = phys_to_machine(page_ptr->phys_addr);
+#else
page_ptr->dma_addr = page_ptr->phys_addr;
+#endif
}
return RM_OK;
reply other threads:[~2006-03-15 11:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4417FEA4.6070700@cs.uit.no \
--to=yongliu@cs.uit.no \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.