SlideShare une entreprise Scribd logo
1  sur  44
Linux symposium 2012
Jiun-Hung Ding, Chang-Jung Lin, Ping-Hao Chang
Chieh-Hao Tsang, Wei-Chung Hsu, Yeh-Ching Chung

ARMVISOR


                                                  1
Hypervisor on ARM architecture

ARMVISOR


                                 2
KVM

 Linux Kernel module
 Free, open
 Many developers maintain it!!!
 QEMU




                                   3
System Architecture

           Guest



           QEMU
             Device
     Driver Linux KVM

          Hardware
                        4
Trap & emulate


                  Guest OS

    User space     trap

   Kernel space
                   VMM


                             5
Challenges

 ARM is non-virtualizable.
   Sensitive instructions
   Privileged instructions




                              6
Non-virtualizable

    2531 sensitive
       sensitive but
       25 critical
    non-privileged
      instructions
      instructions
      instructions


          6 privileged
          instructions



                         7
Challenges

 ARM is non-virtualizable
   Critical instructions


 Possible solutions
   Hardware support
   Dynamic binary translation (DBT)
   Para-virtualization




                                       8
Implementation

 CPU virtualization
 Memory virtualization
 IO virtualization
 Optimization




                          9
User space                    Kernel space                   Guest Mode
     1. VM initialization

                  2. Return to QEMU

     3. Run VM
                                      4. Enter Guest

                                                       5. Exit Guest
                 Lightweight trap

                                      Enter Guest
               Heavyweight trap
                                                         Exit Guest
                    Return to QEMU

     Run VM
                                      Enter Guest

 QEMU                               KVM                        Guest OS
CPU Virtualization




                     11
CPU Virtualization

 ARM: non-virtualizable ISA
   Para-virtualization


 Manually insert software interrupts (SWI) into
  guest OS




                                                   12
Para-virtualization


…
mov r0, r0
add sp, sp
movs pc, lr
…



                      13
Para-virtualization (cont.)
                    .macro virt_svc_movs, inst
                    SWI 0x190
…                   inst
mov r0, r0
                    .endm
add sp, sp
virt_svc_movs “movs pc, lr”
…



                                             14
UND            ABORT       SWI     IRQ/FIQ



                      KVM Trap Entry

                       KVM/Guest
Host Trap Handler     Context Switch
                          Unit


                    KVM Trap Dispatcher


Instruction MMU     Exception/Interrupt QEMU I/O
Emulation Emulation     Emulation       Emulation
                                                    15
KVM Vector




oxffff1000
                      0x1C         FIQ
                      0x18         IRQ
                      0x14     (Reserved*)
0xffff001c            0x10      Data Abort
             Kernel   0x0C    Prefetch Abort
             Vector   0x08    Software Interrupt
oxffff0000            0x04   Undefined Instruction
                      0x00         Reset
                                                     16
KVM Vector



             The KVM trap
               Interface
oxffff1000


0xffff001c
                 KVM
oxffff0000      Vector

                            17
Memory Virtualization




                        18
GVA
Guest
PTB




        GPA



              19
Shadow Page Tables

 Map guest virtual address to host physical
  address

 For each guest page table (GPT), ARMvisor
  will allocate a shadow page table (SPT) to
  map it.




                                               20
Guest
PTB                    GVA



                       GPA



                             Host
                       HVA   PTB

        New SPTE !!!

                       HPA
                                    21
Emulation Flow
PABT/DABT
                                               Hidden protection fault
   trap



  guest             Guest             MMIO             Shadow             Shadow
page table        permission          access          page table         page table
  walker           checker           checker           mapping            update




             True permission fault             Hidden translation fault


True Translation fault         MMIO emulation

                                                                                  22
Shadow Page Tables

 Map guest virtual address to host physical
  address
 For each guest page table (GPT), ARMvisor
  will allocate a shadow page table (SPT) to
  map it.

 How to keep coherence between SPT and
  GPT?

                                               23
Synchronization

 Write protect page table page
   Modification would cause a protection fault.
   Reverse map (RMAP) : Record reverse mapping
    form guest physical page to SPT entries




                                                   25
Permission Emulation (1)

 Guest OS in non-privileged mode
 Some instructions access kernel space with
  user permission
   LDRBT, LDRT, STRBT, STRT


 Double shadow page table




                                               26
Permission Mapping

 Permission mechanism on ARM
   Permission bits
   Domain
     No access
     Client
     Manager




                                28
Using Domain Mechanism
                      GUD    GKD
 Virtual User Space   CLIENT NA

 Virtual Kernel Space CLIENT CLIENT




                                      29
Optimizations




                30
Virtualization Overhead -CPU

 CPU virtualization
   Frequent lightweight traps result lots of context
    switch


 Try to reduce…
   number of traps
   Overhead of emulation




                                                        31
CPU Optimization

 Shadow file register (SFR)
   Map VCPU’s shadow state of the register file into
    memory region that is both accessible for the
    VMM and guest with RW permission.




                                                        33
mcr cpsr, r1
           oxffff2000
 VCPU
Register      Sync
  File                     Shadow        Read/Write
                         Register File   Instructions



                         KVM/Guest
                        Context Switch
                          Interface
           oxffff1000

                         KVM vector
           oxffff0000                                   34
CPU Optimization

 Shadow file register (SFR)
   Map VCPU’s shadow state of the register file into
    memory region that is both accessible for the
    VMM and guest with RW permission.


 Para-virtualization: Fast instruction trap
   Sets of pre-defined macros which is composed of
    encoded information of the replaced instructions.


                                                        36
Virtualization Overhead –MEM

 Memory virtualization
   Synchronization model


 Try to reduce…
   Protection faults




                               37
Memory Optimization

 Para-virtualization: hyper calls for PT
  modifications
   When Guest OS sets PTEs
   When Guest OS is going to free a L2 page table




                                                     38
Implementation Status




                        39
Experiment Board

 ARMvisor supports ARMv6 & ARMv7
 architecture in host




   ARM v6 11mpcore      ARM v7 cortex-a8


                                           40
Environment

 Host OS: Linux 2.6.35 Ubuntu
 Guest OS: Linux 2.6.31


 LMBench




                                 41
Experiment Data
100

80

60

40

20

 0




            base   cpu opt   mem opt   all opt
                                                 42
16
     Experiment Data
     15.20
14        12.46                                                     12.17
12    11.24                                                     10.81
                     9.37                                                                                9.94
10                                                           8.45              7.97 8.04
8                                                                       7.18
                                   5.78                                                    5.66
6                           4.63
              4.39                                                                                4.41
4
                                          1.89 1.43
2                                                     1.23
0




                                              all opt
                                                                                                          43
Related Work

 VMware MVP
 Xen-ARM
 B LABS CODEZEOR
 OK Labs OKL4
 Virtual Open System




                        44
Conclusion

 ARMvisor supports ARMv6 & ARMv7
  architecture in host
   Support RealView EB and Beagle Board
 CPU and memory optimization gain lots of
  performance improvement
   Reduce traps
   Decrease protection faults




                                             45
Future Work

 I/O optimization
 Support ARM hardware virtualization
  extensions
 Multi-VM
 Multi-core
 …




                                        46
Contact Us

 SSLAB, NTHU, Taiwan


 Website
   https://sites.google.com/a/sslab.cs.nthu.edu.tw/ar
    mvisor/


 Thanks For Your Attention



                                                         47
IO Virtualization Overhead

           Guest

                   Driver

           QEMU
             Device
     Driver Linux KVM

          Hardware
                             49

Contenu connexe

Tendances

PV-Drivers for SeaBIOS using Upstream Qemu
PV-Drivers for SeaBIOS using Upstream QemuPV-Drivers for SeaBIOS using Upstream Qemu
PV-Drivers for SeaBIOS using Upstream QemuThe Linux Foundation
 
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMUSFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMULinaro
 
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introductionACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introductionProject ACRN
 
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj MishraMalicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj MishraOWASP Delhi
 
ACRN vMeet-Up EU 2021 - debug ACRN hypervisor
ACRN vMeet-Up EU 2021 - debug ACRN hypervisorACRN vMeet-Up EU 2021 - debug ACRN hypervisor
ACRN vMeet-Up EU 2021 - debug ACRN hypervisorProject ACRN
 
Project ACRN: SR-IOV implementation
Project ACRN: SR-IOV implementationProject ACRN: SR-IOV implementation
Project ACRN: SR-IOV implementationGeoffroy Van Cutsem
 
Dave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDanny Abukalam
 
Esx.sc.quickref
Esx.sc.quickrefEsx.sc.quickref
Esx.sc.quickrefhellocn
 
Running Dual Android Xen Instances on Nexus 10
Running Dual Android Xen Instances on Nexus 10Running Dual Android Xen Instances on Nexus 10
Running Dual Android Xen Instances on Nexus 10Samsung Open Source Group
 
Project ACRN CPU sharing BVT scheduler in ACRN hypervisor
Project ACRN CPU sharing BVT scheduler in ACRN hypervisorProject ACRN CPU sharing BVT scheduler in ACRN hypervisor
Project ACRN CPU sharing BVT scheduler in ACRN hypervisorProject ACRN
 
Project ACRN hypervisor introduction
Project ACRN hypervisor introduction Project ACRN hypervisor introduction
Project ACRN hypervisor introduction Project ACRN
 
JRuby Jam Session
JRuby Jam Session JRuby Jam Session
JRuby Jam Session Engine Yard
 
Project ACRN Device Model architecture introduction
Project ACRN Device Model architecture introductionProject ACRN Device Model architecture introduction
Project ACRN Device Model architecture introductionProject ACRN
 
Project ACRN expose and pass through platform hidden PCIe devices to SOS
Project ACRN expose and pass through platform hidden PCIe devices to SOSProject ACRN expose and pass through platform hidden PCIe devices to SOS
Project ACRN expose and pass through platform hidden PCIe devices to SOSProject ACRN
 
Embedded Systems Conference 2014 Presentation
Embedded Systems Conference 2014 PresentationEmbedded Systems Conference 2014 Presentation
Embedded Systems Conference 2014 PresentationManish Jaggi
 
ACRN vMeet-Up EU 2021 - hypervisor new platform enabling
ACRN vMeet-Up EU 2021 - hypervisor new platform enablingACRN vMeet-Up EU 2021 - hypervisor new platform enabling
ACRN vMeet-Up EU 2021 - hypervisor new platform enablingProject ACRN
 
Project ACRN GVT-d introduction and tutorial
Project ACRN GVT-d introduction and tutorialProject ACRN GVT-d introduction and tutorial
Project ACRN GVT-d introduction and tutorialProject ACRN
 
ACRN vMeet-Up EU 2021 - Real Time Management and Performance Optimization
ACRN vMeet-Up EU 2021 - Real Time Management and Performance OptimizationACRN vMeet-Up EU 2021 - Real Time Management and Performance Optimization
ACRN vMeet-Up EU 2021 - Real Time Management and Performance OptimizationProject ACRN
 
Project ACRN I2C mediator introduction
Project ACRN I2C mediator introductionProject ACRN I2C mediator introduction
Project ACRN I2C mediator introductionProject ACRN
 

Tendances (20)

PV-Drivers for SeaBIOS using Upstream Qemu
PV-Drivers for SeaBIOS using Upstream QemuPV-Drivers for SeaBIOS using Upstream Qemu
PV-Drivers for SeaBIOS using Upstream Qemu
 
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMUSFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
 
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introductionACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
 
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj MishraMalicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
 
openqrm4.9 Quick Start Guide
openqrm4.9 Quick Start Guideopenqrm4.9 Quick Start Guide
openqrm4.9 Quick Start Guide
 
ACRN vMeet-Up EU 2021 - debug ACRN hypervisor
ACRN vMeet-Up EU 2021 - debug ACRN hypervisorACRN vMeet-Up EU 2021 - debug ACRN hypervisor
ACRN vMeet-Up EU 2021 - debug ACRN hypervisor
 
Project ACRN: SR-IOV implementation
Project ACRN: SR-IOV implementationProject ACRN: SR-IOV implementation
Project ACRN: SR-IOV implementation
 
Dave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMU
 
Esx.sc.quickref
Esx.sc.quickrefEsx.sc.quickref
Esx.sc.quickref
 
Running Dual Android Xen Instances on Nexus 10
Running Dual Android Xen Instances on Nexus 10Running Dual Android Xen Instances on Nexus 10
Running Dual Android Xen Instances on Nexus 10
 
Project ACRN CPU sharing BVT scheduler in ACRN hypervisor
Project ACRN CPU sharing BVT scheduler in ACRN hypervisorProject ACRN CPU sharing BVT scheduler in ACRN hypervisor
Project ACRN CPU sharing BVT scheduler in ACRN hypervisor
 
Project ACRN hypervisor introduction
Project ACRN hypervisor introduction Project ACRN hypervisor introduction
Project ACRN hypervisor introduction
 
JRuby Jam Session
JRuby Jam Session JRuby Jam Session
JRuby Jam Session
 
Project ACRN Device Model architecture introduction
Project ACRN Device Model architecture introductionProject ACRN Device Model architecture introduction
Project ACRN Device Model architecture introduction
 
Project ACRN expose and pass through platform hidden PCIe devices to SOS
Project ACRN expose and pass through platform hidden PCIe devices to SOSProject ACRN expose and pass through platform hidden PCIe devices to SOS
Project ACRN expose and pass through platform hidden PCIe devices to SOS
 
Embedded Systems Conference 2014 Presentation
Embedded Systems Conference 2014 PresentationEmbedded Systems Conference 2014 Presentation
Embedded Systems Conference 2014 Presentation
 
ACRN vMeet-Up EU 2021 - hypervisor new platform enabling
ACRN vMeet-Up EU 2021 - hypervisor new platform enablingACRN vMeet-Up EU 2021 - hypervisor new platform enabling
ACRN vMeet-Up EU 2021 - hypervisor new platform enabling
 
Project ACRN GVT-d introduction and tutorial
Project ACRN GVT-d introduction and tutorialProject ACRN GVT-d introduction and tutorial
Project ACRN GVT-d introduction and tutorial
 
ACRN vMeet-Up EU 2021 - Real Time Management and Performance Optimization
ACRN vMeet-Up EU 2021 - Real Time Management and Performance OptimizationACRN vMeet-Up EU 2021 - Real Time Management and Performance Optimization
ACRN vMeet-Up EU 2021 - Real Time Management and Performance Optimization
 
Project ACRN I2C mediator introduction
Project ACRN I2C mediator introductionProject ACRN I2C mediator introduction
Project ACRN I2C mediator introduction
 

Similaire à ARMvisor @ Linux Symposium 2012

Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterToward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterRyousei Takano
 
Virtualization Primer for Java Developers
Virtualization Primer for Java DevelopersVirtualization Primer for Java Developers
Virtualization Primer for Java DevelopersRichard McDougall
 
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterToward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterRyousei Takano
 
Hyper V R2 Deep Dive
Hyper V R2 Deep DiveHyper V R2 Deep Dive
Hyper V R2 Deep DiveAidan Finn
 
Virtual Pc Seminar
Virtual Pc SeminarVirtual Pc Seminar
Virtual Pc Seminarguest5b5549
 
