View Single Post
Old 07-03-06, 12:40 PM   #23
JaXXoN
Registered User
 
Join Date: Jul 2005
Location: Munich
Posts: 910
Default Re: [PATCH] nv-1.0-8756 with Xen-3.0.1 on Fedora Core 5

Quote:
Originally Posted by logicmagic
You mention in your post that you got a card working in a domU as well as dom0. How much extra configuration did that take?
It's basically not much configuration effort for such a setup, except
you probably need to compile your own xen kernel(s), because
the "pci frontend and backend" need to be compiled in - at
least as far as it concerns FC5, the xen kernels provided by the
Fedora project have these options not set during compilation.
I have attached a kernel config file that can be used to generate
a unified xen0/xenU linux kernel.

First thing to do is to exclude the second PCI card and a USB
controller from being used by dom0 by adding the pciback.hide
kernel boot parameter. Here's the relevant entry from my
/boot/grub/menu.lst file:

Code:
title Fedora Core (2.6.16-xen)
        root (hd0,0)
        kernel /boot/xen-3.0.2-2.gz com1=115200,8n1
        module /boot/vmlinuz-2.6.16-xen ro root=/dev/sda1 idle=poll pci=conf1 console=ttyS0,115200n8 pciback.hide=(02:00.0)(00:02.0)(00:02.1)
        module /boot/initrd-2.6.16-xen.img
02:00.0 is the PCI bus ID of the second PCI card
00:02.0 and 00:02.1 is the on-board USB controller.

Second, you need to allow the xenU domain to access the PCI devices.
Here's the relevant entry in my xen.conf file:

Code:
pci = [ '2,0,0','0,2,0','0,2,1' ]
Third, you need to tell the X-Server in domU to use sharevt.
I did that by adding a custom X-Server entry in /etc/gdm/custom.conf
located in the domU file system:

Code:
[server-xen]
name=xen server
command=/usr/bin/X -sharevts vt1
flexible=true

[servers]
0=xen
Last but not least, you need to use "evdev" as keyboard driver
in xorg.conf of domU.

That's all i can remember for now :-)


Please note that there are two issues left:

First, i couldn't easily figure out how to change the keyboard mapping when
using the "evdev" driver for the keyboard, but this should just be a
minor and solvable xorg.conf issue.

Second, when shutting down domU, it may happen that the whole
system hangs - maybe it helps to unload the nvidia driver module
on domU before the shutdown (didn't yet tried).

Quote:
Originally Posted by logicmagic
Is the second video card only visible to the one domU then or are you forwarding OpenGL or something to dom0 and the dom0 driver is "driving" the card?
The second card an the on-board USB controller is exclusivly reserved
for domU and will be accessed "as usual" (dom0 uses PS2 mouse
and keyboard). You can even use the same nvidia kernel driver module
when installing a unified dom0/domU linux kernel in both domains.
Allowing domU kernels to access PCI devices is basically a security
risk, because the PCI card could be programmed to access
memory of dom0. This is not an issue if the CPU has an IOMMU such
as processors with Pacifica (AMD) and Vanderpool (intel).

A few more details can be found at:

http://wiki.xensource.com/xenwiki/CoolConfigurations

Quote:
Originally Posted by logicmagic
How do you deal with the memory offset problem?
Never heard of, can you please provide a link for more details?

regards

Bernhard
Attached Files
File Type: zip config-2.6.16-xen.zip (16.0 KB, 277 views)
JaXXoN is offline   Reply With Quote