SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
Graphics Pass-through with VT-d
                        Nov-19-2009

                           Weidong Han
                                Ben Lin

                    Xen Summit Asia 2009
Agenda

• Graphics Virtualization Introduction
• Graphics Pass-through with VT-d
• Performance
• Conclusion




                                         Software and Services Group
                                                                       2
Requirements on Graphics Virtualization

• Require graphics capabilities         Virtual Machine

in virtualization environment
                                        3D
    — 3D games                         Game
    — High definition video playback
                                                            HD
    — CAD                                                  Video


                                       CAD




                                         Software and Services Group
                                                                       3
Approaches

• Device emulation
  Emulate a graphics device
     — Sharing amongst guests
     — High overhead in emulation


• Graphics API remoting
  Forward graphics API calls from guest to the external graphics stack via remote
procedure call
     — Hardware independent
     — Need additional software stacks in guest


• Pass-through
  Direct access graphics device in guest
     — Good performance
     — Don’t require any special knowledge of GPU programming interfaces
     — Dedicate the graphics device to one guest




                                                             Software and Services Group
                                                                                           4
Agenda

• Graphics Virtualization Introduction
• Graphics Pass-through with VT-d
• Performance
• Conclusion




                                         Software and Services Group
                                                                       5
PCI Pass-through with VT-d

• Assign a physical device to a guest
directly
                                        Domain 0                   Domain 1

• Guest accesses the device directly                                 Native
with minimal hypervisor intervention                                 driver
                                        QEMU

• Physical device accesses guest’s
memory directly with help of VT-d
                                            Xen Hypervisor

• Interrupt will be injected to guest
through hypervisor
                                                   Hardware

• PCI Configuration Space Access
needs trap-and-emulation



                                             Software and Services Group
                                                                              6
Challenges of Graphics Pass-through

• Legacy VGA resources
    — Legacy VGA I/O ports and frame buffers are at fixed locations
         • I/O ports: 0x3B0 – 0x3BB, 0x3C0 – 0x3DF
         • Frame buffer: 0xA0000 – 0xBFFFF


• Graphics device re-initialization in guest
    — Execute Video BIOS
    — But Video BIOS bits may be truncated or modified after initialization in host, thus
      cannot be re-executed correctly


• Secondary graphics pass-through
    — The secondary graphics device doesn’t claim VGA cycle


• Additional challenges on integrated graphics device (IGD)
    — May have assumptions on host chipset or BIOS



                                                          Software and Services Group
                                                                                            7
Primary Discrete Graphics Device

• Legacy VGA resources
   — 1:1 map legacy VGA resources


• Video BIOS
 For Video BIOS without re-execution issue:
   — Extract video BIOS from host address 0xC0000
   — Copy video BIOS to guest address 0xC0000


 For Video BIOS with re-execution issue:
   — Get video BIOS from graphics device via tools (e.g. NiBiTor)
   — Load video BIOS file to guest ROMs
   — Copy video BIOS to guest address 0xC0000


                                                 Software and Services Group
                                                                               8
Secondary Discrete Graphics Device

• Legacy VGA resources
   — 1:1 map legacy VGA resources


• Video BIOS
   — Get video BIOS from graphics device via tools (e.g. NiBiTor)
   — Load video BIOS file to guest ROMs
   — Copy video BIOS to guest address 0xC0000


• Claim VGA cycle
   — Enable VGA on its PCI bridge



                                                 Software and Services Group
                                                                               9
Intel Integrated Graphics Device

• Extra changes required to handle assumptions on host chipset or BIOS

• Intel Q45 IGD:
     — Assumptions on chipset
          • Graphics Control Register: 0x52 – 0x53
               –   Specify the amount of graphics memory allocated from system memory
          • Vendor ID and Device ID
               –   Linux loads its driver only if it’s a compatible chipset
     Solution: Pass-through some registers of host bridge


     — Assumptions on device BDF (Bus:Device.Function)
          • Video BIOS hardcode the BDF to 00:02.0
     Solution: Assign BDF 00:02.0 to IGD in guest


     — Vendor specific FLR (Function Level Reset)
          • FLR capability is not exposed,
     Solution: need specific logic to locate it and perform FLR



                                                                              Software and Services Group
                                                                                                            10
Agenda

• Graphics Virtualization Introduction
• Graphics Pass-through with VT-d
• Performance
• Conclusion




                                         Software and Services Group
                                                                       11
Test Environment

• GPU: Intel Integrated Graphics on Intel Q45 Chipset
• Native
    — One CPU
    — Memory 1G
• Guest
    — One Virtual CPU
    — Memory 1G
• Operating System
    — Vista Enterprise 32-bit
    — WDDM driver
• Xen 3.4
• 3DMark06

                                              Software and Services Group
                                                                            12
1.3148E-10
                                                                           0.1
                                                                                 0.2
                                                                                       0.3
                                                                                                            0.4
                                                                                                                  0.5
                                                                                                                        0.6
                                                                                                                              0.7
                                                                                                                                    0.8
                                                                                                                                          0.9
                                                                                                                                                1
                                                                                                                                                    Results



                                          Return To Proxycon




                                                 Firefly Forest




                                            CPU1 - Red Valley




                                            CPU2 - Red Valley




                                   Fill Rate - Single-Texturing




                                    Fill Rate - Multi-Texturing




                                                 Pixel Shader




                                      Vertex Shader - Simple




                                    Vertex Shader - Complex




                                                         HDR-1




                                                         HDR-2
     Software and Services Group




                                                   Perlin noise
                                                                                             Guest/Native




13
Agenda

• Graphics Virtualization Introduction
• Graphics Pass-through with VT-d
• Performance
• Conclusion




                                         Software and Services Group
                                                                       14
Conclusion

• Graphics pass-through has special challenges

• Xen now supports graphics pass-through:
   — IGD pass-through patch was sent out in xen-devel mailing list, still under
     review



• Graphics pass-through achieves good performance




                                                   Software and Services Group
                                                                                  15
Questions?




             Software and Services Group
                                           16
Backup




         Software and Services Group
                                       17
Specific Hacks for Graphics Pass-through

• Some graphics devices are virtualization unfriendly
• 1:1 map physical BARs and virtual BARs
   — Some discrete graphics devices (e.g. nVidia Geforce 8400 GS) seem to
     use the BAR registers in hardware for address decoding of memory
     requests

• Don’t remove shadows of MMIO direct
   — When pass-through some graphics devices to Vista or Win7 guest, it will
     remove shadows of MMIO direct, then results in system crash




                                                 Software and Services Group
                                                                               18
Legal Information

INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION
WITH INTEL® PRODUCTS. EXCEPT AS PROVIDED IN INTEL'S TERMS
AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES
NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR
IMPLIED WARRANTY RELATING TO SALE AND/OR USE OF INTEL
PRODUCTS, INCLUDING LIABILITY OR WARRANTIES RELATING TO
FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR
INFRINGEMENT OF ANY PATENT, COPYRIGHT, OR OTHER
INTELLECTUAL PROPERTY RIGHT.
Intel may make changes to specifications, product descriptions, and
plans at any time, without notice.
All dates provided are subject to change without notice.
Intel is a trademark of Intel Corporation in the U.S. and other
countries.
*Other names and brands may be claimed as the property of others.
Copyright © 2007, Intel Corporation. All rights are protected.




                                           Software and Services Group
                                                                         19
Software and Services Group
                              20

Mais conteúdo relacionado

Mais procurados

Forecast 2012 Panel: Security POC NAB, Terremark, Trapezoid
Forecast 2012 Panel: Security POC NAB, Terremark, TrapezoidForecast 2012 Panel: Security POC NAB, Terremark, Trapezoid
Forecast 2012 Panel: Security POC NAB, Terremark, Trapezoid
Open Data Center Alliance
 
Microsoft Pwrpt
Microsoft PwrptMicrosoft Pwrpt
Microsoft Pwrpt
RBratton
 
Roy omap validation_dvc_lub_092106
Roy omap validation_dvc_lub_092106Roy omap validation_dvc_lub_092106
Roy omap validation_dvc_lub_092106
Obsidian Software
 
Client Virtualization
Client VirtualizationClient Virtualization
Client Virtualization
Amit Gatenyo
 
ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012
ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012
ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012
ITCamp
 
Fy09 Sask Tel Learn It Ws 2008 R2 Charlie Russel
Fy09 Sask Tel Learn It   Ws 2008 R2   Charlie RusselFy09 Sask Tel Learn It   Ws 2008 R2   Charlie Russel
Fy09 Sask Tel Learn It Ws 2008 R2 Charlie Russel
sim100
 

Mais procurados (19)

NSS File System Performance, Clustering and Auditing in Novell Open Enterpris...
NSS File System Performance, Clustering and Auditing in Novell Open Enterpris...NSS File System Performance, Clustering and Auditing in Novell Open Enterpris...
NSS File System Performance, Clustering and Auditing in Novell Open Enterpris...
 
I/O Scalability in Xen
I/O Scalability in XenI/O Scalability in Xen
I/O Scalability in Xen
 
Forecast 2012 Panel: Security POC NAB, Terremark, Trapezoid
Forecast 2012 Panel: Security POC NAB, Terremark, TrapezoidForecast 2012 Panel: Security POC NAB, Terremark, Trapezoid
Forecast 2012 Panel: Security POC NAB, Terremark, Trapezoid
 
Microsoft Pwrpt
Microsoft PwrptMicrosoft Pwrpt
Microsoft Pwrpt
 
System Center 2012 SP1 Overview and Window Azure IaaS
System Center 2012 SP1 Overview and Window Azure IaaSSystem Center 2012 SP1 Overview and Window Azure IaaS
System Center 2012 SP1 Overview and Window Azure IaaS
 
Roy omap validation_dvc_lub_092106
Roy omap validation_dvc_lub_092106Roy omap validation_dvc_lub_092106
Roy omap validation_dvc_lub_092106
 
Client Virtualization
Client VirtualizationClient Virtualization
Client Virtualization
 
ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012
ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012
ITCamp 2012 - Adrian Stoian - Migrating from CFG MGR 2007 to CFG MGR 2012
 
Windows Server 2008 Web Workload Overview
Windows Server 2008 Web Workload OverviewWindows Server 2008 Web Workload Overview
Windows Server 2008 Web Workload Overview
 
Vision dt solutions vmug leeds
Vision dt solutions vmug leedsVision dt solutions vmug leeds
Vision dt solutions vmug leeds
 
AMD Catalyst Software
AMD Catalyst Software  AMD Catalyst Software
AMD Catalyst Software
 
Fy09 Sask Tel Learn It Ws 2008 R2 Charlie Russel
Fy09 Sask Tel Learn It   Ws 2008 R2   Charlie RusselFy09 Sask Tel Learn It   Ws 2008 R2   Charlie Russel
Fy09 Sask Tel Learn It Ws 2008 R2 Charlie Russel
 
FY13 Q2 IT Camp - Windows 8 Overview
FY13 Q2 IT Camp - Windows 8 OverviewFY13 Q2 IT Camp - Windows 8 Overview
FY13 Q2 IT Camp - Windows 8 Overview
 
Licensing 2013 v1.0
Licensing 2013   v1.0Licensing 2013   v1.0
Licensing 2013 v1.0
 
Nakajima numa-final
Nakajima numa-finalNakajima numa-final
Nakajima numa-final
 
Citrix XenDesktop 5.5 seminar
Citrix XenDesktop 5.5 seminarCitrix XenDesktop 5.5 seminar
Citrix XenDesktop 5.5 seminar
 
Ian Pratt Usenix 08 Keynote
Ian Pratt Usenix 08 KeynoteIan Pratt Usenix 08 Keynote
Ian Pratt Usenix 08 Keynote
 
Novell SecureLogin Installation, Deployment, Lifecycle Management and Trouble...
Novell SecureLogin Installation, Deployment, Lifecycle Management and Trouble...Novell SecureLogin Installation, Deployment, Lifecycle Management and Trouble...
Novell SecureLogin Installation, Deployment, Lifecycle Management and Trouble...
 
Openstack@ebay.pptx
Openstack@ebay.pptxOpenstack@ebay.pptx
Openstack@ebay.pptx
 

Semelhante a Graphics Passthrough With Vt D

Stephan pfister deep dive personal v disk
Stephan pfister deep dive personal v diskStephan pfister deep dive personal v disk
Stephan pfister deep dive personal v disk
Digicomp Academy AG
 
гибридная облачная модель на базе System center 2012 sp1
гибридная облачная модель на базе System center 2012 sp1гибридная облачная модель на базе System center 2012 sp1
гибридная облачная модель на базе System center 2012 sp1
Expolink
 
Presentation power point (Advertising Upgrade))
Presentation power point (Advertising Upgrade))Presentation power point (Advertising Upgrade))
Presentation power point (Advertising Upgrade))
andrew maybir
 
Advertising System Upgrade
Advertising System UpgradeAdvertising System Upgrade
Advertising System Upgrade
andrew maybir
 

Semelhante a Graphics Passthrough With Vt D (20)

Stephan pfister deep dive personal v disk
Stephan pfister deep dive personal v diskStephan pfister deep dive personal v disk
Stephan pfister deep dive personal v disk
 
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
 
Graphics virtualization
Graphics virtualizationGraphics virtualization
Graphics virtualization
 
Graphics virtualization
Graphics virtualizationGraphics virtualization
Graphics virtualization
 
Should You Consider Virtual Desktops
Should You Consider Virtual DesktopsShould You Consider Virtual Desktops
Should You Consider Virtual Desktops
 
гибридная облачная модель на базе System center 2012 sp1
гибридная облачная модель на базе System center 2012 sp1гибридная облачная модель на базе System center 2012 sp1
гибридная облачная модель на базе System center 2012 sp1
 
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureIEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
 
Presentation power point (Advertising Upgrade))
Presentation power point (Advertising Upgrade))Presentation power point (Advertising Upgrade))
Presentation power point (Advertising Upgrade))
 
Advertising System Upgrade
Advertising System UpgradeAdvertising System Upgrade
Advertising System Upgrade
 
10. GPU - Video Card (Display, Graphics, VGA)
10. GPU - Video Card (Display, Graphics, VGA)10. GPU - Video Card (Display, Graphics, VGA)
10. GPU - Video Card (Display, Graphics, VGA)
 
Project ACRN hypervisor introduction
Project ACRN hypervisor introduction Project ACRN hypervisor introduction
Project ACRN hypervisor introduction
 
Microsoft RDS, VDI, RemoteFX and what Service Pack 1 will bring us
Microsoft RDS, VDI, RemoteFX and what Service Pack 1 will bring usMicrosoft RDS, VDI, RemoteFX and what Service Pack 1 will bring us
Microsoft RDS, VDI, RemoteFX and what Service Pack 1 will bring us
 
VMware Mirage for Retail
VMware Mirage for RetailVMware Mirage for Retail
VMware Mirage for Retail
 
HMS Core Game Solution- create the immersive game world / Fei Tong (Huawei)
HMS Core Game Solution- create the immersive game world / Fei Tong (Huawei)HMS Core Game Solution- create the immersive game world / Fei Tong (Huawei)
HMS Core Game Solution- create the immersive game world / Fei Tong (Huawei)
 
VMworld 2015: Deliver High Performance Desktops with VMware Horizon and NVIDI...
VMworld 2015: Deliver High Performance Desktops with VMware Horizon and NVIDI...VMworld 2015: Deliver High Performance Desktops with VMware Horizon and NVIDI...
VMworld 2015: Deliver High Performance Desktops with VMware Horizon and NVIDI...
 
De Re PlayStation Vita
De Re PlayStation VitaDe Re PlayStation Vita
De Re PlayStation Vita
 
Configure and Manage Virtualization on different Platforms
Configure and Manage Virtualization on different Platforms Configure and Manage Virtualization on different Platforms
Configure and Manage Virtualization on different Platforms
 
Implementing SR-IOv failover for Windows guests during live migration
Implementing SR-IOv failover for Windows guests during live migrationImplementing SR-IOv failover for Windows guests during live migration
Implementing SR-IOv failover for Windows guests during live migration
 
Server 2016 sneak peek
Server 2016 sneak peekServer 2016 sneak peek
Server 2016 sneak peek
 
Building Applications with the Microsoft Kinect SDK
Building Applications with the Microsoft Kinect SDKBuilding Applications with the Microsoft Kinect SDK
Building Applications with the Microsoft Kinect SDK
 

Mais de The Linux Foundation

Mais de The Linux Foundation (20)

ELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made Simple
 
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
 
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
 
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
 
XPDDS19 Keynote: Unikraft Weather Report
XPDDS19 Keynote:  Unikraft Weather ReportXPDDS19 Keynote:  Unikraft Weather Report
XPDDS19 Keynote: Unikraft Weather Report
 
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
 
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderXPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
 
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, CitrixXPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
 
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdXPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
 
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
 
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&DXPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
 
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM SystemsXPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
 
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
 
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
 
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
 
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Graphics Passthrough With Vt D

  • 1. Graphics Pass-through with VT-d Nov-19-2009 Weidong Han Ben Lin Xen Summit Asia 2009
  • 2. Agenda • Graphics Virtualization Introduction • Graphics Pass-through with VT-d • Performance • Conclusion Software and Services Group 2
  • 3. Requirements on Graphics Virtualization • Require graphics capabilities Virtual Machine in virtualization environment 3D — 3D games Game — High definition video playback HD — CAD Video CAD Software and Services Group 3
  • 4. Approaches • Device emulation Emulate a graphics device — Sharing amongst guests — High overhead in emulation • Graphics API remoting Forward graphics API calls from guest to the external graphics stack via remote procedure call — Hardware independent — Need additional software stacks in guest • Pass-through Direct access graphics device in guest — Good performance — Don’t require any special knowledge of GPU programming interfaces — Dedicate the graphics device to one guest Software and Services Group 4
  • 5. Agenda • Graphics Virtualization Introduction • Graphics Pass-through with VT-d • Performance • Conclusion Software and Services Group 5
  • 6. PCI Pass-through with VT-d • Assign a physical device to a guest directly Domain 0 Domain 1 • Guest accesses the device directly Native with minimal hypervisor intervention driver QEMU • Physical device accesses guest’s memory directly with help of VT-d Xen Hypervisor • Interrupt will be injected to guest through hypervisor Hardware • PCI Configuration Space Access needs trap-and-emulation Software and Services Group 6
  • 7. Challenges of Graphics Pass-through • Legacy VGA resources — Legacy VGA I/O ports and frame buffers are at fixed locations • I/O ports: 0x3B0 – 0x3BB, 0x3C0 – 0x3DF • Frame buffer: 0xA0000 – 0xBFFFF • Graphics device re-initialization in guest — Execute Video BIOS — But Video BIOS bits may be truncated or modified after initialization in host, thus cannot be re-executed correctly • Secondary graphics pass-through — The secondary graphics device doesn’t claim VGA cycle • Additional challenges on integrated graphics device (IGD) — May have assumptions on host chipset or BIOS Software and Services Group 7
  • 8. Primary Discrete Graphics Device • Legacy VGA resources — 1:1 map legacy VGA resources • Video BIOS For Video BIOS without re-execution issue: — Extract video BIOS from host address 0xC0000 — Copy video BIOS to guest address 0xC0000 For Video BIOS with re-execution issue: — Get video BIOS from graphics device via tools (e.g. NiBiTor) — Load video BIOS file to guest ROMs — Copy video BIOS to guest address 0xC0000 Software and Services Group 8
  • 9. Secondary Discrete Graphics Device • Legacy VGA resources — 1:1 map legacy VGA resources • Video BIOS — Get video BIOS from graphics device via tools (e.g. NiBiTor) — Load video BIOS file to guest ROMs — Copy video BIOS to guest address 0xC0000 • Claim VGA cycle — Enable VGA on its PCI bridge Software and Services Group 9
  • 10. Intel Integrated Graphics Device • Extra changes required to handle assumptions on host chipset or BIOS • Intel Q45 IGD: — Assumptions on chipset • Graphics Control Register: 0x52 – 0x53 – Specify the amount of graphics memory allocated from system memory • Vendor ID and Device ID – Linux loads its driver only if it’s a compatible chipset Solution: Pass-through some registers of host bridge — Assumptions on device BDF (Bus:Device.Function) • Video BIOS hardcode the BDF to 00:02.0 Solution: Assign BDF 00:02.0 to IGD in guest — Vendor specific FLR (Function Level Reset) • FLR capability is not exposed, Solution: need specific logic to locate it and perform FLR Software and Services Group 10
  • 11. Agenda • Graphics Virtualization Introduction • Graphics Pass-through with VT-d • Performance • Conclusion Software and Services Group 11
  • 12. Test Environment • GPU: Intel Integrated Graphics on Intel Q45 Chipset • Native — One CPU — Memory 1G • Guest — One Virtual CPU — Memory 1G • Operating System — Vista Enterprise 32-bit — WDDM driver • Xen 3.4 • 3DMark06 Software and Services Group 12
  • 13. 1.3148E-10 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Results Return To Proxycon Firefly Forest CPU1 - Red Valley CPU2 - Red Valley Fill Rate - Single-Texturing Fill Rate - Multi-Texturing Pixel Shader Vertex Shader - Simple Vertex Shader - Complex HDR-1 HDR-2 Software and Services Group Perlin noise Guest/Native 13
  • 14. Agenda • Graphics Virtualization Introduction • Graphics Pass-through with VT-d • Performance • Conclusion Software and Services Group 14
  • 15. Conclusion • Graphics pass-through has special challenges • Xen now supports graphics pass-through: — IGD pass-through patch was sent out in xen-devel mailing list, still under review • Graphics pass-through achieves good performance Software and Services Group 15
  • 16. Questions? Software and Services Group 16
  • 17. Backup Software and Services Group 17
  • 18. Specific Hacks for Graphics Pass-through • Some graphics devices are virtualization unfriendly • 1:1 map physical BARs and virtual BARs — Some discrete graphics devices (e.g. nVidia Geforce 8400 GS) seem to use the BAR registers in hardware for address decoding of memory requests • Don’t remove shadows of MMIO direct — When pass-through some graphics devices to Vista or Win7 guest, it will remove shadows of MMIO direct, then results in system crash Software and Services Group 18
  • 19. Legal Information INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL® PRODUCTS. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY RELATING TO SALE AND/OR USE OF INTEL PRODUCTS, INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT, OR OTHER INTELLECTUAL PROPERTY RIGHT. Intel may make changes to specifications, product descriptions, and plans at any time, without notice. All dates provided are subject to change without notice. Intel is a trademark of Intel Corporation in the U.S. and other countries. *Other names and brands may be claimed as the property of others. Copyright © 2007, Intel Corporation. All rights are protected. Software and Services Group 19