Xen Euro Par07
Xen Euro Par07Xen Euro Par07
Xen Euro Par07congvc
 
Storage-Performance-Tuning-for-FAST-Virtual-Machines_Fam-Zheng.pdf
Storage-Performance-Tuning-for-FAST-Virtual-Machines_Fam-Zheng.pdfStorage-Performance-Tuning-for-FAST-Virtual-Machines_Fam-Zheng.pdf
Storage-Performance-Tuning-for-FAST-Virtual-Machines_Fam-Zheng.pdfaaajjj4
 
Static partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VStatic partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VRISC-V International
 
Realtime scheduling for virtual machines in SKT
Realtime scheduling for virtual machines in SKTRealtime scheduling for virtual machines in SKT
Realtime scheduling for virtual machines in SKTThe Linux Foundation
 
Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...
Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...
Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...Ryousei Takano
 
Virtualizare si SCVMM2008
Virtualizare si SCVMM2008Virtualizare si SCVMM2008
Virtualizare si SCVMM2008Tudor Damian
 
Hardware supports for Virtualization
Hardware supports for VirtualizationHardware supports for Virtualization
Hardware supports for VirtualizationYoonje Choi
 
Virtualization Technology Overview
Virtualization Technology OverviewVirtualization Technology Overview
Virtualization Technology OverviewOpenCity Community
 
virtualization tutorial at ACM bangalore Compute 2009
virtualization tutorial at ACM bangalore Compute 2009virtualization tutorial at ACM bangalore Compute 2009
virtualization tutorial at ACM bangalore Compute 2009ACMBangalore
 
Disco: Running Commodity Operating Systems on Scalable Multiprocessors Disco
Disco: Running Commodity Operating Systems on Scalable Multiprocessors DiscoDisco: Running Commodity Operating Systems on Scalable Multiprocessors Disco
Disco: Running Commodity Operating Systems on Scalable Multiprocessors DiscoMagnus Backman
 
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...Jim St. Leger
 

Similaire à ARMvisor @ Linux Symposium 2012 (20)

5 kvm arm
5 kvm arm5 kvm arm
5 kvm arm
 
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterToward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
 
Virtualization Primer for Java Developers
Virtualization Primer for Java DevelopersVirtualization Primer for Java Developers
Virtualization Primer for Java Developers
 
2011 10-19
2011 10-192011 10-19
2011 10-19
 
The kvm virtualization way
The kvm virtualization wayThe kvm virtualization way
The kvm virtualization way
 
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterToward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
 
Hyper V R2 Deep Dive
Hyper V R2 Deep DiveHyper V R2 Deep Dive
Hyper V R2 Deep Dive
 
Virtual Pc Seminar
Virtual Pc SeminarVirtual Pc Seminar
Virtual Pc Seminar
 
Xen Euro Par07
Xen Euro Par07Xen Euro Par07
Xen Euro Par07
 
Storage-Performance-Tuning-for-FAST-Virtual-Machines_Fam-Zheng.pdf
Storage-Performance-Tuning-for-FAST-Virtual-Machines_Fam-Zheng.pdfStorage-Performance-Tuning-for-FAST-Virtual-Machines_Fam-Zheng.pdf
Storage-Performance-Tuning-for-FAST-Virtual-Machines_Fam-Zheng.pdf
 
Static partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VStatic partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-V
 
Realtime scheduling for virtual machines in SKT
Realtime scheduling for virtual machines in SKTRealtime scheduling for virtual machines in SKT
Realtime scheduling for virtual machines in SKT
 
Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...
Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...
Cooperative VM Migration for a virtualized HPC Cluster with VMM-bypass I/O de...
 
Virtualizare si SCVMM2008
Virtualizare si SCVMM2008Virtualizare si SCVMM2008
Virtualizare si SCVMM2008
 
Hardware supports for Virtualization
Hardware supports for VirtualizationHardware supports for Virtualization
Hardware supports for Virtualization
 
Virtualization Technology Overview
Virtualization Technology OverviewVirtualization Technology Overview
Virtualization Technology Overview
 
virtualization tutorial at ACM bangalore Compute 2009
virtualization tutorial at ACM bangalore Compute 2009virtualization tutorial at ACM bangalore Compute 2009
virtualization tutorial at ACM bangalore Compute 2009
 
Disco: Running Commodity Operating Systems on Scalable Multiprocessors Disco
Disco: Running Commodity Operating Systems on Scalable Multiprocessors DiscoDisco: Running Commodity Operating Systems on Scalable Multiprocessors Disco
Disco: Running Commodity Operating Systems on Scalable Multiprocessors Disco
 
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
 
WAN - trends and use cases
WAN - trends and use casesWAN - trends and use cases
WAN - trends and use cases
 

Dernier

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
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.pptxRemote DBA Services
 
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 2024Victor Rentea
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
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 AmsterdamUiPathCommunity
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
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...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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 SavingEdi Saputra
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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.pptxRustici Software
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
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 TerraformAndrey Devyatkin
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
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.pdfsudhanshuwaghmare1
 

Dernier (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
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
 
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
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
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...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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
 

ARMvisor @ Linux Symposium 2012

  • 1. Linux symposium 2012 Jiun-Hung Ding, Chang-Jung Lin, Ping-Hao Chang Chieh-Hao Tsang, Wei-Chung Hsu, Yeh-Ching Chung ARMVISOR 1
  • 2. Hypervisor on ARM architecture ARMVISOR 2
  • 3. KVM  Linux Kernel module  Free, open  Many developers maintain it!!!  QEMU 3
  • 4. System Architecture Guest QEMU Device Driver Linux KVM Hardware 4
  • 5. Trap & emulate Guest OS User space trap Kernel space VMM 5
  • 6. Challenges  ARM is non-virtualizable.  Sensitive instructions  Privileged instructions 6
  • 7. Non-virtualizable 2531 sensitive sensitive but 25 critical non-privileged instructions instructions instructions 6 privileged instructions 7
  • 8. Challenges  ARM is non-virtualizable  Critical instructions  Possible solutions  Hardware support  Dynamic binary translation (DBT)  Para-virtualization 8
  • 9. Implementation  CPU virtualization  Memory virtualization  IO virtualization  Optimization 9
  • 10. User space Kernel space Guest Mode 1. VM initialization 2. Return to QEMU 3. Run VM 4. Enter Guest 5. Exit Guest Lightweight trap Enter Guest Heavyweight trap Exit Guest Return to QEMU Run VM Enter Guest QEMU KVM Guest OS
  • 12. CPU Virtualization  ARM: non-virtualizable ISA  Para-virtualization  Manually insert software interrupts (SWI) into guest OS 12
  • 13. Para-virtualization … mov r0, r0 add sp, sp movs pc, lr … 13
  • 14. Para-virtualization (cont.) .macro virt_svc_movs, inst SWI 0x190 … inst mov r0, r0 .endm add sp, sp virt_svc_movs “movs pc, lr” … 14
  • 15. UND ABORT SWI IRQ/FIQ KVM Trap Entry KVM/Guest Host Trap Handler Context Switch Unit KVM Trap Dispatcher Instruction MMU Exception/Interrupt QEMU I/O Emulation Emulation Emulation Emulation 15
  • 16. KVM Vector oxffff1000 0x1C FIQ 0x18 IRQ 0x14 (Reserved*) 0xffff001c 0x10 Data Abort Kernel 0x0C Prefetch Abort Vector 0x08 Software Interrupt oxffff0000 0x04 Undefined Instruction 0x00 Reset 16
  • 17. KVM Vector The KVM trap Interface oxffff1000 0xffff001c KVM oxffff0000 Vector 17
  • 19. GVA Guest PTB GPA 19
  • 20. Shadow Page Tables  Map guest virtual address to host physical address  For each guest page table (GPT), ARMvisor will allocate a shadow page table (SPT) to map it. 20
  • 21. Guest PTB GVA GPA Host HVA PTB New SPTE !!! HPA 21
  • 22. Emulation Flow PABT/DABT Hidden protection fault trap guest Guest MMIO Shadow Shadow page table permission access page table page table walker checker checker mapping update True permission fault Hidden translation fault True Translation fault MMIO emulation 22
  • 23. Shadow Page Tables  Map guest virtual address to host physical address  For each guest page table (GPT), ARMvisor will allocate a shadow page table (SPT) to map it.  How to keep coherence between SPT and GPT? 23
  • 24. Synchronization  Write protect page table page  Modification would cause a protection fault.  Reverse map (RMAP) : Record reverse mapping form guest physical page to SPT entries 25
  • 25. Permission Emulation (1)  Guest OS in non-privileged mode  Some instructions access kernel space with user permission  LDRBT, LDRT, STRBT, STRT  Double shadow page table 26
  • 26. Permission Mapping  Permission mechanism on ARM  Permission bits  Domain  No access  Client  Manager 28
  • 27. Using Domain Mechanism GUD GKD Virtual User Space CLIENT NA Virtual Kernel Space CLIENT CLIENT 29
  • 29. Virtualization Overhead -CPU  CPU virtualization  Frequent lightweight traps result lots of context switch  Try to reduce…  number of traps  Overhead of emulation 31
  • 30. CPU Optimization  Shadow file register (SFR)  Map VCPU’s shadow state of the register file into memory region that is both accessible for the VMM and guest with RW permission. 33
  • 31. mcr cpsr, r1 oxffff2000 VCPU Register Sync File Shadow Read/Write Register File Instructions KVM/Guest Context Switch Interface oxffff1000 KVM vector oxffff0000 34
  • 32. CPU Optimization  Shadow file register (SFR)  Map VCPU’s shadow state of the register file into memory region that is both accessible for the VMM and guest with RW permission.  Para-virtualization: Fast instruction trap  Sets of pre-defined macros which is composed of encoded information of the replaced instructions. 36
  • 33. Virtualization Overhead –MEM  Memory virtualization  Synchronization model  Try to reduce…  Protection faults 37
  • 34. Memory Optimization  Para-virtualization: hyper calls for PT modifications  When Guest OS sets PTEs  When Guest OS is going to free a L2 page table 38
  • 36. Experiment Board  ARMvisor supports ARMv6 & ARMv7 architecture in host ARM v6 11mpcore ARM v7 cortex-a8 40
  • 37. Environment  Host OS: Linux 2.6.35 Ubuntu  Guest OS: Linux 2.6.31  LMBench 41
  • 38. Experiment Data 100 80 60 40 20 0 base cpu opt mem opt all opt 42
  • 39. 16 Experiment Data 15.20 14 12.46 12.17 12 11.24 10.81 9.37 9.94 10 8.45 7.97 8.04 8 7.18 5.78 5.66 6 4.63 4.39 4.41 4 1.89 1.43 2 1.23 0 all opt 43
  • 40. Related Work  VMware MVP  Xen-ARM  B LABS CODEZEOR  OK Labs OKL4  Virtual Open System 44
  • 41. Conclusion  ARMvisor supports ARMv6 & ARMv7 architecture in host  Support RealView EB and Beagle Board  CPU and memory optimization gain lots of performance improvement  Reduce traps  Decrease protection faults 45
  • 42. Future Work  I/O optimization  Support ARM hardware virtualization extensions  Multi-VM  Multi-core  … 46
  • 43. Contact Us  SSLAB, NTHU, Taiwan  Website  https://sites.google.com/a/sslab.cs.nthu.edu.tw/ar mvisor/  Thanks For Your Attention 47
  • 44. IO Virtualization Overhead Guest Driver QEMU Device Driver Linux KVM Hardware 49