SlideShare una empresa de Scribd logo
1 de 19
Descargar para leer sin conexión
Towards a configurable and slimmer x86
hypervisor
Liu Wei
Budapest – July 11-13, 2017
Current state of affairs
PV mode: no hardware extension needed, used in legacy
systems, useful in certain cases like running unikernel and
nested-virt without vVMX or vSVM
HVM mode: needs hardware support and QEMU for
emulation, has become the mainstream Xen VM mode
PVH mode: essentially HVM without QEMU, under
development
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 2 / 19
Two (big) projects
Splitting PV and HVM code: Refactor x86 hypervisor code.
Make guest supporting code configurable via Kconfig
PV ABI in PVH container: Implement a PV ABI shim. Use it
to translate PV hypercalls into PVH ones when necessary
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 3 / 19
Why splitting PV and HVM code?
Users can pick and choose the guest interfaces
Smaller binary, smaller attack surface
Reclaim precious address space if PV is disabled, to let Xen
support >16TB host memory more easily
Improve x86 hypervisor code base
*NOT* intending to kill PV in the hypervisor
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 4 / 19
Xen x86 PV memory layout
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 5 / 19
The conceptual map of code
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 6 / 19
The reality
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 7 / 19
Current code
do foo ( . . . )
{
/∗ . . . ∗/
i f (hvm) {
do foo hvm ( ) ;
return ;
}
/∗ l o t s of code to do foo f o r pv ∗/
return ;
}
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 8 / 19
Current code
do bar ( . . . )
{
/∗ . . . ∗/
i f (hvm) { /∗ Some code ∗/ };
i f ( pv ) { /∗ Some code ∗/ };
/∗ l o t s of code f o r common case ∗/
i f (hvm) { /∗ Some code ∗/ };
i f ( pv ) { /∗ Some code ∗/ };
return ;
}
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 9 / 19
Future code
do baz ( . . . )
{
/∗ code f o r common case ∗/
i f (hvm)
do baz hvm ( ) ;
i f ( pv )
do baz pv ( ) ;
return ;
}
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 10 / 19
Game plan for splitting PV and HVM code
Identify all the components that need refactoring
Dom0 builder
Domain handling code
Trap handling code
Memory management code
Guest memory accessor
...
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 11 / 19
Game plan for splitting PV and HVM code
Coarse-grained refactoring – mostly for PV code
Move code around
Split code into manageable trunks
Do some basic cleanups:
Use better function names
Use better coding style
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 12 / 19
Game plan for splitting PV and HVM code
Fine-grained refactoring – for both PV and HVM code
Abstract out a set of guest interfaces
Adjust internal interfaces between components if necessary
Fix x86 common code
Make PV and HVM configurable
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 13 / 19
Why PV ABI in PVH container?
Continue to support PV in a more secure manner
Have more than 128GB worth of 32bit PV guests
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 14 / 19
PV ABI in PVH container
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 15 / 19
Game plan for PV ABI in PVH container
Build the PV shim – essentially a stripped-down Xen
hypervisor
Go through all PV hypercall handlers, categorize them into the
aforementeioned groups
Further refactor PV guest supporting code: provide the ”real
PV” handlers and ”PV shim” handlers while sharing as much
code as possible
Change the build system to pull in the right objects
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 16 / 19
Game plan for PV ABI in PVH container
Adjust Xen toolstack
Construct a PVH guest while using the PV shim as ”firmware”
Further improvements (open questions at the moment)
Provide mechanism to parse guest kernel inside the container,
something like pvgrub
Provide mechanism to pass-through PCI devices (if that’s still
relevant)
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 17 / 19
Current status
Doing coarse-grained refactoring:
Dom0 builder (done)
Domain handling code (done)
Trap handling code (done)
Memory management code (doing)
Guest memory accessor
...
ETA: Some point in the future :)
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 18 / 19
Q&A
Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 19 / 19

Más contenido relacionado

La actualidad más candente

