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 Signed-off-by: Ben Lin <ben.y.lin@intel.com> Signed-off-by: Weidong Han <weidong.han@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jean Guyader
2009-Aug-28 08:24 UTC
Re: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d
On Fri, Aug 28, 2009 at 03:53:56AM -0400, 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.) >Once we have those patch inside xen-unstable, I could commit the patch we have for XCI to share the host keyboard/mouse with multiple vms.> > 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 > >Hi, Has those patch been tested with an intel IGD? Because I think they are some pieces missing: - GMCH mapping in the guest. - VID DID pt for the host bridge (for linux hvm guest). - TOM pass through for winxp guest. Jean _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Aug-28 08:32 UTC
RE: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d
Jean Guyader wrote:> On Fri, Aug 28, 2009 at 03:53:56AM -0400, 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.) >> > > Once we have those patch inside xen-unstable, I could commit the > patch we have for XCI to share the host keyboard/mouse with multiple > vms.Cool. That''s very useful. Regards, Weidong> >> >> 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 >> >> > > Hi, > > Has those patch been tested with an intel IGD? > > Because I think they are some pieces missing: > - GMCH mapping in the guest. > - VID DID pt for the host bridge (for linux hvm guest). > - TOM pass through for winxp guest. > > Jean_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Andrew Lyon
2009-Aug-28 09:04 UTC
Re: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d
On Fri, Aug 28, 2009 at 8:53 AM, Han, Weidong<weidong.han@intel.com> 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.What about cheaper cards in the FX range like the FX580 or FX1800, are they likely to be passthrough friendly? Perhaps we should ask nvidia exactly which cards support virtualization, or is it a feature that is listed in the tech specs?, I could probably run to one of the cheaper FX cards but the high end ones are way too expensive for me to justify the cost. Andy> > 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 > > > Signed-off-by: Ben Lin <ben.y.lin@intel.com> > Signed-off-by: Weidong Han <weidong.han@intel.com> > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Aug-28 09:13 UTC
RE: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d
Andrew Lyon wrote:> On Fri, Aug 28, 2009 at 8:53 AM, Han, Weidong<weidong.han@intel.com> > 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. > > What about cheaper cards in the FX range like the FX580 or FX1800, are > they likely to be passthrough friendly?I don''t know. We didn''t try those cards. You can try with our patch by yourself.> > Perhaps we should ask nvidia exactly which cards support > virtualization, or is it a feature that is listed in the tech specs?,No. we just find it works with the common changes. Actually, its VGA bios re-execution doesn''t works well. Regards, Weidong> I could probably run to one of the cheaper FX cards but the high end > ones are way too expensive for me to justify the cost. > > Andy > >> >> 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 >> >> >> Signed-off-by: Ben Lin <ben.y.lin@intel.com> >> Signed-off-by: Weidong Han <weidong.han@intel.com> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Andrew Lyon
2009-Aug-28 10:23 UTC
Re: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d
On Fri, Aug 28, 2009 at 10:13 AM, Han, Weidong<weidong.han@intel.com> wrote:> Andrew Lyon wrote: >> On Fri, Aug 28, 2009 at 8:53 AM, Han, Weidong<weidong.han@intel.com> >> 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. >> >> What about cheaper cards in the FX range like the FX580 or FX1800, are >> they likely to be passthrough friendly? > > I don''t know. We didn''t try those cards. You can try with our patch by yourself. > >> >> Perhaps we should ask nvidia exactly which cards support >> virtualization, or is it a feature that is listed in the tech specs?, > > No. we just find it works with the common changes. Actually, its VGA bios re-execution doesn''t works well.http://www.nvidia.com/object/sli_multi_os.html Dual Quadro FX 5800, 4800, and 3800 professional graphics boards> > Regards, > Weidong > >> I could probably run to one of the cheaper FX cards but the high end >> ones are way too expensive for me to justify the cost. >> >> Andy >> >>> >>> 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 >>> >>> >>> Signed-off-by: Ben Lin <ben.y.lin@intel.com> >>> Signed-off-by: Weidong Han <weidong.han@intel.com> >>> _______________________________________________ >>> Xen-devel mailing list >>> Xen-devel@lists.xensource.com >>> http://lists.xensource.com/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stefano Stabellini
2009-Sep-16 14:23 UTC
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@lists.xensource.com http://lists.xensource.com/xen-devel
Lin, Ben Y
2009-Sep-16 23:50 UTC
RE: [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@eu.citrix.com] Sent: 2009年9月16日 22:24 To: Han, Weidong Cc: 'xen-devel@lists.xensource.com'; Lin, Ben Y; 'bengheng@eecs.umich.edu'; 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@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Sep-17 01:10 UTC
RE: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d
Stefano Stabellini wrote:> 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"?Yes, it still needs more efforts to make gfx passthrough perfect. This patchset just supports basic gfx passthrough. Based on it, we can develop to support more gfx cards (e.g. IGD, other Nvidia and ATI cards), and more use cases (e.g. secondary gfx in guest, use emulated vga in guest with passthroughed gfx). Regards, Weidong _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
hi Lin, 2009/9/17 Lin, Ben Y <ben.y.lin@intel.com>:> 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.This is cool! I am wondering how we can separate 3D access and VGA controller access, so we can direct some access to physical stuff, and the other to emulated controller?? What is the current status of this project? Thanks, J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Lin, Ben Y
2009-Sep-22 02:17 UTC
RE: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d
Hi Jun: We tried the following way to enable the QEMU-emulated VGA for NVIDIA graphics pass-through: 1. Assign qemu-emulated VGA resource (0x3C0~0x3DF, 0xA0000~0xC0000) to guest vista. (This part is similar as what existing QEMU does, we just keep the logical for VGA operations) 2. Copy Standard VGA bios to 0xC0000~0xD0000, and copy the VIDEO BIOS of NVIDIA graphics card to 0xD0000~0xE0000. The tricky issue is that you should not let the VIDEO BIOS of NVIDIA Graphics card execution in the virtual BIOS of guest, because it will check the status of physical VGA controller, and it will be in infinite loop. 3. Use standard VGA bios to do initialization of the qemu-emulated VGA resource, and then the booting progress will be shown in qemu-emulated VGA (SDL Window). 4. After completing the booting progress, the guest vista will run the VIDEO BIOS of NVIDIA graphics card to initialize the graphics card. As we known, in this phase, no VGA output necessary, so the video bios of NVIDIA card only initialize the 3D related of graphics card. In this phase, you can close the SDL window. Thanks Ben -----Original Message----- From: Jun Koi [mailto:junkoi2004@gmail.com] Sent: 2009年9月22日 1:06 To: Lin, Ben Y Cc: Stefano Stabellini; Han, Weidong; xen-devel@lists.xensource.com; Kay, Allen M; Guyader; Keir Fraser; bengheng@eecs.umich.edu Subject: Re: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d hi Lin, 2009/9/17 Lin, Ben Y <ben.y.lin@intel.com>:> 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.This is cool! I am wondering how we can separate 3D access and VGA controller access, so we can direct some access to physical stuff, and the other to emulated controller?? What is the current status of this project? Thanks, J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Pasi Kärkkäinen
2010-Mar-13 00:37 UTC
Re: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d / keyboard and mouse sharing patch
On Fri, Aug 28, 2009 at 09:24:31AM +0100, Jean Guyader wrote:> On Fri, Aug 28, 2009 at 03:53:56AM -0400, 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.) > > > > Once we have those patch inside xen-unstable, I could commit the patch we have for XCI > to share the host keyboard/mouse with multiple vms. >Hello, I just found this while going through the archives. Jean: I don''t remember seeing this keyboard/mouse sharing patch.. Can you send it now when xen-unstable has graphics passthru support? -- Pasi _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jean Guyader
2010-Mar-17 15:42 UTC
Re: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d / keyboard and mouse sharing patch
On 13 March 2010 00:37, Pasi Kärkkäinen <pasik@iki.fi> wrote:> On Fri, Aug 28, 2009 at 09:24:31AM +0100, Jean Guyader wrote: >> On Fri, Aug 28, 2009 at 03:53:56AM -0400, 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.) >> > >> >> Once we have those patch inside xen-unstable, I could commit the patch we have for XCI >> to share the host keyboard/mouse with multiple vms. >> > > Hello, > > I just found this while going through the archives. > > Jean: > I don''t remember seeing this keyboard/mouse sharing patch.. > Can you send it now when xen-unstable has graphics passthru support? >Hi Pasi, I didn''t post the patch on the mailing list, and in XCI we changed the way it was working. When I will have some free time, I will right a more upstreamable version. Jean _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Pasi Kärkkäinen
2010-Mar-18 16:01 UTC
Re: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d / keyboard and mouse sharing patch
On Wed, Mar 17, 2010 at 03:42:55PM +0000, Jean Guyader wrote:> On 13 March 2010 00:37, Pasi Kärkkäinen <pasik@iki.fi> wrote: > > On Fri, Aug 28, 2009 at 09:24:31AM +0100, Jean Guyader wrote: > >> On Fri, Aug 28, 2009 at 03:53:56AM -0400, 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.) > >> > > >> > >> Once we have those patch inside xen-unstable, I could commit the patch we have for XCI > >> to share the host keyboard/mouse with multiple vms. > >> > > > > Hello, > > > > I just found this while going through the archives. > > > > Jean: > > I don''t remember seeing this keyboard/mouse sharing patch.. > > Can you send it now when xen-unstable has graphics passthru support? > > > > Hi Pasi, > > I didn''t post the patch on the mailing list, and in XCI we changed the > way it was working. > When I will have some free time, I will right a more upstreamable version. >Ok, great! -- Pasi _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Pasi Kärkkäinen
2010-Aug-15 19:50 UTC
Re: [Xen-devel] [PATCH 0/2] graphics passthrough with VT-d / keyboard and mouse sharing patch
On Wed, Mar 17, 2010 at 03:42:55PM +0000, Jean Guyader wrote:> >> > >> Once we have those patch inside xen-unstable, I could commit the patch we have for XCI > >> to share the host keyboard/mouse with multiple vms. > >> > > > > Hello, > > > > I just found this while going through the archives. > > > > Jean: > > I don''t remember seeing this keyboard/mouse sharing patch.. > > Can you send it now when xen-unstable has graphics passthru support? > > > > Hi Pasi, > > I didn''t post the patch on the mailing list, and in XCI we changed the > way it was working. > When I will have some free time, I will right a more upstreamable version. >Hello again, Any progress with the keyboard/mouse sharing patch? Is the XCI version ok? -- Pasi _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel