== In DomU, how can I use 3D graphics. == * Original URL: http://wiki.xensource.com/xenwiki/XenFaq In a para-virtualized domain, you could give access to the graphics card by hiding the device from Dom0 and giving the DomU of choice access to this card. The frequently asked question comes from people who want to use Windows in a HVM domain to play games or run high-end 3D graphics applications, and the answer here is "Not yet". The problem here is that the OS isn't loaded directly at address zero when it is a guest-OS (DomU), so we're lying to the OS about it's location (because most OS's don't quite understand the concept of memory that doesn't actually start at address zero). So, the OS thinks that it's been loaded at an address of, say, 0..256MB, but in reality it's been loaded at 256MB..512MB. When it then talks to the graphics cards, it will give the graphics card a physical address of somewhere between 0..256MB, which of course doesn't work for the graphics card - as it should really be reading somewhere between 256MB..512MB. So what can we do about it? There are a number of different solutions that could work: 1. Rewrite the graphics driver so that it understands Xen. Possible, but hard work, even if you have easy access to the source-code. Most graphics chip manufacturers do not have open-source drivers. 2. Use some alternative way to access the desktop, such as Remote Desktop. This doesn't necessarily work for real high-end apps or games, but it's probably better than the graphics card emulation in HVM. 3. Wait for hardware and software to support [http://en.wikipedia.org/wiki/IOMMU IOMMU]. An IOMMU is a device that will support mapping memory addresses for a domian to some different address when that domain's hardware is being used. There is currently (high-end) server hardware that support this, but no desktop machines. Expect this to change in the future, but not very soon. == Reference == * http://xenbits.xensource.com/ext/xen-iommu.hg * [http://www.mulix.org/lectures/using-iommus-for-virtualization/OLS-jdmason.pdf Using IOMMUs for Virtualization in Linux and Xen](PDF) - [http://www.linuxsymposium.org/2006/slides.php 2006 Linux Symposium]