ops300 Week5 storage (1)
ops300 Week5 storage (1)ops300 Week5 storage (1)
ops300 Week5 storage (1)
trayyoo
 

La actualidad más candente (20)

Make room! Make room!
Make room! Make room!Make room! Make room!
Make room! Make room!
 
Ceph on Windows
Ceph on WindowsCeph on Windows
Ceph on Windows
 
XPDS16: Keeping coherency on ARM - Julien Grall, ARM
XPDS16: Keeping coherency on ARM - Julien Grall, ARMXPDS16: Keeping coherency on ARM - Julien Grall, ARM
XPDS16: Keeping coherency on ARM - Julien Grall, ARM
 
XPDDS17: Recent and Ongoing Xen Related Work in the Linux Kernel - Jürgen Gr...
XPDDS17:  Recent and Ongoing Xen Related Work in the Linux Kernel - Jürgen Gr...XPDDS17:  Recent and Ongoing Xen Related Work in the Linux Kernel - Jürgen Gr...
XPDDS17: Recent and Ongoing Xen Related Work in the Linux Kernel - Jürgen Gr...
 
XPDS14 - OSv - A Modern Semi-POSIX LibraryOS - Glauber Costa, Cloudius Systems
XPDS14 - OSv - A Modern Semi-POSIX LibraryOS - Glauber Costa, Cloudius SystemsXPDS14 - OSv - A Modern Semi-POSIX LibraryOS - Glauber Costa, Cloudius Systems
XPDS14 - OSv - A Modern Semi-POSIX LibraryOS - Glauber Costa, Cloudius Systems
 
Ceph RBD Update - June 2021
Ceph RBD Update - June 2021Ceph RBD Update - June 2021
Ceph RBD Update - June 2021
 
Integration of Glusterfs in to commvault simpana
Integration of Glusterfs in to commvault simpanaIntegration of Glusterfs in to commvault simpana
Integration of Glusterfs in to commvault simpana
 
2021.06. Ceph Project Update
2021.06. Ceph Project Update2021.06. Ceph Project Update
2021.06. Ceph Project Update
 
CephFS Update
CephFS UpdateCephFS Update
CephFS Update
 
ops300 Week5 storage (1)
ops300 Week5 storage (1)ops300 Week5 storage (1)
ops300 Week5 storage (1)
 
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
Deploying CloudStack and Ceph with flexible VXLAN and BGP networking
 
Bsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessionsBsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessions
 
Proxmox ve-datasheet
Proxmox ve-datasheetProxmox ve-datasheet
Proxmox ve-datasheet
 
Building For Mer
Building For MerBuilding For Mer
Building For Mer
 
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
 
Docker + GCE + etcd + ray tracing
Docker + GCE + etcd + ray tracingDocker + GCE + etcd + ray tracing
Docker + GCE + etcd + ray tracing
 
Docker infiniband
Docker infinibandDocker infiniband
Docker infiniband
 
Linux based Stubdomains
Linux based StubdomainsLinux based Stubdomains
Linux based Stubdomains
 
Accessing gluster ufo_-_eco_willson
Accessing gluster ufo_-_eco_willsonAccessing gluster ufo_-_eco_willson
Accessing gluster ufo_-_eco_willson
 
2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard2021.02 new in Ceph Pacific Dashboard
2021.02 new in Ceph Pacific Dashboard
 

Similar a XPDDS17: Keynote: Towards a Configurable and Slimmer x86 Hypervisor - Wei Liu, Citrix

OpenNebulaConf2017EU: Transforming an Old Supercomputer into a Cloud Platform...
OpenNebulaConf2017EU: Transforming an Old Supercomputer into a Cloud Platform...OpenNebulaConf2017EU: Transforming an Old Supercomputer into a Cloud Platform...
OpenNebulaConf2017EU: Transforming an Old Supercomputer into a Cloud Platform...
OpenNebula Project
 

Similar a XPDDS17: Keynote: Towards a Configurable and Slimmer x86 Hypervisor - Wei Liu, Citrix (20)

Fosdem 17 - Towards a HVM-like Dom0 for Xen
Fosdem 17 - Towards a HVM-like Dom0 for XenFosdem 17 - Towards a HVM-like Dom0 for Xen
Fosdem 17 - Towards a HVM-like Dom0 for Xen
 
BSDCan 2015: How to Port BSD as a Xen on ARM Guest
BSDCan 2015: How to Port BSD as a Xen on ARM GuestBSDCan 2015: How to Port BSD as a Xen on ARM Guest
BSDCan 2015: How to Port BSD as a Xen on ARM Guest
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
 
Hyper-v Storage
Hyper-v StorageHyper-v Storage
Hyper-v Storage
 
PBX on a non-specialized distro
PBX on a non-specialized distroPBX on a non-specialized distro
PBX on a non-specialized distro
 
2014 - 6 - Paving the way to a virtualized base station
2014 - 6 - Paving the way to a virtualized base station2014 - 6 - Paving the way to a virtualized base station
2014 - 6 - Paving the way to a virtualized base station
 
CloudStack IPv6 in production
CloudStack IPv6 in productionCloudStack IPv6 in production
CloudStack IPv6 in production
 
BDE_SC4_WS3_6_Luigi Selmi - Pilot SC4
BDE_SC4_WS3_6_Luigi Selmi - Pilot SC4BDE_SC4_WS3_6_Luigi Selmi - Pilot SC4
BDE_SC4_WS3_6_Luigi Selmi - Pilot SC4
 
Ceph Day Bring Ceph To Enterprise
Ceph Day Bring Ceph To EnterpriseCeph Day Bring Ceph To Enterprise
Ceph Day Bring Ceph To Enterprise
 
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
 
Arm versus x86
Arm versus x86Arm versus x86
Arm versus x86
 
Ceph Day Tokyo - Bring Ceph to Enterprise
Ceph Day Tokyo - Bring Ceph to Enterprise Ceph Day Tokyo - Bring Ceph to Enterprise
Ceph Day Tokyo - Bring Ceph to Enterprise
 
Ceph Day Taipei - Bring Ceph to Enterprise
Ceph Day Taipei - Bring Ceph to EnterpriseCeph Day Taipei - Bring Ceph to Enterprise
Ceph Day Taipei - Bring Ceph to Enterprise
 
Storage based on_openstack_mariocho
Storage based on_openstack_mariochoStorage based on_openstack_mariocho
Storage based on_openstack_mariocho
 
Using containers and Continuous Packaging to Build native FOSSology packages
Using containers and Continuous Packaging to Build native FOSSology packagesUsing containers and Continuous Packaging to Build native FOSSology packages
Using containers and Continuous Packaging to Build native FOSSology packages
 
[ElastixWorld 2016] mediasoup: Powerful WebRTC SFU for Node.js
[ElastixWorld 2016] mediasoup: Powerful WebRTC SFU for Node.js[ElastixWorld 2016] mediasoup: Powerful WebRTC SFU for Node.js
[ElastixWorld 2016] mediasoup: Powerful WebRTC SFU for Node.js
 
Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6
 
Hyper-V 2008 R2 Best Practices
Hyper-V 2008 R2 Best PracticesHyper-V 2008 R2 Best Practices
Hyper-V 2008 R2 Best Practices
 
OpenNebulaConf2017EU: Transforming an Old Supercomputer into a Cloud Platform...
OpenNebulaConf2017EU: Transforming an Old Supercomputer into a Cloud Platform...OpenNebulaConf2017EU: Transforming an Old Supercomputer into a Cloud Platform...
OpenNebulaConf2017EU: Transforming an Old Supercomputer into a Cloud Platform...
 
Ceph Day Berlin: Ceph and iSCSI in a high availability setup
Ceph Day Berlin: Ceph and iSCSI in a high availability setupCeph Day Berlin: Ceph and iSCSI in a high availability setup
Ceph Day Berlin: Ceph and iSCSI in a high availability setup
 

Más de The Linux Foundation

Más 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: [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
 
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information SecurityXPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

XPDDS17: Keynote: Towards a Configurable and Slimmer x86 Hypervisor - Wei Liu, Citrix

  • 1. Towards a configurable and slimmer x86 hypervisor Liu Wei Budapest – July 11-13, 2017
  • 2. Current state of affairs PV mode: no hardware extension needed, used in legacy systems, useful in certain cases like running unikernel and nested-virt without vVMX or vSVM HVM mode: needs hardware support and QEMU for emulation, has become the mainstream Xen VM mode PVH mode: essentially HVM without QEMU, under development Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 2 / 19
  • 3. Two (big) projects Splitting PV and HVM code: Refactor x86 hypervisor code. Make guest supporting code configurable via Kconfig PV ABI in PVH container: Implement a PV ABI shim. Use it to translate PV hypercalls into PVH ones when necessary Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 3 / 19
  • 4. Why splitting PV and HVM code? Users can pick and choose the guest interfaces Smaller binary, smaller attack surface Reclaim precious address space if PV is disabled, to let Xen support >16TB host memory more easily Improve x86 hypervisor code base *NOT* intending to kill PV in the hypervisor Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 4 / 19
  • 5. Xen x86 PV memory layout Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 5 / 19
  • 6. The conceptual map of code Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 6 / 19
  • 7. The reality Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 7 / 19
  • 8. Current code do foo ( . . . ) { /∗ . . . ∗/ i f (hvm) { do foo hvm ( ) ; return ; } /∗ l o t s of code to do foo f o r pv ∗/ return ; } Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 8 / 19
  • 9. Current code do bar ( . . . ) { /∗ . . . ∗/ i f (hvm) { /∗ Some code ∗/ }; i f ( pv ) { /∗ Some code ∗/ }; /∗ l o t s of code f o r common case ∗/ i f (hvm) { /∗ Some code ∗/ }; i f ( pv ) { /∗ Some code ∗/ }; return ; } Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 9 / 19
  • 10. Future code do baz ( . . . ) { /∗ code f o r common case ∗/ i f (hvm) do baz hvm ( ) ; i f ( pv ) do baz pv ( ) ; return ; } Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 10 / 19
  • 11. Game plan for splitting PV and HVM code Identify all the components that need refactoring Dom0 builder Domain handling code Trap handling code Memory management code Guest memory accessor ... Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 11 / 19
  • 12. Game plan for splitting PV and HVM code Coarse-grained refactoring – mostly for PV code Move code around Split code into manageable trunks Do some basic cleanups: Use better function names Use better coding style Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 12 / 19
  • 13. Game plan for splitting PV and HVM code Fine-grained refactoring – for both PV and HVM code Abstract out a set of guest interfaces Adjust internal interfaces between components if necessary Fix x86 common code Make PV and HVM configurable Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 13 / 19
  • 14. Why PV ABI in PVH container? Continue to support PV in a more secure manner Have more than 128GB worth of 32bit PV guests Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 14 / 19
  • 15. PV ABI in PVH container Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 15 / 19
  • 16. Game plan for PV ABI in PVH container Build the PV shim – essentially a stripped-down Xen hypervisor Go through all PV hypercall handlers, categorize them into the aforementeioned groups Further refactor PV guest supporting code: provide the ”real PV” handlers and ”PV shim” handlers while sharing as much code as possible Change the build system to pull in the right objects Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 16 / 19
  • 17. Game plan for PV ABI in PVH container Adjust Xen toolstack Construct a PVH guest while using the PV shim as ”firmware” Further improvements (open questions at the moment) Provide mechanism to parse guest kernel inside the container, something like pvgrub Provide mechanism to pass-through PCI devices (if that’s still relevant) Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 17 / 19
  • 18. Current status Doing coarse-grained refactoring: Dom0 builder (done) Domain handling code (done) Trap handling code (done) Memory management code (doing) Guest memory accessor ... ETA: Some point in the future :) Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 18 / 19
  • 19. Q&A Budapest – July 11-13, 2017 Towards a configurable and slimmer x86 hypervisor 19 / 19