SlideShare une entreprise Scribd logo
1  sur  87
Télécharger pour lire hors ligne
/VM

                Tsuyoshi Ozawa
                Twitter oza_x86




2009   11   9                     1
2009   11   9   2
2009   11   9   3
2009   11   9   4
2009   11   9   5
KVM


2009   11   9         6
for x86

2009   11   9             7
Linux on Real Machine   Linux on Virtual Machine




                          (=OS)
2009   11   9                                                      8
2009   11   9   9
x86

                      (Shadow Page Table)




2009   11   9                               10
CPU

                            0x1000   0x11000
                  Virtual                      Physical
                  Memory                       Memory
                            0x2000   0x12000

                              ...      ...

2009   11   9                                             11
•

                •


2009   11   9       12
•
                •


2009   11   9       13
• OS
                •      0x1000   0x11000

                •      0x2000   0x12000

                         ...      ...



2009   11   9                             14
•
                   0x1000   0x11000


            • OS   0x2000   0x12000

                     ...      ...



2009   11   9                         15
•
                                          ?

                •
                                swap in
                    Physical   swap out
                    Memory



2009   11   9                                 16
1.
                             CR3

                2.               MMU

                3.   TLB               CPU
                                             CR3
                           x86
                       CPU                   MMU
                                             TLB
2009   11   9                                      17
CR3
                •

                • Control Register   3


2009   11   9                                  18
•                      MMU


                • Memory Management Unit
2009   11   9                                19
• Translation Look-aside Buffer   TLB
                •


                • CPU      SRAM


2009   11   9                                           20
Virtual Address 0xc0003120        3



                       20bit        12bit     4.

                          CR3
                    2.
                                               MMU Physical
                                                   Memory

                          TLB        3.

                1.TLB
2009   11   9                                                 21
2009   11   9   22
VM


2009   11   9        23
2009   11   9   24
VM


2009   11   9        25
VM




                • OS
2009   11   9           26
VM




                Virtual
                Machine
                Monitor
                           VMM
                           Hardware
2009   11   9                         27
VMM

                •                 3         VMM

                • Robert P. Goldberg. ,Architectural
                  Principles for Virtual Computer Systems.




2009   11   9                                                28
Type I VMM

                •

                • Xen,VMware ESX
                                   VMM
                                   Hardware
2009   11   9                                 29
Type II VMM
                • OS


                • Qemu      Proc       VMM
                 LilyVM
                 Bochs               OS
                                   Hardware
2009   11   9                                 30
Hybrid    VMM

                • Type I + Type II
                •
                • VMware Proc VMM
                  Workstation
                 Linux KVM
                             OS          VMM
                              Hardware
2009   11   9                                  31
Hybrid    VMM


            •
                         VMM
                         OS     VMM
                          Hardware
2009   11   9                         32
VM


2009   11   9        33
2

                • Shadow Page Table ( SPT )
                • Nested Page Table (Extended Page Table)


2009   11   9                                               34
Shadow Page Table

                •     OS
                               Shadow
                      OS

                •     OS   Shadow



2009   11   9                           35
SPT
                Hybrid   VMM




                         OS      VMM
                           Hardware

2009   11   9                          36
SPT
                          OS
                          VM
       Guest side        vTLB   vCR3

            Host side   VMM
                        Hardware
                          TLB    CR3

2009   11   9                          37
SPT
                                create page table
                          OS                      Guest
                                                page table
                          VM
       Guest side        vTLB      vCR3

            Host side   VMM
                        Hardware
                          TLB    CR3

2009   11   9                                                38
SPT
                          OS             Guest
                                       page table
                          VM
       Guest side        vTLB   vCR3

            Host side   VMM
                                                    ...
                        Hardware
                          TLB    CR3

2009   11   9                                             39
SPT
                          OS             Guest
                                       page table
                          VM
       Guest side        vTLB   vCR3
                                       VMM
            Host side   VMM
                        Hardware
                          TLB    CR3

2009   11   9                                       40
SPT
                          OS             Guest
                                       page table
                          VM
       Guest side        vTLB   vCR3
                                       VMM
            Host side   VMM              PT
                        Hardware
                          TLB    CR3

2009   11   9                                       41
SPT
                          OS                   Guest
                                             page table
                          VM
       Guest side        vTLB   vCR3
                                create SPT
            Host side   VMM                   Shadow
                                             page table
                        Hardware
                          TLB    CR3

2009   11   9                                             42
SPT
                  OS             Guest
                               page table
                                                  Guest
                                                 Physical
                  VM                             Memory
                 vTLB   vCR3

                 VMM            Shadow
                               page table
                                            OS   vCR3
                                                  Host
                                                 Physical
                Hardware                         Memory
                  TLB    CR3

2009   11   9                                               43
SPT
                  OS             Guest
                               page table
                                                    Guest
                                                   Physical
                  VM                               Memory
                 vTLB   vCR3
                                            Hook
                 VMM            Shadow
                                   VMM
                               page table           Host
                                                   Physical
                Hardware                           Memory
                  TLB    CR3

2009   11   9                                                 44
SPT
                  OS             Guest
                               page table
                                                   Guest
                                                  SPT
                                                  Physical
                  VM                              Memory
                 vTLB   vCR3                CR3


                 VMM            Shadow
                               page table          Host
                                                  Physical
                Hardware                          Memory
                  TLB    CR3

2009   11   9                                                45
2009   11   9   46
SPT
                  OS             Guest
                               page table
                                             Guest
                                            Physical
                  VM                        Memory
                 vTLB   vCR3

                 VMM            Shadow
                               page table    Host
                                            Physical
                Hardware                    Memory
                  TLB    CR3

2009   11   9                                          47
SPT
                  OS             Guest
                               page table
                                             Guest
                                            Physical
                  VM                        Memory
                 vTLB   vCR3

                 VMM            Shadow
                               page table    Host
                                            Physical
                Hardware                    Memory
                  TLB    CR3

2009   11   9                                          48
SPT
                  OS             Guest
                               page table
                                             Guest
                                            Physical
                  VM                        Memory
                 vTLB   vCR3

                 VMM            Shadow
                               page table    Host
                                            Physical
                Hardware                    Memory
                  TLB    CR3

2009   11   9                                          49
SPT

                •       OS




                • VMM        SPT




2009   11   9                      50
SPT

                • Pre-Validation
                • Virtual TLB
                • Virtual TLB + Memory Trace


2009   11   9                                  51
Pre-validation

                • CR3
                •            PT

                • SPT


2009   11   9                            52
Pre-validation
                                create page table
                          OS                      Guest
                                                page table
                          VM
       Guest side        vTLB      vCR3

            Host side   VMM
                        Hardware
                          TLB    CR3

2009   11   9                                                53
Pre-validation
                          OS             Guest
                                       page table
                          VM
       Guest side        vTLB   vCR3
                                           OS
            Host side   VMM
                                        PT
                        Hardware
                          TLB    CR3

2009   11   9                                       54
Pre-validation
                          OS             Guest
                                       page table
                          VM
       Guest side        vTLB   vCR3
                                       CR3
            Host side   VMM
                        Hardware
                          TLB    CR3

2009   11   9                                       55
Pre-validation
                          OS             Guest
                                       page table
                          VM
       Guest side        vTLB   vCR3
                                       VMM
            Host side   VMM
                        Hardware
                          TLB    CR3

2009   11   9                                       56
Pre-validation
                          OS             Guest
                                       page table
                          VM
       Guest side        vTLB   vCR3
                                       VMM
            Host side   VMM              PT
                        Hardware
                          TLB    CR3

2009   11   9                                       57
Pre-validation
                          OS                   Guest
                                             page table
                          VM
       Guest side        vTLB   vCR3
                                create SPT
            Host side   VMM                   Shadow
                                             page table
                        Hardware
                          TLB    CR3

2009   11   9                                             58
Pre-validation
                  OS              Guest
                                page table
                                                    Guest
                                                   SPT
                                                   Physical
                  VM                               Memory
                 vTLB    vCR3                CR3


                VMM              Shadow
                                page table          Host
                                                   Physical
                Hardware                           Memory
                  TLB    CR3

2009   11   9                                                 59
SPT
                  OS             Guest
                               page table
                                                   Guest
                                                  Physical
                  VM                              Memory
                 vTLB   vCR3

                 VMM            Shadow
                               page table          Host
                                            SPT   Physical
                Hardware                          Memory
                  TLB    CR3

2009   11   9                                                60
Pre-validation
                •
                    ( CR3    )   SPT




                •

2009   11   9                          61
Virtual TLB
                • CR3
                    SPT 1

                •       TLB
                            SPT

                • TLB
                                  VMM

2009   11   9                             62
Virtual TLB
                                create page table
                          OS                      Guest
                                                page table
                          VM
       Guest side        vTLB      vCR3

            Host side   VMM
                        Hardware
                          TLB    CR3

2009   11   9                                                63
Virtual TLB
                          OS             Guest
                                       page table
                          VM
       Guest side        vTLB   vCR3
                                           OS
            Host side   VMM
                                        PT
                        Hardware
                          TLB    CR3

2009   11   9                                       64
Virtual TLB
                          OS             Guest
                                       page table
                          VM
       Guest side        vTLB   vCR3
                                       CR3
            Host side   VMM
                        Hardware
                          TLB    CR3

2009   11   9                                       65
Virtual TLB
                          OS             Guest
                                       page table
                          VM
       Guest side        vTLB   vCR3
                                       VMM
            Host side   VMM
                        Hardware
                          TLB    CR3

2009   11   9                                       66
Virtual TLB
                          OS             Guest
                                       page table
                          VM
       Guest side        vTLB   vCR3
                                       VMM
            Host side   VMM              PT
                        Hardware
                          TLB    CR3

2009   11   9                                       67
Virtual TLB
                          OS                   Guest
                                             page table
                          VM
       Guest side        vTLB   vCR3
                                create SPT
            Host side   VMM                   Shadow
                                             page table
                        Hardware              1st stage
                          TLB    CR3

2009   11   9                                             68
Virtual TLB
                          VMM
                          OS                   Guest
                                             page table
                          VM
       Guest side 1      vTLB   vCR3
                                create SPT
            Host side   VMM                   Shadow
                                             page table
                        Hardware              1st stage
                          TLB    CR3

2009   11   9                                             69
Virtual TLB
                  OS             Guest
                               page table
                                                   Guest
                                                  SPT
                                                  Physical
                  VM                              Memory
                 vTLB   vCR3                CR3


                VMM             Shadow
                               page table          Host
                                1st stage         Physical
                Hardware                          Memory
                  TLB    CR3

2009   11   9                                                70
Virtual TLB


                  OS             Guest
                               page table
                                             Guest
                                            Physical
                  VM                        Memory
                 vTLB   vCR3

                VMM             Shadow
                               page table    Host
                                1st stage   Physical
                Hardware                    Memory
                  TLB    CR3

2009   11   9                                          71
Virtual TLB


                  OS             Guest
                               page table
                                             Guest
                                            Physical
                  VM                        Memory
                 vTLB   vCR3

                VMM             Shadow
                               page table    Host
                                1st stage   Physical
                Hardware                    Memory
                  TLB    CR3

2009   11   9                                          72
Virtual TLB


                  OS             Guest
                               page table
                                             Guest
                                            Physical
                  VM                        Memory
                 vTLB   vCR3

                VMM             Shadow
                               page table    Host
                                1st stage   Physical
                Hardware                    Memory
                  TLB    CR3

2009   11   9                                          73
Virtual TLB


                  OS             Guest
                               page table
                                                   Guest
                                                  Physical
                  VM                              Memory
                 vTLB   vCR3
                                            VMM
                VMM             Shadow
                               page table    PT    Host
                                1st stage         Physical
                Hardware                          Memory
                  TLB    CR3

2009   11   9                                                74
Virtual TLB


                  OS             Guest
                               page table   2
                                                 Guest
                                                Physical
                  VM                            Memory
                 vTLB   vCR3

                                Shadow
                VMM            page table
                                                 Host
                               2nd stage        Physical
                Hardware                        Memory
                  TLB    CR3

2009   11   9                                              75
Virtual TLB


                         OS            Guest
                                     page table
                                                     Guest
                                                    Physical
                      VM                            Memory
                     vTLB     vCR3

                                      Shadow
                    VMM              page table
                                                     Host
                                     2nd stage      Physical
                    Hardware                        Memory
                      TLB    CR3
                (    )                        CPU
2009   11   9                                                  76
Virtual TLB

                                                    OS
                         OS            Guest
                                     page table
                                                          Guest
                                                         Physical
                      VM                                 Memory
                     vTLB     vCR3

                                      Shadow
                    VMM              page table
                                                          Host
                                     2nd stage           Physical
                    Hardware                             Memory
                      TLB    CR3
                (    )                        CPU
2009   11   9                                                       77
Virtual TLB


                         OS            Guest
                                     page table
                                                     Guest
                                                    Physical
                      VM                            Memory
                     vTLB     vCR3

                                      Shadow
                    VMM              page table
                                                     Host
                                     2nd stage      Physical
                    Hardware                        Memory
                      TLB    CR3
                (    )                        CPU
2009   11   9                                                  78
Virtual TLB

                •
                    •
                    •
                •          SPT



2009   11   9                         79
Virtual TLB

                •   TLB

                    •   CR3

                    •   invlpg

                •             OS



                •
                        PTE

2009   11   9                           80
SPT

                • TLB
                    SPT

                •         OS   PT SPT




2009   11   9                           81
Memory Trace

                •             OS   PT



                •             OS
                                   SPT
                    (Trace)



2009   11   9                            82
• x86
                 •
                   CPU

                 • Linux KVM


2009   11   9                  83
kvm-88/kernel/x86/paging_tmpl.h



2009   11   9                                     84
Nested Page Table
                (Extended Page Table)
                •

                    0x1000   0x11000   0x21000

                    0x2000   0x12000   0x42000

                      ...      ...

2009   11   9                                    85
NPT/EPT
                • AMD    CPU
                              CPU

                • Intel CPU
                              CPU(i7   )

                • VMM
                • SPT
2009   11   9                              86
• VM
                 • SPT
                   • Pre-validation
                   • Virtual TLB
                 • NPT/EPT
2009   11   9                         87

Contenu connexe

Tendances

Demand-Based Coordinated Scheduling for SMP VMs
Demand-Based Coordinated Scheduling for SMP VMsDemand-Based Coordinated Scheduling for SMP VMs
Demand-Based Coordinated Scheduling for SMP VMsHwanju Kim
 
Hypervisors and Virtualization - VMware, Hyper-V, XenServer, and KVM
Hypervisors and Virtualization - VMware, Hyper-V, XenServer, and KVMHypervisors and Virtualization - VMware, Hyper-V, XenServer, and KVM
Hypervisors and Virtualization - VMware, Hyper-V, XenServer, and KVMvwchu
 
