Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] install nvidia drvier into Dom0 successfully

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] install nvidia drvier into Dom0 successfully
From: Yong LIU <yongliu@xxxxxxxxx>
Date: Wed, 15 Mar 2006 12:46:44 +0100
Delivery-date: Wed, 15 Mar 2006 11:48:07 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
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;


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] install nvidia drvier into Dom0 successfully, Yong LIU <=