All of lore.kernel.org
 help / color / mirror / Atom feed
* install nvidia drvier into Dom0 successfully
@ 2006-03-15 11:46 Yong LIU
  0 siblings, 0 replies; only message in thread
From: Yong LIU @ 2006-03-15 11:46 UTC (permalink / raw)
  To: xen-devel

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-15 11:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-15 11:46 install nvidia drvier into Dom0 successfully Yong LIU

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.