1.Introduction to virtualization
1.Introduction to virtualization1.Introduction to virtualization
1.Introduction to virtualizationHwanju Kim
 
CPU Scheduling for Virtual Desktop Infrastructure
CPU Scheduling for Virtual Desktop InfrastructureCPU Scheduling for Virtual Desktop Infrastructure
CPU Scheduling for Virtual Desktop InfrastructureHwanju Kim
 
6. Live VM migration
6. Live VM migration6. Live VM migration
6. Live VM migrationHwanju Kim
 
Hardware supports for Virtualization
Hardware supports for VirtualizationHardware supports for Virtualization
Hardware supports for VirtualizationYoonje Choi
 
Hypervisor Framework
Hypervisor FrameworkHypervisor Framework
Hypervisor FrameworkEdgar Barbosa
 
Redesigning Xen Memory Sharing (Grant) Mechanism
Redesigning Xen Memory Sharing (Grant) MechanismRedesigning Xen Memory Sharing (Grant) Mechanism
Redesigning Xen Memory Sharing (Grant) MechanismThe Linux Foundation
 
Hyper-V High Availability and Live Migration
Hyper-V High Availability and Live MigrationHyper-V High Availability and Live Migration
Hyper-V High Availability and Live MigrationPaulo Freitas
 
Yabusame: postcopy live migration for qemu/kvm
Yabusame: postcopy live migration for qemu/kvmYabusame: postcopy live migration for qemu/kvm
Yabusame: postcopy live migration for qemu/kvmIsaku Yamahata
 
Virtualization & Network Connectivity
Virtualization & Network Connectivity Virtualization & Network Connectivity
Virtualization & Network Connectivity itplant
 
Xen and the Art of Virtualization
Xen and the Art of VirtualizationXen and the Art of Virtualization
Xen and the Art of VirtualizationSusheel Thakur
 
LCA13: Xen on ARM
LCA13: Xen on ARMLCA13: Xen on ARM
LCA13: Xen on ARMLinaro
 
Rootlinux17: An introduction to Xen Project Virtualisation
Rootlinux17:  An introduction to Xen Project VirtualisationRootlinux17:  An introduction to Xen Project Virtualisation
Rootlinux17: An introduction to Xen Project VirtualisationThe Linux Foundation
 

Tendances (20)

Demand-Based Coordinated Scheduling for SMP VMs
Demand-Based Coordinated Scheduling for SMP VMsDemand-Based Coordinated Scheduling for SMP VMs
Demand-Based Coordinated Scheduling for SMP VMs
 
Xen io
Xen ioXen io
Xen io
 
Hypervisors and Virtualization - VMware, Hyper-V, XenServer, and KVM
Hypervisors and Virtualization - VMware, Hyper-V, XenServer, and KVMHypervisors and Virtualization - VMware, Hyper-V, XenServer, and KVM
Hypervisors and Virtualization - VMware, Hyper-V, XenServer, and KVM
 
1.Introduction to virtualization
1.Introduction to virtualization1.Introduction to virtualization
1.Introduction to virtualization
 
CPU Scheduling for Virtual Desktop Infrastructure
CPU Scheduling for Virtual Desktop InfrastructureCPU Scheduling for Virtual Desktop Infrastructure
CPU Scheduling for Virtual Desktop Infrastructure
 
6. Live VM migration
6. Live VM migration6. Live VM migration
6. Live VM migration
 
Xen Memory Management
Xen Memory ManagementXen Memory Management
Xen Memory Management
 
Hardware supports for Virtualization
Hardware supports for VirtualizationHardware supports for Virtualization
Hardware supports for Virtualization
 
Hypervisor Framework
Hypervisor FrameworkHypervisor Framework
Hypervisor Framework
 
Hypervisors
HypervisorsHypervisors
Hypervisors
 
Redesigning Xen Memory Sharing (Grant) Mechanism
Redesigning Xen Memory Sharing (Grant) MechanismRedesigning Xen Memory Sharing (Grant) Mechanism
Redesigning Xen Memory Sharing (Grant) Mechanism
 
Hyper-V High Availability and Live Migration
Hyper-V High Availability and Live MigrationHyper-V High Availability and Live Migration
Hyper-V High Availability and Live Migration
 
Yabusame: postcopy live migration for qemu/kvm
Yabusame: postcopy live migration for qemu/kvmYabusame: postcopy live migration for qemu/kvm
Yabusame: postcopy live migration for qemu/kvm
 
Ian Pratt Nsdi Keynote Apr2008
Ian Pratt Nsdi Keynote Apr2008Ian Pratt Nsdi Keynote Apr2008
Ian Pratt Nsdi Keynote Apr2008
 
Virtualization & Network Connectivity
Virtualization & Network Connectivity Virtualization & Network Connectivity
Virtualization & Network Connectivity
 
Cloud.pptm
Cloud.pptmCloud.pptm
Cloud.pptm
 
Live VM Migration
Live VM MigrationLive VM Migration
Live VM Migration
 
Xen and the Art of Virtualization
Xen and the Art of VirtualizationXen and the Art of Virtualization
Xen and the Art of Virtualization
 
