pv_ops kernel and nvidia binary driver
A while ago Jeremy responded the same question.
Per Jeremy:- unmodified binary Nvidia driver would crash under Xen. Modified driver should in the pvops kernel.
It's also my major concern as well.
Boris
--- On Sun, 7/12/09, Michael Ralston <[email protected]> wrote:
From: Michael Ralston <[email protected]>
Subject: [Xen-users] pv_ops kernel and nvidia binary driver
To: [email protected]
Date: Sunday, July 12, 2009, 1:48 AM
Just wondering what it will take to get the nvidia binary driver working on a pv_ops kernel.
It makes it difficult to debug without the source to the nvidia driver, but I think it should be possible to get it to work without changing the binary driver. If the dom0 kernel had access to all the resources that a bare metal kernel did, then it should work right?
I'm using Jeremy's current master branch, and hypervisor 3.4.1-rc6 on Ubuntu 9.04 64 bit.
Attached is my kern.log and Xorg.0.log when I attempt to start Xorg. The screen goes blank and my monitor enters powersave mode, but I am able to run an xterm and it appears to connect to the X server. Also when the X server exits, it returns the console to a sane state.
I've also tried to get the nvidia driver to work with rebased suse kernel 2.6.29.6 and hypervisor 3.3 and 3.4. With that version kernel it blacks the screen. I can remote ssh in to my pc, but I can't reboot the pc. It needs a hard reset.
-- Michael
-----Inline Attachment Follows-----
_______________________________________________
Xen-users mailing list
[email protected]
http://lists.xensource.com/xen-users
_______________________________________________
Xen-users mailing list
[email protected]
http://lists.xensource.com/xen-users
Quoted 16 lines · Boris Derzhavets
A while ago Jeremy responded the same question.
Per Jeremy:- unmodified binary Nvidia driver would crash under Xen. Modified driver should in the pvops kernel.It's also my major concern as well.
Boris
--- On *Sun, 7/12/09, Michael Ralston /<[email protected]>/* wrote:
From: Michael Ralston <[email protected]>
Subject: [Xen-users]pv_opskernel and nvidia binary driver
To: [email protected]
Date: Sunday, July 12, 2009, 1:48 AM
Quoted 8 lines
Just wondering what it will take to get the nvidia binary driver working on a
pv_opskernel.It makes it difficult to debug without the source to the nvidia driver, but I think it should be possible to get it to work without changing the binary driver. If the dom0 kernel had access to all the resources that a bare metal kernel did, then it should work right?
The problem comes down to whether the nvidia driver assumes the kernel's (pseudo-)physical addresses are really machine physical or not. If it doesn't do the appropriate conversions between physical and machine addresses using the standard Linux DMA API (or similar), then it will end up misprogramming the hardware and reading/writing random memory. There's not a lot we can do about that if that happens within the binary part of the nvidia driver. If the binary code calls out to the source-available parts of the driver to do those conversions, then it would be possible to fix there.
There are other potential pitfalls the nvidia driver could be falling into, but that's the most likely.
J
Quoted 9 lines · Jeremy Fitzhardinge
The problem comes down to whether the nvidia driver assumes the kernel's (pseudo-)physical addresses are really machine physical or not. If it doesn't do the appropriate conversions between physical and machine addresses using the standard Linux DMA API (or similar), then it will end up misprogramming the hardware and reading/writing random memory. There's not a lot we can do about that if that happens within the binary part of the nvidia driver. If the binary code calls out to the source-available parts of the driver to do those conversions, then it would be possible to fix there.
I've been running the Nvidia driver on an old style Xen kernel for quite a while now so I guess it will be possible to make it work for pvops too. The glue layer contains:
/*
* Traditionally, CONFIG_XEN indicated that the target kernel was
* built exclusively for use under a Xen hypervisor, requiring
* modifications to or disabling of a variety of NVIDIA graphics
* driver code paths. As of the introduction of CONFIG_PARAVIRT
* and support for Xen hypervisors within the CONFIG_PARAVIRT_GUEST
* architecture, CONFIG_XEN merely indicates that the target
* kernel can run under a Xen hypervisor, but not that it will. *
* If CONFIG_XEN and CONFIG_PARAVIRT are defined, the old Xen
* specific code paths are disabled. If the target kernel executes
* stand-alone, the NVIDIA graphics driver will work fine. If the
* kernels executes under a Xen (or other) hypervisor, however, the
* NVIDIA graphics driver has no way of knowing and is unlikely
* to work correctly.
*/
#if defined(CONFIG_XEN) && !defined(CONFIG_PARAVIRT) #include <asm/maddr.h>
#include <xen/interface/memory.h>
#define NV_XEN_SUPPORT_OLD_STYLE_KERNEL
#endif
which suggests it doesn't currently work but I would guess that the issue could be fixed in the glue layer and the usages of NV_XEN_SUPPORT_OLD_STYLE_KERNEL will point towards the areas which need consideration, there aren't too many of them...
Ian.
Quoted 23 lines · Ian Campbell
Quoted 10 lines · Jeremy Fitzhardinge
The problem comes down to whether the nvidia driver assumes the kernel's (pseudo-)physical addresses are really machine physical or not. If it doesn't do the appropriate conversions between physical and machine addresses using the standard Linux DMA API (or similar), then it will end up misprogramming the hardware and reading/writing random memory. There's not a lot we can do about that if that happens within the binary part of the nvidia driver. If the binary code calls out to the source-available parts of the driver to do those conversions, then it would be possible to fix there.
I've been running the Nvidia driver on an old style Xen kernel for quite a while now so I guess it will be possible to make it work for pvops too. The glue layer contains:
/*
* Traditionally,CONFIG_XENindicated that the target kernel was
* built exclusively for use under a Xen hypervisor, requiring
* modifications to or disabling of a variety of NVIDIA graphics
* driver code paths. As of the introduction ofCONFIG_PARAVIRT
* and support for Xen hypervisors within theCONFIG_PARAVIRT_GUEST
* architecture,CONFIG_XENmerely indicates that the target
Quoted 9 lines
* kernel can run under a Xen hypervisor, but not that it will. *
* IfCONFIG_XENandCONFIG_PARAVIRTare defined, the old Xen
* specific code paths are disabled. If the target kernel executes
* stand-alone, the NVIDIA graphics driver will work fine. If the
* kernels executes under a Xen (or other) hypervisor, however, the
* NVIDIA graphics driver has no way of knowing and is unlikely
* to work correctly.
The whole point of pvops and the other changes is that they don't need to care whether its running under Xen. They must be going around the
standard APIs, and doing something special for the Xen case. Of
course, they can always use the xen_domain() predicates to make that code runtime conditional if they want to do it that way...
J