|
|
#1 | |
|
Registered User
Join Date: Feb 2006
Posts: 13
|
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; |
|
|
|
|
|
|
#2 | |
|
#!/?*
Join Date: Oct 2004
Posts: 662
|
THX!!!
![]() but, one little wish... can you _attach_ the patch instead of posting it? (sometimes these forums destroies/modifies important parts, and it's easier for textbrowsers (like lynx) to get the source). |
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Feb 2006
Posts: 13
|
here is the patch.
|
|
|
|
|
|
#4 | |
|
Linux addict...
Join Date: Jan 2004
Posts: 537
|
Does it work?
Last patch I saw did get the driver to compile but when the driver was actually used with xen enabled kernel, all hell broke lose. Cheers,
__________________
DEV: Intel S5520SC, 2xL5530, 12GB, 5x320GB, GTX470, F17/x86_64, U2711. SRV: Tyan Tempest i5400XT, 2xE5335, 8GB, 3x1.5TB, 9800GTX, F17/x86-64, 2408WFP. VCR: Gigabyte GA-M61PME-S2P, A64/5000X2, 2GB, 1x320GB, 8600GT, F17/x86-64. LAP: ASUS 1201N, A330, 2GB, 250GB, ION, F17/x86_64. |
|
|
|
|
|
|
#5 | |
|
#!/?*
Join Date: Oct 2004
Posts: 662
|
Quote:
|
|
|
|
|
|
|
#6 | |
|
Registered User
Join Date: Feb 2006
Posts: 13
|
attention: Dom0 kernel must export symbol xen_tlb_flush, Be sure that ARCH=xen can work.
Now I have run some 3D programs. |
|
|
|
|
|
|
#7 |
|
Linux addict...
Join Date: Jan 2004
Posts: 537
|
Baah! I should really work on my reading skills.
FC5 is just round the corner (Monday?) with Xen/x86_64 support. I'll give it a shot when it's out. Thanks.
__________________
DEV: Intel S5520SC, 2xL5530, 12GB, 5x320GB, GTX470, F17/x86_64, U2711. SRV: Tyan Tempest i5400XT, 2xE5335, 8GB, 3x1.5TB, 9800GTX, F17/x86-64, 2408WFP. VCR: Gigabyte GA-M61PME-S2P, A64/5000X2, 2GB, 1x320GB, 8600GT, F17/x86-64. LAP: ASUS 1201N, A330, 2GB, 250GB, ION, F17/x86_64. |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Aug 2003
Posts: 1,026
|
I am trying to get a mental picture of what you are trying to do...
Is the nvidia driver running as an isolated device driver in XEN, or are you running Linux in a XEN virtual machine and have the nvidia driver loaded in that vm? I am not (yet) a XEN user, I use VMware. I know how it is done there. When running another OS under VMware, the videocard is a "VMware emulated videocard", not the real nvidia, so I don't load the driver for it. The driver is in the host OS, which is Linux in my case. But there it is just used as part of the X server which displays the VMware window. But (I think) there is no 3D acceleration present in the VMware virtual machine, which would be tunneled through to the nvidia driver in the Linux host OS. Assuming you are using an isolated device driver, how are the VMs going to communicate with the driver? Is there a unified driver interface for accelerated 3D drivers? Or are you (for now) only using the 3D from the host OS? |
|
|
|
|
|
#9 | |
|
Registered User
Join Date: Feb 2006
Posts: 13
|
Xen is paravirtualization. So it needs to install nvidia driver into dom0 at least.
You can see Xen documents to get more infomation. Quote:
|
|
|
|
|
|
|
#10 | |
|
Registered User
Join Date: Jan 2004
Location: The Netherlands
Posts: 21
|
Quote:
A shame really, the nvidia driver currently doesn't support the onboard K8T800 Pro AGP bridge on my mobo. Overall performance with a normal non-hypervisor kernel was a bit better than on FC4 x86_64 fwiw.
__________________
Words! Nothing but sweet, sweet words that turn into bitter orange wax in my ears. |
|
|
|
|
|
|
#11 |
|
Linux addict...
Join Date: Jan 2004
Posts: 537
|
... Don't need no AGP... me on PCI-E (Dev machine in sig)
![]() The only problem I foresee, is vmware. I use it dialy. AFAIK vmware doesn't play well with Xen... Cheers,
__________________
DEV: Intel S5520SC, 2xL5530, 12GB, 5x320GB, GTX470, F17/x86_64, U2711. SRV: Tyan Tempest i5400XT, 2xE5335, 8GB, 3x1.5TB, 9800GTX, F17/x86-64, 2408WFP. VCR: Gigabyte GA-M61PME-S2P, A64/5000X2, 2GB, 1x320GB, 8600GT, F17/x86-64. LAP: ASUS 1201N, A330, 2GB, 250GB, ION, F17/x86_64. |
|
|
|
|
|
#12 | |
|
Registered User
Join Date: Aug 2003
Posts: 1,026
|
Quote:
This agent presumably is not the full nvidia driver but some thin layer that takes all the functioncalls a full driver can handle, and passes them trough XEN to the isolated driver. I wondered if full 3D acceleration is available in such an environment in current versions of XEN. But well, it will probably be some time before I can switch from VMware to XEN and probably I will learn enough in the meantime to answer this question myself. |
|
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help Installing NVIDIA Tesla M2070Q in Linux RHEL5 | Ferianto85 | NVIDIA Linux | 0 | 05-18-12 08:35 PM |
| Getting the proprietary nvidia driver to run with Debian 3.0 r0 (woody) | Katchina404 | NVIDIA Linux | 9 | 01-12-03 08:49 AM |
| nvidia + 2.4.19 gentoo = messed up | ulukay | NVIDIA Linux | 18 | 11-01-02 11:58 PM |
| Red Hat null(limbo beta 3), guide to install Nvidia Drivers | utiel | NVIDIA Linux | 21 | 09-30-02 05:32 PM |
| NVIDIA driver doesn't install successfully on RH 7.3 | Sunni | NVIDIA Linux | 3 | 08-28-02 02:30 PM |