LCA13: Xen on ARM
LCA13: Xen on ARMLCA13: Xen on ARM
LCA13: Xen on ARM
 
Rootlinux17: An introduction to Xen Project Virtualisation
Rootlinux17:  An introduction to Xen Project VirtualisationRootlinux17:  An introduction to Xen Project Virtualisation
Rootlinux17: An introduction to Xen Project Virtualisation
 

Similaire à Memory Virtualization

SLES 11 SP2 PerformanceEvaluation for Linux on System z
SLES 11 SP2 PerformanceEvaluation for Linux on System zSLES 11 SP2 PerformanceEvaluation for Linux on System z
SLES 11 SP2 PerformanceEvaluation for Linux on System zIBM India Smarter Computing
 
Running Asterisk on virtualized environments
Running Asterisk on virtualized environmentsRunning Asterisk on virtualized environments
Running Asterisk on virtualized environmentsSaúl Ibarra Corretgé
 
第二回Bitvisor読書会 前半 Intel-VT について
第二回Bitvisor読書会 前半 Intel-VT について第二回Bitvisor読書会 前半 Intel-VT について
第二回Bitvisor読書会 前半 Intel-VT についてTsuyoshi OZAWA
 
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
 
Linux KVM のコードを追いかけてみよう
Linux KVM のコードを追いかけてみようLinux KVM のコードを追いかけてみよう
Linux KVM のコードを追いかけてみようTsuyoshi OZAWA
 
Developing For The Windows Azure Platform
Developing For The Windows Azure PlatformDeveloping For The Windows Azure Platform
Developing For The Windows Azure Platformdrmarcustillett
 
TSM 6.4 Technical updates
TSM 6.4 Technical updates TSM 6.4 Technical updates
TSM 6.4 Technical updates Solv AS
 
Tivoli Storage Manager 6.3.3 & 6.4
Tivoli Storage Manager 6.3.3 & 6.4Tivoli Storage Manager 6.3.3 & 6.4
Tivoli Storage Manager 6.3.3 & 6.4Solv AS
 
Presentation power vm common 2012
Presentation   power vm common 2012Presentation   power vm common 2012
Presentation power vm common 2012solarisyougood
 
Dynamo 100107092845-phpapp02
Dynamo 100107092845-phpapp02Dynamo 100107092845-phpapp02
Dynamo 100107092845-phpapp02Takefumi MIYOSHI
 
Open systems Specialists: XiV Storage Reinvented
Open systems Specialists: XiV Storage ReinventedOpen systems Specialists: XiV Storage Reinvented
Open systems Specialists: XiV Storage ReinventedVincent Kwon
 
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
 
Windsor: Domain 0 Disaggregation for XenServer and XCP
	Windsor: Domain 0 Disaggregation for XenServer and XCP	Windsor: Domain 0 Disaggregation for XenServer and XCP
Windsor: Domain 0 Disaggregation for XenServer and XCPThe Linux Foundation
 
Dena Loves Perl
Dena Loves PerlDena Loves Perl
Dena Loves Perlnotolab
 
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
 
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
 
大容量データバックアップ
大容量データバックアップ大容量データバックアップ
大容量データバックアップTakashi Abe
 

Similaire à Memory Virtualization (20)

SLES 11 SP2 PerformanceEvaluation for Linux on System z
SLES 11 SP2 PerformanceEvaluation for Linux on System zSLES 11 SP2 PerformanceEvaluation for Linux on System z
SLES 11 SP2 PerformanceEvaluation for Linux on System z
 
Running Asterisk on virtualized environments
Running Asterisk on virtualized environmentsRunning Asterisk on virtualized environments
Running Asterisk on virtualized environments
 
第二回Bitvisor読書会 前半 Intel-VT について
第二回Bitvisor読書会 前半 Intel-VT について第二回Bitvisor読書会 前半 Intel-VT について
第二回Bitvisor読書会 前半 Intel-VT について
 
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
 
Linux KVM のコードを追いかけてみよう
Linux KVM のコードを追いかけてみようLinux KVM のコードを追いかけてみよう
Linux KVM のコードを追いかけてみよう
 
Developing For The Windows Azure Platform
Developing For The Windows Azure PlatformDeveloping For The Windows Azure Platform
Developing For The Windows Azure Platform
 
TSM 6.4 Technical updates
TSM 6.4 Technical updates TSM 6.4 Technical updates
TSM 6.4 Technical updates
 
Tivoli Storage Manager 6.3.3 & 6.4
Tivoli Storage Manager 6.3.3 & 6.4Tivoli Storage Manager 6.3.3 & 6.4
Tivoli Storage Manager 6.3.3 & 6.4
 
Presentation power vm common 2012
Presentation   power vm common 2012Presentation   power vm common 2012
Presentation power vm common 2012
 
Dynamo 100107092845-phpapp02
Dynamo 100107092845-phpapp02Dynamo 100107092845-phpapp02
Dynamo 100107092845-phpapp02
 
