[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Xen-users] 3D acceleration
- To: "Vlad" <vladatnyc@xxxxxxxxx>
- From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
- Date: Fri, 23 Jun 2006 10:31:52 +0200
- Cc: xen-users@xxxxxxxxxxxxxxxxxxx
- Delivery-date: Fri, 23 Jun 2006 01:34:01 -0700
- List-id: Xen user discussion <xen-users.lists.xensource.com>
- Thread-index: AcaWkRbyEC8jCzxTToakbpNyUk4otgADSPRQ
- Thread-topic: [Xen-users] 3D acceleration
You don't have to have a Xenified driver if there is an
IOMMU in the system. But those don't exist today in most systems (IBM has one,
but it's only used in LARGE multiprocessor systems - and there's no support in
Xen for it anyways - yet at least).
So to explain why:
Let's say you have a Dom0 that has 256MB of memory, and a
DomU that also has 256MB of memory.
The DomU will think that the memory starts at zero, because
Xen will fake the memory configuration for the domain when it's starting. There
are mechanisms (called shadow-paging) to hide the actual memory configuration
from the guest, and the guest _WILL_ believe that it's got memory from 0 ...
256MB.
Now, the driver for the graphics card will be given a
bitmap in user-memory to draw to the video-card. Since we assume this is a
"fancy" graphics card, it can do direct memory access (DMA) from the main memory
into the video-memory. So the driver will just say "at address XXXXX you can
find a bitmap, please DMA it into video memory at address YYYYY". However, XXXXX
is a PHYSICAL address within the guest memory - but the ACTUAL physical address
that the guest doesn't know about is 256MB + XXXXX. But neither the guest, nor
the graphcis card knows that the Guest address is not ACTUAL physical address...
So what gets drawn to your screen in this case, would be whatever is at physical
address XXXXX - not the INTENDED XXXXX+256MB - and you'll probably find that at
XXXXX is some completely different type of data, so the screen will look like
someone spilt a bunch of mixed pixels and swept them up into a pile... Or put
another way, rubbish will appear on the screen.
Does that make it clear?
--
Mats
After readings this post i'm very confused. Why would you ever need to have a device driver that understands Xen. My understanding is that when running in paravirtulization mode, all accesses to hardware go through the Dom0 drivers, which are simply regular old linux drivers and have no need to know about xen. When you are running in full virtualization, then Xen simply provides emulated devices to the guesOS (much like VMWare) in which case again, no need to xen aware drives. Obviously i'm wrong somewhere here, if you can point out where that would be great.
> -----Original Message----- > From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx > [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx
] On Behalf Of brettm > Sent: 15 May 2006 00:43 > To: xen-users@xxxxxxxxxxxxxxxxxxx > Subject: Re: [Xen-users] 3D acceleration > > Is it possible to use my motherboard's integrated graphics
> for dom0 and my x1900 video card for a guest? If so, how > would I set this up?
Aside from the obvious problem of having a graphics driver that actually understands Xen, yes, I believe this could be possible. Although it
doesn't work under fully-virtualized guests (VT/SVM), since there would be the added complication of the machine physical address and the guest physical address (i.e. we tell the guest that it's memory is 256MB
starting at address zero, when it's really starting at 128MB), and any direct memory access from the card would be offset by 128MB in the example...
But if you have Xen-aware/Xen-compatible graphics driver, and you're
using Xen-linux rather than for example Windows or a unmodified Linux, you should be able to give the graphics card PCI address to the guest - I don't know the details of it, but I believe there's more than one
example of how to "hide" from Dom0 and "give" a device to DomU.
Of course, this also assumes that your MB graphics and plug-in graphics cards are actually able to work at the same time. I've seen more than
one design where essentially they are mutually exclusive due to sharing the same point-to-point bus, and the one device is just disabled when you use the other [usually a BIOS setting that says whether you want
built-in or plugged in graphics, and it's an EXCLUSE OR of those choices.]
-- Mats > > > On Feb 24, 2006, at 4:46 AM, Petersson, Mats wrote: > >
> > There's been more than one discussion thread on this subject, > and the summary answer is: > - It's possible to do with a para-virtualized driver in the
> guest - that is, a driver that takes the calls for graphics > commands and passes them to Dom0, where a "real" graphics > driver executes the actual intention of the call.
> > It is not trivial to write such a driver, but it's nowhere > near as hard as it would be to try to get a very advanced > native driver to work in a guest environment.
> > Of course, if you have two different graphics cards in the > machine, Dom0 can be given one card, and one of the guest > domains can be given the other card, thus you can use the
> native driver straight off (at least in fully virtualized mode). > > Can you do this one card? Just have dom0 not have a video > card, and pass the only video card to domU? That's how I run
> all my servers anyway, and it'd be awesome to use hardware > acceleration on a "desktop domU"... > > -- > Luke > _______________________________________________
> Xen-users mailing list > Xen-users@xxxxxxxxxxxxxxxxxxx > http://lists.xensource.com/xen-users >
> > _______________________________________________ > Xen-users mailing list > Xen-users@xxxxxxxxxxxxxxxxxxx >
http://lists.xensource.com/xen-users > >
_______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|