Gentoo Archives: gentoo-amd64

From: Samir Mishra <sqmishra@×××.ae>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] AMD64, Nvidia Graphics, Xen -- Xorg on DomU Only
Date: Fri, 21 Apr 2006 07:48:03
Message-Id: 44488D40.9070903@eim.ae
1 Hello.
2
3 I posted this on the Xen Users mailing list, thought I'd try for a
4 different perspective from Gentoo users.
5
6 I'm doing a fresh install of Xen on an AMD64 using Gentoo. I have an
7 nvidia graphics card. I want Dom0 to be a minimal system, installed
8 without Xorg or any other GUI applications. I'm hoping to set up Xen
9 with (at least) 3 guest domains -- one running servers for the network
10 (ntp, dhcp, bind, yp, etc.), one guest domain running my desktop with
11 Xorg and the third guest domain to be used for development & testing.
12
13 What I'm hoping to find out is --
14 1. does the above make sense?
15 2. I want to access the X-server on the desktop domU directly on tty7.
16 Is this possible? If so, how can I do this?
17 3. what are the things I need to watch out for?
18 4. Any list members running Xen?
19
20 I've done some research and I'm aware I have to disable tls and compile
21 the system with specific compiler flags. If anyone has pointers to
22 documentation specific to what I want to do, that would be much
23 appreciated.
24
25 One of the responses I received on the Xen-Users mailing list (from
26 Matts Peterssons, quote) --
27 | No. The X-server needs to be the OWNER of all the graphics card, and
28 your Dom0 takes ownership of
29 | the graphics card very early on. There is two solutions that come to
30 mind:
31 | You could perhaps use a simple PCI graphics card for the Dom0 console,
32 and then give the DomU the
33 | nvidia card, but any shared hardware must be managed by one Domain
34 only (and everyone else talking
35 | through that domain to get access). Of course, this assumes that there
36 is an nVidia driver that works
37 | under Xen, which I don't think exists (yet) - and I very much doubt
38 that native kernel graphics drivers
39 | will work "out of the box" - as they probably do all sorts of "nasty"
40 things that Xen needs to be aware of.
41 |
42 | Or you can use vncserver/vncviewer to access your desktop machine.
43
44 In one of the documents, I read, it indicated that, for example, if I
45 had 2 PCI network cards, and I wanted to have domU manage one of the
46 cards directly, there's a way of telling Dom0 to leave the management of
47 a particular PCI bus/device alone. Is it possible to do something
48 similar with the AGP adapter bus/card? But, given that I actually get
49 this to work, how do I go about getting desktop domU to gain control of
50 tty7 (or whatever, since all consoles are (I believe) controlled by
51 dom0. In other words, I'd like to have a direct pass-through, or
52 whatever one might call it.
53
54 Could I achieve something similar by installing Xorg in dom0 and domU
55 and running XDMCP to connect to domU? This would mean a more complicated
56 package management scenario since Dom0 won't be a minimalist
57 installation anymore. I guess it all depends on how well the nvidia
58 drivers play with Xen.
59
60 A later response (again from Matts Peterssons, quote) --
61 | I very much doubt this [having DomU control the nvidia card] will work in actual
62 | practice [as I once read: In theory, there's no difference between theory and
63 | practice - in practice there is...] The difficulty would be to have a driver that
64 | is "Xen-clean" or "Xen-aware". Since the low-level driver for the graphics card
65 | is a kernel driver, it will have access to all sorts of kernel-internal information,
66 | and some of this is managed by Xen and should not be used directly by for instance
67 | a driver. Xen fixes this by patching [changing some macros in header-files is the
68 | key part of this] the kernel drivers that are included in the kernel itself. But
69 | the nVidia drivers are closed source, so they are not patchable by this method...
70
71 I'd rather have DomU have control of my graphics card and have the
72 output of Dom0 be redirected to DomU via XDMCP or VNC (for X-Server) and
73 to virtual network consoles for the rest.
74
75 But is this possible?
76
77 TIA.
78
79 Samir
80 --
81 gentoo-amd64@g.o mailing list