WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, "Han, Weidong" <weidong.han@xxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d
From: "Lin, Ben Y" <ben.y.lin@xxxxxxxxx>
Date: Thu, 17 Sep 2009 07:50:54 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Kay, Allen M" <allen.m.kay@xxxxxxxxx>, Guyader <Jean.Guyader@xxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>, Jean, "'bengheng@xxxxxxxxxxxxxx'" <bengheng@xxxxxxxxxxxxxx>
Delivery-date: Wed, 16 Sep 2009 16:52:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.0909161512390.24685@kaball-desktop>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <715D42877B251141A38726ABF5CABF2C054B533681@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <alpine.DEB.2.00.0909161512390.24685@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aco22MZravUPOQrMQr6Jr2PCuGUGOAATmIUg
Thread-topic: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d
One shortcoming of VGA resource remapping is that the host domain could not use 
console anymore.

Here is what we did before in XEN:
Pass-through the Discrete graphics card into guest as the primary graphics 
card, and used the emulated VGA controller for this graphics card in the guest. 
In other words, graphics card in the guest = physical graphics card (3D 
computing) + emulated VGA controller.

This solution could avoid of VGA resource remapping, and the host domain could 
use the console as usual.

Thanks
Ben

-----Original Message-----
From: Stefano Stabellini [mailto:stefano.stabellini@xxxxxxxxxxxxx] 
Sent: 2009年9月16日 22:24
To: Han, Weidong
Cc: 'xen-devel@xxxxxxxxxxxxxxxxxxx'; Lin, Ben Y; 'bengheng@xxxxxxxxxxxxxx'; 
Kay, Allen M; Keir Fraser; Jean Guyader
Subject: Re: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d

On Fri, 28 Aug 2009, Han, Weidong wrote:
> Hi all,
> 
> Recently, more and more people are interesting in gfx passthrough. But now 
> xen-unstable doesn't support it, although some guys (Jean Guyader, Beng Heng, 
> Ng) posted gfx passthrough patches. If xen-unstable includes gfx passthrough 
> support, people can be easy to try it.
> 
> gfx passthrough is more complicated than other PCI device passthrough such as 
> NIC, and is hard to use a generic approach for all gfx passthrough. But there 
> are some necessary changes for gfx passthrough:
>   1. disable emulated VGA adapter, instead use passthroughed gfx
>   2. load VGA bios of the gfx to guest
>   3. passthrough legacy VGA IO ports and MMIOs to guest
> 
> This patchset implements above common changes. Based on the common changes, 
> we are investigating to support more gfx cards and guest OSs. We will post 
> the hacks in future.
> 
> The patchset supports to passthrough the primary gfx and discrete gfx. With 
> the patchset, virtualization friendly gfx cards can be passthroughed (e.g. 
> Nvidia FX3800), IGD and many discrete gfx cards are not supported yet. 
> 
> This is easy to use, the only difference from other PCI passthrough is to add 
> following lines to hvm configure file:
> 
> #----------------------------------------------------------------------------------------
> # 0: no gfx passthru, 1: IGD passthru, 2: discrete gfx passthru, default is 0
> gfx_passthru=2
> 
> and also pls passthrough a USB controller for keyboard/mouse use in guest. 
> (Now there are some issues on USB controller passthrough with pv-ops dom0, so 
> currently prefer to use 2.6.18 dom0.)
> 
> 
> The patchset is as follows:
> 1. PATCH 1/2: changes in xen-unstable
>       - retrieves VGA bios from host VGA BIOS address (0xC0000), then load it 
> to guest VGA BIOS address (This is the same with XCI).
>       - Enlarge guest MMIO range to contain gfx card's large memory 
>       - add a config option 'gfx_passthru' for gfx passthrough
> 
> 2. PATCH 2/2: changes in QEMU
>       - disable emulated VGA adapter 
>       - register/unregister legacy VGA I/O ports and MMIOs
> 


I think we should make clear that this option is for passing through
graphic cards as the primary graphic device in the guest.
Discrete graphic cards could be passed through to the guest as
secondary graphic devices, avoiding the need for remapping the vga bios
or disabling the emulated vga.
I think they would still need the other patches, in particular the
vBAR-pBAR patch.
What do you think about adding a third option "3 : discrete gfx passthru
as secondary"?
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel