SlideShare a Scribd company logo
Multiple Device
Emulators for HVM
Guests
Paul Durrant
Principal Software Engineer, Citrix
Agenda
“What we’ve done with device emulation in XenServer and what
we’re planning to do”
• Background
• How device emulation is done for an HVM guest
• nVidia GRID vGPU
• Current implementation of vGPU
• Future implementation of vGPU
• Potential spin-off work
How are devices emulated for an HVM guest?
Guest

DOM0
QEMU

PIO

MMIO

Instruction
Trap

Page Fault

VMEXIT

Xen
IOREQ

RTC,
HPET,
etc.

Problem:
• All device emulation has to be done directly in Xen or in a single
emulator i.e. QEMU
nVidia GRID Virtual GPU
Windows
Guest
OpenGL

Device Model
DirectX

Standard
Hardware
Driver

Kernel Driver

Xen
Need an emulator
for this bit

GRID GPU
nVidia GRID Virtual GPU
• Build into Xen?
• Closed source codebase
• GPL problems
• Needs hooks into VGA
• Build into QEMU?
• Large patch
• Maintenance issue
• Binary plugin interface
• Unlikely to gain traction upstream
“Neither of those sounds good. Is there another way?”
IOREQ Server Abstraction
• Based on patch created by Julien Grall from XenClient

HVM_PARAM_DM_DOMAIN
HVM_PARAM_IOREQ_PFN
vcpu[X].arch.hvm_vcpu.xen_port
HVM_PARAM_BUFIOREQ_PFN

HVM_PARAM_BUFIOREQ_EVTCHN

IOREQ
Server
Multiple Emulators
Guest
EMU0

PIO

EMU1

MMIO

Instruction
Trap

Page Fault

VMEXIT

Xen
IOREQ
IOREQ

IOREQ
Server
Table

IOREQ Server Table:
• Demux on port address, memory address or PCI BDF
Where XenServer vGPU is now
• Emulator process for each vGPU
• Wrapper for nVidia plugin
• Runs in dom0
• Patched QEMU
• Stripped out graphics device model
• Uses IOREQ Server API
“That doesn’t sound ideal”
Where XenServer vGPU is going
• ‘Appliance’ VM for vGPU
• Pass GPU through
• vGPU emulators
• Use IOREQ Server API to register
• libVNC based console
• Unpatched QEMU
• No graphics emulation required
• Uses old HVM_PARAM interface
• Instantiates ‘catch all’ IOREQ server
“Multiple emulators sound cool. What else could we do with them?”
Service Domains
Storage

PV

Guest

EMU

Network

PV
EMU

Xen

Co-locate emulators and PV backends:
• No need to build complex emulated-to-PV data paths
“Does this mean we’re not going to use QEMU any more?”
QEMU Disaggregation
• We still want to use QEMU for most devices, but we want to use
several instances
• May be issues separating device emulation from machine
emulation
• Work already done by Julien
• ‘Unplug’ becomes a problem
Idea
• New HVMOPs to request unplug
• Usual IOREQs issued to ‘catch-all’ emulator for compatibility
• New emulators receive new UNPLUG IOREQs
• If no ‘catch-all’ is present then we may be able to unplug
individual devices
• Xen Platform ‘fixed IO port’ emulation handled in Xen
• Maps onto new HVMOP code
• Needs prototyping
Q&A

More Related Content

PDF
Open Source Citrix Windows PV Drivers - Paul Durrant, Citrix
PDF
Xen Project: Windows PV Drivers
PDF
Citrix certified administrator certification
PDF
LFNW2014 Advanced Security Features of Xen Project Hypervisor
PDF
XPDS14 - Xen in EFI World - Daniel Kiper, Oracle
PDF
Xen and the art of embedded virtualization (ELC 2017)
PPTX
Xen Project CI for OpenStack Overview
PDF
Rootlinux17: An introduction to Xen Project Virtualisation
Open Source Citrix Windows PV Drivers - Paul Durrant, Citrix
Xen Project: Windows PV Drivers
Citrix certified administrator certification
LFNW2014 Advanced Security Features of Xen Project Hypervisor
XPDS14 - Xen in EFI World - Daniel Kiper, Oracle
Xen and the art of embedded virtualization (ELC 2017)
Xen Project CI for OpenStack Overview
Rootlinux17: An introduction to Xen Project Virtualisation

What's hot (20)

PDF
XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
PDF
XPDS16: Xen Project Weather Report 2016
PDF
XPDS16: Xen Orchestra: building a Cloud on top of Xen - Olivier Lambert & Jul...
PDF
ELC21: VM-to-VM Communication Mechanisms for Embedded
PDF
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
PPTX
XPDDS18: Windows PV Drivers Project: Status and Updates - Paul Durrant, Citri...
PDF
Xen, XenServer, and XAPI: What’s the Difference?-XPUS13 Bulpin,Pavlicek
PDF
XPDS16: Xen Development Update
PDF
Xen Project for ARM Servers
PDF
XPDS16: The OpenXT Project in 2016 - Christopher Clark, BAE Systems
PPT
PDF
XPDS16: Xen Scalability Analysis - Weidong Han, Zhichao Huang & Wei Yang, Huawei
PDF
Virtualization with KVM (Kernel-based Virtual Machine)
PDF
OWF: Xen - Open Source Hypervisor Designed for Clouds
PDF
XPDS16: Hypervisor Enforced Data Loss Prevention - Neil Sikka, A1LOGIC
PDF
XPDS16: CPUID handling for guests - Andrew Cooper, Citrix
PDF
Hypervisors and Virtualization - VMware, Hyper-V, XenServer, and KVM
PDF
PVH : PV Guest in HVM container
PDF
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
PDF
Advanced Docker Developer Workflows on MacOS X and Windows
XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
XPDS16: Xen Project Weather Report 2016
XPDS16: Xen Orchestra: building a Cloud on top of Xen - Olivier Lambert & Jul...
ELC21: VM-to-VM Communication Mechanisms for Embedded
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
XPDDS18: Windows PV Drivers Project: Status and Updates - Paul Durrant, Citri...
Xen, XenServer, and XAPI: What’s the Difference?-XPUS13 Bulpin,Pavlicek
XPDS16: Xen Development Update
Xen Project for ARM Servers
XPDS16: The OpenXT Project in 2016 - Christopher Clark, BAE Systems
XPDS16: Xen Scalability Analysis - Weidong Han, Zhichao Huang & Wei Yang, Huawei
Virtualization with KVM (Kernel-based Virtual Machine)
OWF: Xen - Open Source Hypervisor Designed for Clouds
XPDS16: Hypervisor Enforced Data Loss Prevention - Neil Sikka, A1LOGIC
XPDS16: CPUID handling for guests - Andrew Cooper, Citrix
Hypervisors and Virtualization - VMware, Hyper-V, XenServer, and KVM
PVH : PV Guest in HVM container
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
Advanced Docker Developer Workflows on MacOS X and Windows
Ad

Similar to Multiple Device Emulators for HVM Guests, Paul Durrant, Citrix (20)

PDF
RMLL / LSM 2009
PDF
Rmll Virtualization As Is Tool 20090707 V1.0
PPTX
Using Packer to Migrate XenServer Infrastructure to CloudStack
PDF
Virtualization, The future of computing (archived)
PDF
Virtualization
PPTX
17-virtualization.pptx
PPTX
Making IT Easier to Manage Your Virtualized Environment - David Babbitt, Spic...
PDF
Virtualization-the Cloud Enabler by INSPIRE-groups
PPTX
Vcp6.7 episode 1
PDF
Device virtualization and management in xen
PPT
Virtualization Manager 5.0 – Now with Hyper-V Support!
PDF
2virtualizationtechnologyoverview 13540659831745-phpapp02-121127193019-phpapp01
PDF
Small Python Tools for Software Release Engineering
PDF
Ian Pratt Nsdi Keynote Apr2008
PDF
GPU Virtualization in SUSE
PPTX
Virtualization using VMWare Workstation
PPT
virtual machine.ppt
PDF
Vagrant Binding JayDay 2013
PPT
Cloud-computing.ppt
PDF
[OpenStack Day in Korea 2015] Track 1-4 - VDI OpenStack? It Works!!!
RMLL / LSM 2009
Rmll Virtualization As Is Tool 20090707 V1.0
Using Packer to Migrate XenServer Infrastructure to CloudStack
Virtualization, The future of computing (archived)
Virtualization
17-virtualization.pptx
Making IT Easier to Manage Your Virtualized Environment - David Babbitt, Spic...
Virtualization-the Cloud Enabler by INSPIRE-groups
Vcp6.7 episode 1
Device virtualization and management in xen
Virtualization Manager 5.0 – Now with Hyper-V Support!
2virtualizationtechnologyoverview 13540659831745-phpapp02-121127193019-phpapp01
Small Python Tools for Software Release Engineering
Ian Pratt Nsdi Keynote Apr2008
GPU Virtualization in SUSE
Virtualization using VMWare Workstation
virtual machine.ppt
Vagrant Binding JayDay 2013
Cloud-computing.ppt
[OpenStack Day in Korea 2015] Track 1-4 - VDI OpenStack? It Works!!!
Ad

More from The Linux Foundation (20)

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

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Electronic commerce courselecture one. Pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Empathic Computing: Creating Shared Understanding
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Cloud computing and distributed systems.
PPT
Teaching material agriculture food technology
PPTX
Spectroscopy.pptx food analysis technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
A comparative analysis of optical character recognition models for extracting...
A Presentation on Artificial Intelligence
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Network Security Unit 5.pdf for BCA BBA.
Diabetes mellitus diagnosis method based random forest with bat algorithm
Electronic commerce courselecture one. Pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Empathic Computing: Creating Shared Understanding
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
NewMind AI Weekly Chronicles - August'25-Week II
Programs and apps: productivity, graphics, security and other tools
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Cloud computing and distributed systems.
Teaching material agriculture food technology
Spectroscopy.pptx food analysis technology
Chapter 3 Spatial Domain Image Processing.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
MIND Revenue Release Quarter 2 2025 Press Release
The AUB Centre for AI in Media Proposal.docx
A comparative analysis of optical character recognition models for extracting...

Multiple Device Emulators for HVM Guests, Paul Durrant, Citrix

  • 1. Multiple Device Emulators for HVM Guests Paul Durrant Principal Software Engineer, Citrix
  • 2. Agenda “What we’ve done with device emulation in XenServer and what we’re planning to do” • Background • How device emulation is done for an HVM guest • nVidia GRID vGPU • Current implementation of vGPU • Future implementation of vGPU • Potential spin-off work
  • 3. How are devices emulated for an HVM guest? Guest DOM0 QEMU PIO MMIO Instruction Trap Page Fault VMEXIT Xen IOREQ RTC, HPET, etc. Problem: • All device emulation has to be done directly in Xen or in a single emulator i.e. QEMU
  • 4. nVidia GRID Virtual GPU Windows Guest OpenGL Device Model DirectX Standard Hardware Driver Kernel Driver Xen Need an emulator for this bit GRID GPU
  • 5. nVidia GRID Virtual GPU • Build into Xen? • Closed source codebase • GPL problems • Needs hooks into VGA • Build into QEMU? • Large patch • Maintenance issue • Binary plugin interface • Unlikely to gain traction upstream “Neither of those sounds good. Is there another way?”
  • 6. IOREQ Server Abstraction • Based on patch created by Julien Grall from XenClient HVM_PARAM_DM_DOMAIN HVM_PARAM_IOREQ_PFN vcpu[X].arch.hvm_vcpu.xen_port HVM_PARAM_BUFIOREQ_PFN HVM_PARAM_BUFIOREQ_EVTCHN IOREQ Server
  • 8. Where XenServer vGPU is now • Emulator process for each vGPU • Wrapper for nVidia plugin • Runs in dom0 • Patched QEMU • Stripped out graphics device model • Uses IOREQ Server API “That doesn’t sound ideal”
  • 9. Where XenServer vGPU is going • ‘Appliance’ VM for vGPU • Pass GPU through • vGPU emulators • Use IOREQ Server API to register • libVNC based console • Unpatched QEMU • No graphics emulation required • Uses old HVM_PARAM interface • Instantiates ‘catch all’ IOREQ server “Multiple emulators sound cool. What else could we do with them?”
  • 10. Service Domains Storage PV Guest EMU Network PV EMU Xen Co-locate emulators and PV backends: • No need to build complex emulated-to-PV data paths “Does this mean we’re not going to use QEMU any more?”
  • 11. QEMU Disaggregation • We still want to use QEMU for most devices, but we want to use several instances • May be issues separating device emulation from machine emulation • Work already done by Julien • ‘Unplug’ becomes a problem
  • 12. Idea • New HVMOPs to request unplug • Usual IOREQs issued to ‘catch-all’ emulator for compatibility • New emulators receive new UNPLUG IOREQs • If no ‘catch-all’ is present then we may be able to unplug individual devices • Xen Platform ‘fixed IO port’ emulation handled in Xen • Maps onto new HVMOP code • Needs prototyping
  • 13. Q&A