Open systems Specialists: XiV Storage Reinvented
Open systems Specialists: XiV Storage ReinventedOpen systems Specialists: XiV Storage Reinvented
Open systems Specialists: XiV Storage Reinvented
 
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...
 
Windsor: Domain 0 Disaggregation for XenServer and XCP
	Windsor: Domain 0 Disaggregation for XenServer and XCP	Windsor: Domain 0 Disaggregation for XenServer and XCP
Windsor: Domain 0 Disaggregation for XenServer and XCP
 
Dena Loves Perl
Dena Loves PerlDena Loves Perl
Dena Loves Perl
 
XS Japan 2008 BitVisor English
XS Japan 2008 BitVisor EnglishXS Japan 2008 BitVisor English
XS Japan 2008 BitVisor English
 
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
 
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
 
17-virtualization.pptx
17-virtualization.pptx17-virtualization.pptx
17-virtualization.pptx
 
大容量データバックアップ
大容量データバックアップ大容量データバックアップ
大容量データバックアップ
 
z/VM Platform Update
z/VM Platform Updatez/VM Platform Update
z/VM Platform Update
 

Plus de Tsuyoshi OZAWA

YARN: a resource manager for analytic platform
YARN: a resource manager for analytic platformYARN: a resource manager for analytic platform
YARN: a resource manager for analytic platformTsuyoshi OZAWA
 
Dynamic Resource Allocation Spark on YARN
Dynamic Resource Allocation Spark on YARNDynamic Resource Allocation Spark on YARN
Dynamic Resource Allocation Spark on YARNTsuyoshi OZAWA
 
Taming YARN @ Hadoop Conference Japan 2014
Taming YARN @ Hadoop Conference Japan 2014Taming YARN @ Hadoop Conference Japan 2014
Taming YARN @ Hadoop Conference Japan 2014Tsuyoshi OZAWA
 
Taming YARN @ Hadoop conference Japan 2014
Taming YARN @ Hadoop conference Japan 2014Taming YARN @ Hadoop conference Japan 2014
Taming YARN @ Hadoop conference Japan 2014Tsuyoshi OZAWA
 
Multilevel aggregation for Hadoop/MapReduce
Multilevel aggregation for Hadoop/MapReduceMultilevel aggregation for Hadoop/MapReduce
Multilevel aggregation for Hadoop/MapReduceTsuyoshi OZAWA
 
Memcached as a Service for CloudFoundry
Memcached as a Service for CloudFoundryMemcached as a Service for CloudFoundry
Memcached as a Service for CloudFoundryTsuyoshi OZAWA
 
First step for dynticks in FreeBSD
First step for dynticks in FreeBSDFirst step for dynticks in FreeBSD
First step for dynticks in FreeBSDTsuyoshi OZAWA
 

Plus de Tsuyoshi OZAWA (10)

YARN: a resource manager for analytic platform
YARN: a resource manager for analytic platformYARN: a resource manager for analytic platform
YARN: a resource manager for analytic platform
 
Dynamic Resource Allocation Spark on YARN
Dynamic Resource Allocation Spark on YARNDynamic Resource Allocation Spark on YARN
Dynamic Resource Allocation Spark on YARN
 
Taming YARN @ Hadoop Conference Japan 2014
Taming YARN @ Hadoop Conference Japan 2014Taming YARN @ Hadoop Conference Japan 2014
Taming YARN @ Hadoop Conference Japan 2014
 
Taming YARN @ Hadoop conference Japan 2014
Taming YARN @ Hadoop conference Japan 2014Taming YARN @ Hadoop conference Japan 2014
Taming YARN @ Hadoop conference Japan 2014
 
Spark shark
Spark sharkSpark shark
Spark shark
 
Fluent logger-scala
Fluent logger-scalaFluent logger-scala
Fluent logger-scala
 
Multilevel aggregation for Hadoop/MapReduce
Multilevel aggregation for Hadoop/MapReduceMultilevel aggregation for Hadoop/MapReduce
Multilevel aggregation for Hadoop/MapReduce
 
Memcached as a Service for CloudFoundry
Memcached as a Service for CloudFoundryMemcached as a Service for CloudFoundry
Memcached as a Service for CloudFoundry
 
First step for dynticks in FreeBSD
First step for dynticks in FreeBSDFirst step for dynticks in FreeBSD
First step for dynticks in FreeBSD
 
第二回KVM読書会
第二回KVM読書会第二回KVM読書会
第二回KVM読書会
 

Dernier

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Dernier (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Memory Virtualization

  • 1. /VM Tsuyoshi Ozawa Twitter oza_x86 2009 11 9 1
  • 2. 2009 11 9 2
  • 3. 2009 11 9 3
  • 4. 2009 11 9 4
  • 5. 2009 11 9 5
  • 6. KVM 2009 11 9 6
  • 7. for x86 2009 11 9 7
  • 8. Linux on Real Machine Linux on Virtual Machine (=OS) 2009 11 9 8
  • 9. 2009 11 9 9
  • 10. x86 (Shadow Page Table) 2009 11 9 10
  • 11. CPU 0x1000 0x11000 Virtual Physical Memory Memory 0x2000 0x12000 ... ... 2009 11 9 11
  • 12. • 2009 11 9 12
  • 13. • 2009 11 9 13
  • 14. • OS • 0x1000 0x11000 • 0x2000 0x12000 ... ... 2009 11 9 14
  • 15. 0x1000 0x11000 • OS 0x2000 0x12000 ... ... 2009 11 9 15
  • 16. ? • swap in Physical swap out Memory 2009 11 9 16
  • 17. 1. CR3 2. MMU 3. TLB CPU CR3 x86 CPU MMU TLB 2009 11 9 17
  • 18. CR3 • • Control Register 3 2009 11 9 18
  • 19. MMU • Memory Management Unit 2009 11 9 19
  • 20. • Translation Look-aside Buffer TLB • • CPU SRAM 2009 11 9 20
  • 21. Virtual Address 0xc0003120 3 20bit 12bit 4. CR3 2. MMU Physical Memory TLB 3. 1.TLB 2009 11 9 21
  • 22. 2009 11 9 22
  • 23. VM 2009 11 9 23
  • 24. 2009 11 9 24
  • 25. VM 2009 11 9 25
  • 26. VM • OS 2009 11 9 26
  • 27. VM Virtual Machine Monitor VMM Hardware 2009 11 9 27
  • 28. VMM • 3 VMM • Robert P. Goldberg. ,Architectural Principles for Virtual Computer Systems. 2009 11 9 28
  • 29. Type I VMM • • Xen,VMware ESX VMM Hardware 2009 11 9 29
  • 30. Type II VMM • OS • Qemu Proc VMM LilyVM Bochs OS Hardware 2009 11 9 30
  • 31. Hybrid VMM • Type I + Type II • • VMware Proc VMM Workstation Linux KVM OS VMM Hardware 2009 11 9 31
  • 32. Hybrid VMM • VMM OS VMM Hardware 2009 11 9 32
  • 33. VM 2009 11 9 33
  • 34. 2 • Shadow Page Table ( SPT ) • Nested Page Table (Extended Page Table) 2009 11 9 34
  • 35. Shadow Page Table • OS Shadow OS • OS Shadow 2009 11 9 35
  • 36. SPT Hybrid VMM OS VMM Hardware 2009 11 9 36
  • 37. SPT OS VM Guest side vTLB vCR3 Host side VMM Hardware TLB CR3 2009 11 9 37
  • 38. SPT create page table OS Guest page table VM Guest side vTLB vCR3 Host side VMM Hardware TLB CR3 2009 11 9 38
  • 39. SPT OS Guest page table VM Guest side vTLB vCR3 Host side VMM ... Hardware TLB CR3 2009 11 9 39
  • 40. SPT OS Guest page table VM Guest side vTLB vCR3 VMM Host side VMM Hardware TLB CR3 2009 11 9 40
  • 41. SPT OS Guest page table VM Guest side vTLB vCR3 VMM Host side VMM PT Hardware TLB CR3 2009 11 9 41
  • 42. SPT OS Guest page table VM Guest side vTLB vCR3 create SPT Host side VMM Shadow page table Hardware TLB CR3 2009 11 9 42
  • 43. SPT OS Guest page table Guest Physical VM Memory vTLB vCR3 VMM Shadow page table OS vCR3 Host Physical Hardware Memory TLB CR3 2009 11 9 43
  • 44. SPT OS Guest page table Guest Physical VM Memory vTLB vCR3 Hook VMM Shadow VMM page table Host Physical Hardware Memory TLB CR3 2009 11 9 44
  • 45. SPT OS Guest page table Guest SPT Physical VM Memory vTLB vCR3 CR3 VMM Shadow page table Host Physical Hardware Memory TLB CR3 2009 11 9 45
  • 46. 2009 11 9 46
  • 47. SPT OS Guest page table Guest Physical VM Memory vTLB vCR3 VMM Shadow page table Host Physical Hardware Memory TLB CR3 2009 11 9 47
  • 48. SPT OS Guest page table Guest Physical VM Memory vTLB vCR3 VMM Shadow page table Host Physical Hardware Memory TLB CR3 2009 11 9 48
  • 49. SPT OS Guest page table Guest Physical VM Memory vTLB vCR3 VMM Shadow page table Host Physical Hardware Memory TLB CR3 2009 11 9 49
  • 50. SPT • OS • VMM SPT 2009 11 9 50
  • 51. SPT • Pre-Validation • Virtual TLB • Virtual TLB + Memory Trace 2009 11 9 51
  • 52. Pre-validation • CR3 • PT • SPT 2009 11 9 52
  • 53. Pre-validation create page table OS Guest page table VM Guest side vTLB vCR3 Host side VMM Hardware TLB CR3 2009 11 9 53
  • 54. Pre-validation OS Guest page table VM Guest side vTLB vCR3 OS Host side VMM PT Hardware TLB CR3 2009 11 9 54
  • 55. Pre-validation OS Guest page table VM Guest side vTLB vCR3 CR3 Host side VMM Hardware TLB CR3 2009 11 9 55
  • 56. Pre-validation OS Guest page table VM Guest side vTLB vCR3 VMM Host side VMM Hardware TLB CR3 2009 11 9 56
  • 57. Pre-validation OS Guest page table VM Guest side vTLB vCR3 VMM Host side VMM PT Hardware TLB CR3 2009 11 9 57
  • 58. Pre-validation OS Guest page table VM Guest side vTLB vCR3 create SPT Host side VMM Shadow page table Hardware TLB CR3 2009 11 9 58
  • 59. Pre-validation OS Guest page table Guest SPT Physical VM Memory vTLB vCR3 CR3 VMM Shadow page table Host Physical Hardware Memory TLB CR3 2009 11 9 59
  • 60. SPT OS Guest page table Guest Physical VM Memory vTLB vCR3 VMM Shadow page table Host SPT Physical Hardware Memory TLB CR3 2009 11 9 60
  • 61. Pre-validation • ( CR3 ) SPT • 2009 11 9 61
  • 62. Virtual TLB • CR3 SPT 1 • TLB SPT • TLB VMM 2009 11 9 62
  • 63. Virtual TLB create page table OS Guest page table VM Guest side vTLB vCR3 Host side VMM Hardware TLB CR3 2009 11 9 63
  • 64. Virtual TLB OS Guest page table VM Guest side vTLB vCR3 OS Host side VMM PT Hardware TLB CR3 2009 11 9 64
  • 65. Virtual TLB OS Guest page table VM Guest side vTLB vCR3 CR3 Host side VMM Hardware TLB CR3 2009 11 9 65
  • 66. Virtual TLB OS Guest page table VM Guest side vTLB vCR3 VMM Host side VMM Hardware TLB CR3 2009 11 9 66
  • 67. Virtual TLB OS Guest page table VM Guest side vTLB vCR3 VMM Host side VMM PT Hardware TLB CR3 2009 11 9 67
  • 68. Virtual TLB OS Guest page table VM Guest side vTLB vCR3 create SPT Host side VMM Shadow page table Hardware 1st stage TLB CR3 2009 11 9 68
  • 69. Virtual TLB VMM OS Guest page table VM Guest side 1 vTLB vCR3 create SPT Host side VMM Shadow page table Hardware 1st stage TLB CR3 2009 11 9 69
  • 70. Virtual TLB OS Guest page table Guest SPT Physical VM Memory vTLB vCR3 CR3 VMM Shadow page table Host 1st stage Physical Hardware Memory TLB CR3 2009 11 9 70
  • 71. Virtual TLB OS Guest page table Guest Physical VM Memory vTLB vCR3 VMM Shadow page table Host 1st stage Physical Hardware Memory TLB CR3 2009 11 9 71
  • 72. Virtual TLB OS Guest page table Guest Physical VM Memory vTLB vCR3 VMM Shadow page table Host 1st stage Physical Hardware Memory TLB CR3 2009 11 9 72
  • 73. Virtual TLB OS Guest page table Guest Physical VM Memory vTLB vCR3 VMM Shadow page table Host 1st stage Physical Hardware Memory TLB CR3 2009 11 9 73
  • 74. Virtual TLB OS Guest page table Guest Physical VM Memory vTLB vCR3 VMM VMM Shadow page table PT Host 1st stage Physical Hardware Memory TLB CR3 2009 11 9 74
  • 75. Virtual TLB OS Guest page table 2 Guest Physical VM Memory vTLB vCR3 Shadow VMM page table Host 2nd stage Physical Hardware Memory TLB CR3 2009 11 9 75
  • 76. Virtual TLB OS Guest page table Guest Physical VM Memory vTLB vCR3 Shadow VMM page table Host 2nd stage Physical Hardware Memory TLB CR3 ( ) CPU 2009 11 9 76
  • 77. Virtual TLB OS OS Guest page table Guest Physical VM Memory vTLB vCR3 Shadow VMM page table Host 2nd stage Physical Hardware Memory TLB CR3 ( ) CPU 2009 11 9 77
  • 78. Virtual TLB OS Guest page table Guest Physical VM Memory vTLB vCR3 Shadow VMM page table Host 2nd stage Physical Hardware Memory TLB CR3 ( ) CPU 2009 11 9 78
  • 79. Virtual TLB • • • • SPT 2009 11 9 79
  • 80. Virtual TLB • TLB • CR3 • invlpg • OS • PTE 2009 11 9 80
  • 81. SPT • TLB SPT • OS PT SPT 2009 11 9 81
  • 82. Memory Trace • OS PT • OS SPT (Trace) 2009 11 9 82
  • 83. • x86 • CPU • Linux KVM 2009 11 9 83
  • 85. Nested Page Table (Extended Page Table) • 0x1000 0x11000 0x21000 0x2000 0x12000 0x42000 ... ... 2009 11 9 85
  • 86. NPT/EPT • AMD CPU CPU • Intel CPU CPU(i7 ) • VMM • SPT 2009 11 9 86
  • 87. • VM • SPT • Pre-validation • Virtual TLB • NPT/EPT 2009 11 9 87