From mboxrd@z Thu Jan 1 00:00:00 1970 From: Weidong Han Subject: Re: Xen 4.0.0 first release candidate / graphics passthru Date: Fri, 22 Jan 2010 10:37:51 +0800 Message-ID: <4B590F7F.1050001@intel.com> References: <4B5850BA.7000905@intel.com> <20100121141152.GW2861@reaktio.net> <20100121142344.GX2861@reaktio.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Timothy J. Moore" Cc: "xen-devel@lists.xensource.com" , "Mr. Teo En Ming (Zhang Enming)" , Sander Eikelenboom , Keir Fraser , Jean Guyader List-Id: xen-devel@lists.xenproject.org Timothy J. Moore wrote: > Hang-on guys there is already basic GFX passthru functionality since XE= N 3.4 (Weidong Han provided patches). > > changeset 20144: http://xenbits.xensource.com/xen-unstable.hg?rev/05f3c= a68f62d > > You need to enable "gfx_passthru=3D1" in XEN config and set the pci=3D[= ''] also. > > The patches allow passthrough of the Primary VGA card only and will re-= execute the VGA BIOS within qemu (not the emulated Cirrus/Bochs BIOS). > > This does seem to work for basic cards, ie Intel and some ATI but not N= VIDIA Cards as they still need the pBAR=3DvBAR patches. > > I have been monitoring XEN_devel for a long time and have just tried th= e latest 4.0-rc2 (and manually hacked the pBAR=3DvBAR code in) without su= ccess .. maybe something else has changed to stop this working ? > > Weidong Han also provided patches to allow Secondary VGA passthru which= Teo En Ming was able to reproduce. It is a subset of these patches that = are in XEN now but only for the Primary card and I have not seen much tes= ting of this functionality on the xen-devel list. > > Further development is needed but the main blocker to this whole VGA pa= ssthrough argument is support for FLR. In each of the above cases it seem= s that a reboot is needed to restore the VGA after stopping the associate= d DomU. > > PCIe FLR (Function Level Reset) is in the PCIe 2.0 specification, XCI (= xenclient) does try to implement secondary bus resets to work around this= - but it all seems to be very vendor_specific and I have never seen my V= GA card reset and become re-usable. > > How would it work with PCI or AGP cards - if at all ? > =20 FLR is a requirement of device assignment to make sure the device is in=20 a correct status. gfx passthrough also need to do FLR on gfx card for=20 each assignment. XCI implements vendor specific FLR for some gfx cards=20 (e.g. Intel IGD) if they don't support standard PCIe or PCI FLR. As I=20 said before, many gfx cards are not virtualization friendly due to=20 various issues, such as BIOS re-execution, FLR capability, pBAR=3DvBAR=20 etc. First, let's implement a gfx passthrough framework in Xen to=20 support vritualization friendly gfx cards, and then improve it to work=20 with more gfx cards with clean hacks. At the same time, hope gfx vendors=20 to improve their gfx cards to be more virtualization friendly in future. Regards, Weidong > Hope this helps set the scene and current status,m anyone have anything= else to add ? > > Cheers, > Tim > > > -----Original Message----- > From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@l= ists.xensource.com] On Behalf Of Pasi K=E4rkk=E4inen > Sent: 21 January 2010 14:24 > To: Keir Fraser > Cc: Sander Eikelenboom; xen-devel@lists.xensource.com; Weidong Han; Mr.= Teo En Ming (Zhang Enming); Jean Guyader > Subject: Re: [Xen-devel] Xen 4.0.0 first release candidate / graphics p= assthru > > On Thu, Jan 21, 2010 at 04:11:52PM +0200, Pasi K=E4rkk=E4inen wrote: > =20 >> On Thu, Jan 21, 2010 at 02:02:10PM +0000, Keir Fraser wrote: >> =20 >>> On 21/01/2010 13:03, "Weidong Han" wrote: >>> >>> =20 >>>>>> We will rebase the patchset for both 2.6.18 and pvops dom0, and re= send >>>>>> if for check in after xen 4.0. >>>>>> =20 >>>>>> =20 >>>>> Is there some specific reason to not have it in now, for Xen 4.0? >>>>> =20 >>>>> =20 >>>> It needs some efforts to rebase it to latest Xen. If you don't thin= k >>>> it's too late for Xen 4.0, we can try to complete it in a few days. >>>> =20 >>> If there is demand, then we can slip rc2 some more for it. >>> >>> =20 >> I think the patches should go in for rc2. Already today multiple peopl= e have=20 >> been asking how to run VGA passthrough with Xen :) (on #xen) >> >> =20 > > .. and in general it's a pretty popular question on both xen-users mail= inglist and on #xen. > People seem to want to use Xen VGA passthrough. > > -- Pasi > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > =20