SlideShare a Scribd company logo
Linux PV on HVM


paravirtualized interfaces in HVM guests




            Stefano Stabellini
Linux as a guests: problems

Linux PV guests have limitations:
- difficult “different” to install
- some performance issue on 64 bit
- limited set of virtual hardware

Linux HVM guests:
- install the same way as native
- very slow
Linux PV on HVM: the solution

- install the same way as native

- PC-like hardware

- access to fast paravirtualized devices

- exploit nested paging
Linux PV on HVM: initial feats
Initial version in Linux 2.6.36:


- introduce the xen platform device driver
- add support for HVM hypercalls, xenbus and
  grant table
- enables blkfront, netfront and PV timers
- add support to PV suspend/resume
- the vector callback mechanism
Old style event injection
Receiving an interrupt


do_IRQ
   handle_fasteoi_irq
         handle_irq_event
             xen_evtchn_do_upcall
         ack_apic_level ←   >=3 VMEXIT
The new vector callback
Receiving a vector callback




xen_evtchn_do_upcall
Linux PV on HVM: newer feats

Later enhancements (2.6.37+):
- ballooning
- PV spinlocks
- PV IPIs
- Interrupt remapping onto event channels
- MSI remapping onto event channels
Interrupt remapping
MSI remapping
PV spectrum

             HVM guests      Classic          Enhanced        Hybrid PV     PV guests
                           PV on HVM         PV on HVM        on HVM
Boot          emulated      emulated          emulated                    paravirtualized
sequence
Memory        hardware      hardware          hardware                    paravirtualized

Interrupts    emulated      emulated        paravirtualized               paravirtualized

Timers        emulated      emulated        paravirtualized               paravirtualized

Spinlocks     emulated      emulated        paravirtualized               paravirtualized

Disk          emulated    paravirtualized   paravirtualized               paravirtualized

Network       emulated    paravirtualized   paravirtualized               paravirtualized

Privileged    hardware      hardware          hardware                    paravirtualized
operations
Benchmarks: the setup

Hardware setup:
Dell PowerEdge R710
CPU: dual Intel Xeon E5520 quad core CPUs @ 2.27GHz
RAM: 22GB

Software setup:
Xen 4.1, 64 bit
Dom0 Linux 2.6.32, 64 bit
DomU Linux 3.0 rc4, 8GB of memory, 8 vcpus
PCI passthrough: benchmark
PCI passthrough of an Intel Gigabit NIC
CPU usage: the lower the better:
 200


 180


 160


 140


 120


 100
                                                        CPU usage domU
  80
                                                        CPU usage dom0

  60


  40


  20


   0

         interrupt remapping   no interrupt remapping
Kernbench
      Results: percentage of native, the lower the better
140

135

130

125

120

115

110

105

100

 95

 90
                         PV on HVM 32 bit                HVM 32 bit               PV 32 bit
      PV on HVM 64 bit                      HVM 64 bit                PV 64 bit
Kernbench
  Results: percentage of native, the lower the better
140

135

130

125

120

115

110

105

100

 95

 90
                   PV on HVM 32 bit              HVM 64 bit                PV 64 bit
      PV on HVM 64 bit              KVM 64 bit                HVM 32 bit               PV 32 bit
PBZIP2
Results: percentage of native, the lower the better
 160


 150


 140


 130


 120


 110


 100
       PV on HVM 64 bit   PV 64 bit   PV on HVM 32 bit   PV 32 bit
PBZIP2
Results: percentage of native, the lower the better
 160


 150


 140


 130


 120


 110


 100
       KVM 64 bit   PV on HVM 64 bit   PV 64 bit   PV on HVM 32 bit   PV 32 bit
SPECjbb2005
Results: percentage of native, the higher the better
 100

  90

  80

  70

  60

  50

  40

  30

  20

  10

   0
                PV 64 bit                  PV on HVM 64 bit
SPECjbb2005
Results: percentage of native, the higher the better
 100

  90

  80

  70

  60

  50

  40

  30

  20

  10

   0
           PV 64 bit        PV on HVM 64 bit      KVM 64 bit
Iperf tcp
    Results: gbit/sec, the higher the better
8

7

6

5

4

3

2

1

0
      PV 64 bit   PV on HVM 64 bit PV on HVM 32 bit   PV 32 bit   HVM 64 bit   HVM 32 bit
Iperf tcp
    Results: gbit/sec, the higher the better
8


7


6


5


4


3


2


1


0
     PV 64 bit   PV on HVM 64 bit KVM 64 bit PV on HVM 32 bit   PV 32 bit   HVM 64 bit   HVM 32 bit
Conclusions


PV on HVM guests are very close to PV guests
in benchmarks that favor PV MMUs


PV on HVM guests are far ahead of PV guests
in benchmarks that favor nested paging
Questions?

More Related Content

PDF
Linux PV on HVM
PDF
Nakajima hvm-be final
PPTX
Realtime scheduling for virtual machines in SKT
PDF
I/O Scalability in Xen
PPTX
Link Virtualization based on Xen
PDF
Mobile Virtualization using the Xen Technologies
PDF
ARM Architecture-based System Virtualization: Xen ARM open source software pr...
PDF
Linux Foundation Collaboration Summit 13 :10 years of Xen and Beyond
Linux PV on HVM
Nakajima hvm-be final
Realtime scheduling for virtual machines in SKT
I/O Scalability in Xen
Link Virtualization based on Xen
Mobile Virtualization using the Xen Technologies
ARM Architecture-based System Virtualization: Xen ARM open source software pr...
Linux Foundation Collaboration Summit 13 :10 years of Xen and Beyond

What's hot (20)

PDF
Hypervisor Framework
PDF
XPDS13: HVM Dom0 - Any unmodified OS as Dom0 - Will Auld, Intel
PDF
Running Dual Android Xen Instances on Nexus 10
PPTX
Hyper V R2 Deep Dive
PDF
Xen RAS Status and Progress
PDF
XS Boston 2008 Self IO Emulation
PDF
Project ACRN Device Passthrough Introduction
PDF
kexec / kdump implementation in Linux Kernel and Xen hypervisor
PDF
Xen and the art of embedded virtualization (ELC 2017)
PDF
Linaro connect : Introduction to Xen on ARM
PDF
LCA13: Xen on ARM
PDF
XS Japan 2008 Xen Mgmt English
PPTX
Keynote Speech: Xen ARM Virtualization
PDF
XS Boston 2008 VT-D PCI
PDF
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
PDF
XS Japan 2008 Oracle VM English
PPTX
VMware vSphere 4.1 deep dive - part 1
PDF
Bare-Metal Hypervisor as a Platform for Innovation
PDF
XS Boston 2008 Project Status
PPS
Xen Euro Par07
Hypervisor Framework
XPDS13: HVM Dom0 - Any unmodified OS as Dom0 - Will Auld, Intel
Running Dual Android Xen Instances on Nexus 10
Hyper V R2 Deep Dive
Xen RAS Status and Progress
XS Boston 2008 Self IO Emulation
Project ACRN Device Passthrough Introduction
kexec / kdump implementation in Linux Kernel and Xen hypervisor
Xen and the art of embedded virtualization (ELC 2017)
Linaro connect : Introduction to Xen on ARM
LCA13: Xen on ARM
XS Japan 2008 Xen Mgmt English
Keynote Speech: Xen ARM Virtualization
XS Boston 2008 VT-D PCI
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
XS Japan 2008 Oracle VM English
VMware vSphere 4.1 deep dive - part 1
Bare-Metal Hypervisor as a Platform for Innovation
XS Boston 2008 Project Status
Xen Euro Par07
Ad

Viewers also liked (10)

PPT
Engaging the Xen Developer Comminity
PDF
Skylark: Easy Cloud Computing
PPTX
Xen.org: The past, the present and exciting Future
PPTX
PV-Drivers for SeaBIOS using Upstream Qemu
PDF
Xen in Linux 3.x (or PVOPS)
PPT
Xenalyze: Finding meaning in the chaos
PPT
XCP Project Update
PPT
Hardware accelerated Virtualization in the ARM Cortex™ Processors
PDF
Xen @ Google, 2011
PPT
[피키캐스트] 5학년선배 ppt 템플릿 레이아웃
Engaging the Xen Developer Comminity
Skylark: Easy Cloud Computing
Xen.org: The past, the present and exciting Future
PV-Drivers for SeaBIOS using Upstream Qemu
Xen in Linux 3.x (or PVOPS)
Xenalyze: Finding meaning in the chaos
XCP Project Update
Hardware accelerated Virtualization in the ARM Cortex™ Processors
Xen @ Google, 2011
[피키캐스트] 5학년선배 ppt 템플릿 레이아웃
Ad

Similar to Linux PV on HVM (20)

PDF
Xen PV Performance Status and Optimization Opportunities
PDF
Virtualization Primer for Java Developers
ODP
UDS 2012 Xen
PDF
Highload Frank Kohler
PDF
Xenserver Highload Frank Kohler
PPTX
ARMvisor @ Linux Symposium 2012
PDF
2virtualizationtechnologyoverview 13540659831745-phpapp02-121127193019-phpapp01
PDF
Buiding a better Userspace - The current and future state of QEMU and KVM int...
PPTX
Virtualization of computing and servers
PPTX
Optimizing Virtual Machines Using Hybrid Virtualization
PDF
VMware Performance for Gurus - A Tutorial
PDF
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
PDF
Virtualization Technology Overview
PPTX
Xen Project Update LinuxCon Brazil
PDF
XS Boston 2008 SR-IOV
PPTX
Performance Profiling of Virtual Machines
PDF
XS Boston 2008 Paravirt Ops in Linux IA64
PDF
XenSummit NA 2012: Xen on ARM Cortex A15
PPT
Virtualization (Distributed computing)
PDF
A510840101 24982 23_2020_lecture_2
Xen PV Performance Status and Optimization Opportunities
Virtualization Primer for Java Developers
UDS 2012 Xen
Highload Frank Kohler
Xenserver Highload Frank Kohler
ARMvisor @ Linux Symposium 2012
2virtualizationtechnologyoverview 13540659831745-phpapp02-121127193019-phpapp01
Buiding a better Userspace - The current and future state of QEMU and KVM int...
Virtualization of computing and servers
Optimizing Virtual Machines Using Hybrid Virtualization
VMware Performance for Gurus - A Tutorial
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Virtualization Technology Overview
Xen Project Update LinuxCon Brazil
XS Boston 2008 SR-IOV
Performance Profiling of Virtual Machines
XS Boston 2008 Paravirt Ops in Linux IA64
XenSummit NA 2012: Xen on ARM Cortex A15
Virtualization (Distributed computing)
A510840101 24982 23_2020_lecture_2

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)

PDF
cuic standard and advanced reporting.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Big Data Technologies - Introduction.pptx
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
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation theory and applications.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
cuic standard and advanced reporting.pdf
Electronic commerce courselecture one. Pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
NewMind AI Monthly Chronicles - July 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
Advanced methodologies resolving dimensionality complications for autism neur...
Big Data Technologies - Introduction.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
20250228 LYD VKU AI Blended-Learning.pptx

Linux PV on HVM

  • 1. Linux PV on HVM paravirtualized interfaces in HVM guests Stefano Stabellini
  • 2. Linux as a guests: problems Linux PV guests have limitations: - difficult “different” to install - some performance issue on 64 bit - limited set of virtual hardware Linux HVM guests: - install the same way as native - very slow
  • 3. Linux PV on HVM: the solution - install the same way as native - PC-like hardware - access to fast paravirtualized devices - exploit nested paging
  • 4. Linux PV on HVM: initial feats Initial version in Linux 2.6.36: - introduce the xen platform device driver - add support for HVM hypercalls, xenbus and grant table - enables blkfront, netfront and PV timers - add support to PV suspend/resume - the vector callback mechanism
  • 5. Old style event injection
  • 6. Receiving an interrupt do_IRQ handle_fasteoi_irq handle_irq_event xen_evtchn_do_upcall ack_apic_level ← >=3 VMEXIT
  • 7. The new vector callback
  • 8. Receiving a vector callback xen_evtchn_do_upcall
  • 9. Linux PV on HVM: newer feats Later enhancements (2.6.37+): - ballooning - PV spinlocks - PV IPIs - Interrupt remapping onto event channels - MSI remapping onto event channels
  • 12. PV spectrum HVM guests Classic Enhanced Hybrid PV PV guests PV on HVM PV on HVM on HVM Boot emulated emulated emulated paravirtualized sequence Memory hardware hardware hardware paravirtualized Interrupts emulated emulated paravirtualized paravirtualized Timers emulated emulated paravirtualized paravirtualized Spinlocks emulated emulated paravirtualized paravirtualized Disk emulated paravirtualized paravirtualized paravirtualized Network emulated paravirtualized paravirtualized paravirtualized Privileged hardware hardware hardware paravirtualized operations
  • 13. Benchmarks: the setup Hardware setup: Dell PowerEdge R710 CPU: dual Intel Xeon E5520 quad core CPUs @ 2.27GHz RAM: 22GB Software setup: Xen 4.1, 64 bit Dom0 Linux 2.6.32, 64 bit DomU Linux 3.0 rc4, 8GB of memory, 8 vcpus
  • 14. PCI passthrough: benchmark PCI passthrough of an Intel Gigabit NIC CPU usage: the lower the better: 200 180 160 140 120 100 CPU usage domU 80 CPU usage dom0 60 40 20 0 interrupt remapping no interrupt remapping
  • 15. Kernbench Results: percentage of native, the lower the better 140 135 130 125 120 115 110 105 100 95 90 PV on HVM 32 bit HVM 32 bit PV 32 bit PV on HVM 64 bit HVM 64 bit PV 64 bit
  • 16. Kernbench Results: percentage of native, the lower the better 140 135 130 125 120 115 110 105 100 95 90 PV on HVM 32 bit HVM 64 bit PV 64 bit PV on HVM 64 bit KVM 64 bit HVM 32 bit PV 32 bit
  • 17. PBZIP2 Results: percentage of native, the lower the better 160 150 140 130 120 110 100 PV on HVM 64 bit PV 64 bit PV on HVM 32 bit PV 32 bit
  • 18. PBZIP2 Results: percentage of native, the lower the better 160 150 140 130 120 110 100 KVM 64 bit PV on HVM 64 bit PV 64 bit PV on HVM 32 bit PV 32 bit
  • 19. SPECjbb2005 Results: percentage of native, the higher the better 100 90 80 70 60 50 40 30 20 10 0 PV 64 bit PV on HVM 64 bit
  • 20. SPECjbb2005 Results: percentage of native, the higher the better 100 90 80 70 60 50 40 30 20 10 0 PV 64 bit PV on HVM 64 bit KVM 64 bit
  • 21. Iperf tcp Results: gbit/sec, the higher the better 8 7 6 5 4 3 2 1 0 PV 64 bit PV on HVM 64 bit PV on HVM 32 bit PV 32 bit HVM 64 bit HVM 32 bit
  • 22. Iperf tcp Results: gbit/sec, the higher the better 8 7 6 5 4 3 2 1 0 PV 64 bit PV on HVM 64 bit KVM 64 bit PV on HVM 32 bit PV 32 bit HVM 64 bit HVM 32 bit
  • 23. Conclusions PV on HVM guests are very close to PV guests in benchmarks that favor PV MMUs PV on HVM guests are far ahead of PV guests in benchmarks that favor nested paging