版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
Updates
in
ACPI
BasedMemory
Hot-PlugUpdatesinACPIBasedMemoryHo1Agenda1.2.3.4.5.6.ACPI
&
Memory
Hot-PlugMemory
Hot-Plug
ProcessBoot
Memory
HandlingPinned
Pages
MigrationQEmu
memory
Hot-PlugFuture
work2Agenda1.ACPI&MemoryHot-Plug2
ACPI
&
Memory
Hot-Plug?
ACPI:
Advanced
Configuration
and
Power
Interface
ACPI
is
an
interface
specification
of
Operating
System-directed
motherboard
device
configuration
and
Power
Management.
--
ACPI
Specification
5.0
Methods(dynamic)ACPI
Tables
(static)ACPI
BIOS
(Firmware)
ACPI
Registers
Hardware
Kernel
(Software)
ACPI
FrameworkRun
Time
Boot
TimeOS
layer
framework.
Event
handling
APIStatic
info
usedonly
at
boot
time.
DSDT
SRAT
……Event
driven
model.
Event
registers
Control
registers
……
3Dynamic
methodsused
at
run
time.
_EJ0
_STA
……SCI(System
Control
Interrupt) ACPI&MemoryHot-Plug Metho3KernelMemory
Hot-Plug
Subsystem4Hardware
Methods(dynamic)ACPI
RegistersEvent
infoCall
event
handlerACPI
Tables
(static)
ACPI
BIOS
Generate
SCI(System
Control
Interrupt)
Call
APICall
ACPI
MethodHardware
operation
Install
event
handlerACPI
Framework
Read
ACPI
Tables
ACPI
&
Memory
Hot-Plug?
ACPI
and
Memory
Hot-PlugBoot
time
processRun
time
processCall
device
dependent
codeHot-Plug
happensMemory
Device
DriverKernelMemoryHot-PlugSubsyste4Memory
AffinitySRATStatic
information
ofNUMA
architecture.
Memory
AffinityMemory
AffinityMainly
useful
information
Memory
rangePXM
(proximity
domain)Hotpluggable
flag……ACPI
&
Memory
Hot-Plug?
Static
configuration
–
SRAT:
SystemResource
Affinity
Table5MemoryAffinitySRATStaticinfo5Agenda1.2.3.4.5.6.ACPI
&
Memory
Hot-PlugMemory
Hot-Plug
ProcessBoot
Memory
HandlingPinned
Pages
MigrationQEmu
memory
Hot-PlugFuture
work6Agenda1.ACPI&MemoryHot-Plug6…Memory
management
backgroundKernel
spacedirect
mapping(64TB)
holemodule
mapping
space
kernel
text
mapping
holevirtual
memory
map
(1TB)
holevmalloc/ioremap
space
holePhysical
spaceBlock
Xmovable
pages
(used)
……
……page_structs
of
Block
X
……74.
Virtual
memory
mapping
pages.5.
Memory
block
to
be
hot-plugged.1.
User
processes’
page
tables.2.
Kernel
direct
mapping
page
tables.3.
Virtual
memory
mappingpage
tables.15324process(128TB)process(128TB)
User
processspace
(128TB)
process
(128TB)…MemorymanagementbackgroundK7…Memory
Hot-add
ProcessPhysical
spaceKernel
spacemodule
mapping
space
kernel
text
mapping
holevirtual
memory
map
(1TB)
holevmalloc/ioremap
space
hole
direct
mapping
(64TB)
holeEmpty
……page_structs
of
Block
X84321process(128TB)process(128TB)
User
processspace
(128TB)
process
(128TB)……
Block
Xpages
(invalid)……1.
Initialize
direct
mapping.2.
Initialize
virtual
memory
mapping.3.
Online
memory
block.4.
Establish
user
space
mapping.…MemoryHot-addProcessPhysica8…Memory
Hot-remove
ProcessKernel
spacemodule
mapping
space
kernel
text
mapping
holevirtual
memory
map
(1TB)
holevmalloc/ioremap
space
hole
direct
mapping
(64TB)
holeEmpty954process(128TB)process(128TB)
User
processspace
(128TB)
process
(128TB)3.
Reestablish
new
user
space
mapping.Physical
space
……
page_structs
of
Block
XNew
page_structs
pages
(invalid)New
pageNew
page
2
Block
X1.
Unmap
user
space
pages.
2.
Offline
pages
and
migrate
pages.134.
Free
kernel
direct
mapping.5.
Free
virtual
memorymapping.…MemoryHot-removeProcessKern910
directmapping
(64TB)Kernel
space
User
space(128TB)Physical
spaceUser
pageUser
pageKernel
page
user
mapping
Problem?
Kernel
pages
cannot
be
hot-removed
Kernel
pagevariableKernel
page
User
page
1.
migrate
Kernel
pageva
=
pa
+
offset
(1-1
mapped)User
page
Kernel
pagenot
migratablenothot-removable
hot-removable2.
hot-remove10 directKernel(128TB)Physica10Agenda1.2.3.4.5.6.ACPI
&
Memory
Hot-PlugMemory
Hot-Plug
ProcessBoot
Memory
HandlingPinned
Pages
MigrationQEmu
memory
Hot-PlugFuture
work11Agenda1.ACPI&MemoryHot-Plug11Avoid
Allocating
Hot-pluggable
Memorystart_kernelThe
kernel
cannot
recognize
which
memory
is
hot-pluggable
free_all_bootmemThe
kernel
can
recognize
the
hot-
pluggable
memoryParsing
SRATmemblock
allocatorbuddy
allocatorBoot
time12AvoidAllocatingHot-pluggable12Avoid
Allocating
Hot-pluggable
Memory(Before
Parsing
SRAT)How?free_all_bootmemParsing
SRATstart_kernel
Allocate
memory
just
behind
the
kernel
image:--The
node
kernel
resides
in
is
un-hot-pluggableIntroduce
a
new
bottom-up
mode
for
memblock
allocatorBoot
time13AvoidAllocatingHot-pluggable13Top-down
V.S.
Bottom-up
Top-down
allocation
modeNODE
0
NODE
1NODE
0
NODE
1--Memory
at
low
addresses
is
precious
(e.g.
for
DMA
devices)For
non-memory-hot-plug
users--In
most
cases,
memory
allocated
before
parsing
SRAT
won’t
be
too
much,
so
it
could
highly
likelybe
in
the
same
node
with
kernel
imageFor
memory-hot-plug
usersBottom-up
allocation
mode
Kernel
imageKernel
image14new
allocationTop-downV.S.Bottom-upNODE014Avoid
Allocating
Hot-pluggable
Memory(After
Parsing
SRAT)start_kernelfree_all_bootmemParsing
SRATMark
hot-pluggable
memory
and
skip
them
in
followed
allocations:--Introduce
MEMBLOCK_HOTPLUG
flag
for
memblock
allocatorChange
back
to
top-down
modeHow?Boot
time15AvoidAllocatingHot-pluggable15start_kernelSummaryAllocate
memory
just
behind
thekernel
image
by
using
bottom-up
allocation
mode
free_all_bootmem
Skip
allocating
memory
which
ismarked
with
MEMBLOCK_HOTPLUG
flagParsing
SRATmemblock
allocatorbuddy
allocatorBoot
time16start_kernelSummary free_all1617Boot
Option:
movable_node?
A
boot-timeswitch
to
enable
movable
node
functionality?
Higher
priority
than
kernelcore
and
movablecore
boot
option
–
Make
sure
movable
node
functionality
can
be
configured17BootOption:movable_node?17Agenda1.2.3.4.5.6.ACPI
&
Memory
Hot-PlugMemory
Hot-Plug
ProcessBoot
Memory
HandlingPinned
Pages
MigrationQEmu
memory
Hot-PlugFuture
work18Agenda1.ACPI&MemoryHot-Plug18Pages
Pinned
by
Kernel?
Short-lived
Pins
–
cma,
fs/exec,
security,
nfs,
events,
net/ceph,
lots
of
dirvers…?
Long-lived
Pins
(pinned
in
all
lifecycle)
–
KVM
?
Real
mode
identity
EPT
pagetable
?
APIC
access
page
–
AIO
?
Event
Ring
buffer19PagesPinnedbyKernel191920Short-lived
Pins?
Just
for
data
copying?
Solution:
No
handling
–
Memory-offlineretry
timeout
(120s)
is
enough20Short-livedPins2021Long-lived
Pins:
KVM?
Real
mode
ept
identity
pagetable
–
Needed
for
CPUs
that
do
not
allow
enteringguest
mode
with
paging
disable.
–
Populated
with
ptes
that
cover
entire
guest’s
memory.?
APIC
access
page
–
Used
by
CPU
directly
to
catch
MMIO
access
to
an
APIC.21Long-livedPins:KVM2122GuestgvagpaHostpage2GuestPagetableEPThpa1hpa2page1kvm_arch
|-->
ept_identity_pagetable|-->
apic_access_page
Long-lived
Pins:
KVM
Why
pinned:
For
convenience,
not
necessary.VMCS:
APIC_ACCESS_ADDR3.
Update
APIC_ACCESS_ADDRpointer
in
VMCS.3212.
Update
local
cache
for
page
struct.1.
Update
EPTentry.22GuestgvagpaHostpage2GuestPag2223Host
hpa1page1
hpa2page2Long-lived
Pins:
KVM?
EPT
identity
pagetable:
Unpin
directly
GuestgpaEPT1.
Guest
requires
a
page2.
MMU
searches
EPT
for
a
hpa3.
MMU
returns
EPT
violation
since
page
has
been
migrated4.
KVM
handles
EPT
violation
and
find
the
new
page5.
KVM
updates
EPT6.
MMU
returns
new
hpa21634523Host hpa1 hpa2Long-livedPin23Long-lived
Pins:
KVM
APIC
access
page24hpa1hpa2page1
page2
L0
(Host
Mode)L2
GuestGuest
Mode
VMCSL1
GuestVMCSTwo
kinds
of
VM-Entry/Exit:
VM-Entry/Exitin
Guest
modeare
emulatedby
KVM.
L1
<-->
L2
VM-Entry/Exit
?
VM-Entry/ExitbetweenHost
and
Guest
mode
are
provided
by
CPU.
L0
<-->
L1
VM-Entry/Exit
?
L0
<-->
L2
VM-Entry/Exit
?Two
casesto
handle:
CPU
is
running
L1
Guest.
CPU
is
running
L2
Guest.Long-livedPins:KVMAPICacce2425L0
(Host
Mode)
hpa1page1
hpa2page2L2
GuestVMCSL1
GuestVMCSLong-lived
Pins:
KVM
APIC
access
page
CPU
is
running
L1
Guest:
Guest
ModePageMigration:1.
Try
to
unmap
page2.
MMU
notifier
works3.
Unmap
and
migrate
page
……4.
PagemigratedKVM:1.
Handler
enforces
a
L1
-->
L0
VM-Exit2.
Handler
makesvcpu
request
to
update
L1
VMCS3.
Next
L0
-->
L1
VM-
Entry:
GUP
waits
for
page
migration
……4.
Update
L1
VMCS5.
Update
L2
VMCS
innext
L1
-->
L2
VM-Entry25L0(HostMode) hpa1 hpa2L2G25L0
(Host
Mode)
hpa1page1
hpa2page2L2
GuestVMCSL1
GuestVMCSLong-lived
Pins:
KVM
APIC
access
page
CPU
is
running
L2
Guest:
Guest
ModePageMigration:1.
Try
to
unmap
page2.
MMU
notifier
works3.
Unmap
and
migrate
page
……4.
PagemigratedKVM:1.
Handler
enforces
a
L2
-->
L0
VM-Exit2.
Handler
makesvcpu
request
to
update
L2
VMCS3.
Next
L0
-->
L2
VM-
Entry:
GUP
waits
for
page
migration
……4.
Update
L2
VMCS5.
Update
L1
VMCS
innext
L2
-->
L1
VM-Exit
26L0(HostMode) hpa1 hpa2L2Gue26Long-lived
Pins:
AIO27?
AIO
Event
Ring
Buffer
–
Used
by
kernel
to
notify
user
space
that
AIO
has
completed.Long-livedPins:AIO27?AIOE27Long-lived
Pins:
AIO
Why
pinned:
Unable
to
know
when
AIO
completes.
User
process:
AIO
event
handled
AIO
Ring
BufferKernel:AIO
completedAIO:1.
AIO
pins
ring
pages2.
AIO
in
progress
……3.
AIO
completes4.
AIO
unpin
ring
pages
28PageMigration:1.
Offline
memory2.
Pagemigration
|-->
migratepages()
……3.
Pagemigration
failsLong-livedPins:AIO Userpro2829Long-lived
Pins:
AIO
Need
new
splutionWhy
cannot
use
MMU
notifier:1.
No
way
to
get
the
page
(have
to
repin)?GUP
may
sleep
in
io
interrupt
context2.
No
way
to
notify
AIO
to
repin
the
page?No
such
MMU
notifier
after
page
migration
completes29Long-livedPins:AIOWhycann29newpage……
oldpage3)
MigratepageAIO:1.
AIO
pins
ring
pages2.
AIO
in
progress
……3.
aio_migrate()1)
lock2)
unping
ring
pages3)
migratering
pages
……4)
repin
ring
pages
5)
unlock
……4.
AIO
completes5.
AIO
unpin
ring
pages
30PageMigration:1.
Offline
memory2.
Pagemigration
starts
……3.
Pagemigration
in
progress
……4.
Pagemigration
ends
AIO
complete1)
Blocked
by
lock
AIO
Ring
Buffer5)
Unlocked
when
migration
ends2)
Unpin4)
RepinLong-lived
Pins:
AIO
Solution:
Implement
aio_migratepage()newpage…… old3)MigratepageAIO30Agenda1.2.3.4.5.6.ACPI
&
Memory
Hot-PlugMemory
Hot-Plug
ProcessBoot
Memory
HandlingPinned
Pages
MigrationQEmu
memory
Hot-PlugFuture
work31Agenda1.ACPI&MemoryHot-Plug31QEmu
memory
hotplug32Memory
hot-add
usage:
available?
QEmu
commandline:-m
2G,slots=8,maxmem=16G-object
memory-ram,id=ram0,size=1G-object
memory-backend-file,mem-path=/hugetlbfs,id=ram1,size=1G?
QEmu
monitor:device_add
pc-dimm,id=d0,memdev=ram0object_add
memory-ram,id=ram2,size=2Gobject_add
memory-backend-file,mem-path=/hugetlbfs,id=ram3,size=1GMemory
hot-remove
usage:
in
progress?
QEmu
monitor:device_del
d0QEmumemoryhotplug32Memoryho32Agenda1.2.3.4.5.6.ACPI
&
Memory
Hot-PlugMemory
Hot-Plug
ProcessBoot
Memory
HandlingPinned
Pages
MigrationQEmu
memory
Hot-PlugFuture
work33Agenda1.ACPI&MemoryHot-Plug33Future
work?
Try
to
migrate
kernel
pages
–
Long
way
to
go.?
QEmu
device
hotplug
–
CPU
hotplug
–
Device
hotplug
framework
improvment
.?
User
space
tools,
like
libnuma
and
numactl
–
A
library
of
functions.
–
Commands.34Futurework3434Thank
you!
Q&A35Thankyou!3535演講完畢,謝謝觀(guān)看!演講完畢,謝謝觀(guān)看!36Updates
in
ACPI
BasedMemory
Hot-PlugUpdatesinACPIBasedMemoryHo37Agenda1.2.3.4.5.6.ACPI
&
Memory
Hot-PlugMemory
Hot-Plug
ProcessBoot
Memory
HandlingPinned
Pages
MigrationQEmu
memory
Hot-PlugFuture
work2Agenda1.ACPI&MemoryHot-Plug38
ACPI
&
Memory
Hot-Plug?
ACPI:
Advanced
Configuration
and
Power
Interface
ACPI
is
an
interface
specification
of
Operating
System-directed
motherboard
device
configuration
and
Power
Management.
--
ACPI
Specification
5.0
Methods(dynamic)ACPI
Tables
(static)ACPI
BIOS
(Firmware)
ACPI
Registers
Hardware
Kernel
(Software)
ACPI
FrameworkRun
Time
Boot
TimeOS
layer
framework.
Event
handling
APIStatic
info
usedonly
at
boot
time.
DSDT
SRAT
……Event
driven
model.
Event
registers
Control
registers
……
3Dynamic
methodsused
at
run
time.
_EJ0
_STA
……SCI(System
Control
Interrupt) ACPI&MemoryHot-Plug Metho39KernelMemory
Hot-Plug
Subsystem4Hardware
Methods(dynamic)ACPI
RegistersEvent
infoCall
event
handlerACPI
Tables
(static)
ACPI
BIOS
Generate
SCI(System
Control
Interrupt)
Call
APICall
ACPI
MethodHardware
operation
Install
event
handlerACPI
Framework
Read
ACPI
Tables
ACPI
&
Memory
Hot-Plug?
ACPI
and
Memory
Hot-PlugBoot
time
processRun
time
processCall
device
dependent
codeHot-Plug
happensMemory
Device
DriverKernelMemoryHot-PlugSubsyste40Memory
AffinitySRATStatic
information
ofNUMA
architecture.
Memory
AffinityMemory
AffinityMainly
useful
information
Memory
rangePXM
(proximity
domain)Hotpluggable
flag……ACPI
&
Memory
Hot-Plug?
Static
configuration
–
SRAT:
SystemResource
Affinity
Table5MemoryAffinitySRATStaticinfo41Agenda1.2.3.4.5.6.ACPI
&
Memory
Hot-PlugMemory
Hot-Plug
ProcessBoot
Memory
HandlingPinned
Pages
MigrationQEmu
memory
Hot-PlugFuture
work6Agenda1.ACPI&MemoryHot-Plug42…Memory
management
backgroundKernel
spacedirect
mapping(64TB)
holemodule
mapping
space
kernel
text
mapping
holevirtual
memory
map
(1TB)
holevmalloc/ioremap
space
holePhysical
spaceBlock
Xmovable
pages
(used)
……
……page_structs
of
Block
X
……74.
Virtual
memory
mapping
pages.5.
Memory
block
to
be
hot-plugged.1.
User
processes’
page
tables.2.
Kernel
direct
mapping
page
tables.3.
Virtual
memory
mappingpage
tables.15324process(128TB)process(128TB)
User
processspace
(128TB)
process
(128TB)…MemorymanagementbackgroundK43…Memory
Hot-add
ProcessPhysical
spaceKernel
spacemodule
mapping
space
kernel
text
mapping
holevirtual
memory
map
(1TB)
holevmalloc/ioremap
space
hole
direct
mapping
(64TB)
holeEmpty
……page_structs
of
Block
X84321process(128TB)process(128TB)
User
processspace
(128TB)
process
(128TB)……
Block
Xpages
(invalid)……1.
Initialize
direct
mapping.2.
Initialize
virtual
memory
mapping.3.
Online
memory
block.4.
Establish
user
space
mapping.…MemoryHot-addProcessPhysica44…Memory
Hot-remove
ProcessKernel
spacemodule
mapping
space
kernel
text
mapping
holevirtual
memory
map
(1TB)
holevmalloc/ioremap
space
hole
direct
mapping
(64TB)
holeEmpty954process(128TB)process(128TB)
User
processspace
(128TB)
process
(128TB)3.
Reestablish
new
user
space
mapping.Physical
space
……
page_structs
of
Block
XNew
page_structs
pages
(invalid)New
pageNew
page
2
Block
X1.
Unmap
user
space
pages.
2.
Offline
pages
and
migrate
pages.134.
Free
kernel
direct
mapping.5.
Free
virtual
memorymapping.…MemoryHot-removeProcessKern4510
directmapping
(64TB)Kernel
space
User
space(128TB)Physical
spaceUser
pageUser
pageKernel
page
user
mapping
Problem?
Kernel
pages
cannot
be
hot-removed
Kernel
pagevariableKernel
page
User
page
1.
migrate
Kernel
pageva
=
pa
+
offset
(1-1
mapped)User
page
Kernel
pagenot
migratablenothot-removable
hot-removable2.
hot-remove10 directKernel(128TB)Physica46Agenda1.2.3.4.5.6.ACPI
&
Memory
Hot-PlugMemory
Hot-Plug
ProcessBoot
Memory
HandlingPinned
Pages
MigrationQEmu
memory
Hot-PlugFuture
work11Agenda1.ACPI&MemoryHot-Plug47Avoid
Allocating
Hot-pluggable
Memorystart_kernelThe
kernel
cannot
recognize
which
memory
is
hot-pluggable
free_all_bootmemThe
kernel
can
recognize
the
hot-
pluggable
memoryParsing
SRATmemblock
allocatorbuddy
allocatorBoot
time12AvoidAllocatingHot-pluggable48Avoid
Allocating
Hot-pluggable
Memory(Before
Parsing
SRAT)How?free_all_bootmemParsing
SRATstart_kernel
Allocate
memory
just
behind
the
kernel
image:--The
node
kernel
resides
in
is
un-hot-pluggableIntroduce
a
new
bottom-up
mode
for
memblock
allocatorBoot
time13AvoidAllocatingHot-pluggable49Top-down
V.S.
Bottom-up
Top-down
allocation
modeNODE
0
NODE
1NODE
0
NODE
1--Memory
at
low
addresses
is
precious
(e.g.
for
DMA
devices)For
non-memory-hot-plug
users--In
most
cases,
memory
allocated
before
parsing
SRAT
won’t
be
too
much,
so
it
could
highly
likelybe
in
the
same
node
with
kernel
imageFor
memory-hot-plug
usersBottom-up
allocation
mode
Kernel
imageKernel
image14new
allocationTop-downV.S.Bottom-upNODE050Avoid
Allocating
Hot-pluggable
Memory(After
Parsing
SRAT)start_kernelfree_all_bootmemParsing
SRATMark
hot-pluggable
memory
and
skip
them
in
followed
allocations:--Introduce
MEMBLOCK_HOTPLUG
flag
for
memblock
allocatorChange
back
to
top-down
modeHow?Boot
time15AvoidAllocatingHot-pluggable51start_kernelSummaryAllocate
memory
just
behind
thekernel
image
by
using
bottom-up
allocation
mode
free_all_bootmem
Skip
allocating
memory
which
ismarked
with
MEMBLOCK_HOTPLUG
flagParsing
SRATmemblock
allocatorbuddy
allocatorBoot
time16start_kernelSummary free_all5217Boot
Option:
movable_node?
A
boot-timeswitch
to
enable
movable
node
functionality?
Higher
priority
than
kernelcore
and
movablecore
boot
option
–
Make
sure
movable
node
functionality
can
be
configured17BootOption:movable_node?53Agenda1.2.3.4.5.6.ACPI
&
Memory
Hot-PlugMemory
Hot-Plug
ProcessBoot
Memory
HandlingPinned
Pages
MigrationQEmu
memory
Hot-PlugFuture
work18Agenda1.ACPI&MemoryHot-Plug54Pages
Pinned
by
Kernel?
Short-lived
Pins
–
cma,
fs/exec,
security,
nfs,
events,
net/ceph,
lots
of
dirvers…?
Long-lived
Pins
(pinned
in
all
lifecycle)
–
KVM
?
Real
mode
identity
EPT
pagetable
?
APIC
access
page
–
AIO
?
Event
Ring
buffer19PagesPinnedbyKernel195520Short-lived
Pins?
Just
for
data
copying?
Solution:
No
handling
–
Memory-offlineretry
timeout
(120s)
is
enough20Short-livedPins5621Long-lived
Pins:
KVM?
Real
mode
ept
identity
pagetable
–
Needed
for
CPUs
that
do
not
allow
enteringguest
mode
with
paging
disable.
–
Populated
with
ptes
that
cover
entire
guest’s
memory.?
APIC
access
page
–
Used
by
CPU
directly
to
catch
MMIO
access
to
an
APIC.21Long-livedPins:KVM5722GuestgvagpaHostpage2GuestPagetableEPThpa1hpa2page1kvm_arch
|-->
ept_identity_pagetable|-->
apic_access_page
Long-lived
Pins:
KVM
Why
pinned:
For
convenience,
not
necessary.VMCS:
APIC_ACCESS_ADDR3.
Update
APIC_ACCESS_ADDRpointer
in
VMCS.3212.
Update
local
cache
for
page
struct.1.
Update
EPTentry.22GuestgvagpaHostpage2GuestPag5823Host
hpa1page1
hpa2page2Long-lived
Pins:
KVM?
EPT
identity
pagetable:
Unpin
directly
GuestgpaEPT1.
Guest
requires
a
page2.
MMU
searches
EPT
for
a
hpa3.
MMU
returns
EPT
violation
since
page
has
been
migrated4.
KVM
handles
EPT
violation
and
find
the
new
page5.
KVM
updates
EPT6.
MMU
returns
new
hpa21634523Host hpa1 hpa2Long-livedPin59Long-lived
Pins:
KVM
APIC
access
page24hpa1hpa2page1
page2
L0
(Host
Mode)L2
GuestGuest
Mode
VMCSL1
GuestVMCSTwo
kinds
of
VM-Entry/Exit:
VM-Entry/Exitin
Guest
modeare
emulatedby
KVM.
L1
<-->
L2
VM-Entry/Exit
?
VM-Entry/ExitbetweenHost
and
Guest
mode
are
provided
by
CPU.
L0
<-->
L1
VM-Entry/Exit
?
L0
<-->
L2
VM-Entry/Exit
?Two
casesto
handle:
CPU
is
running
L1
Guest.
CPU
is
running
L2
Guest.Long-livedPins:KVMAPICacce6025L0
(Host
Mode)
hpa1page1
hpa2page2L2
GuestVMCSL1
GuestVMCSLong-lived
Pins:
KVM
APIC
access
page
CPU
is
running
L1
Guest:
Guest
ModePageMigration:1.
Try
to
unmap
page2.
MMU
notifier
works3.
Unmap
and
migrate
page
……4.
PagemigratedKVM:1.
Handler
enforces
a
L1
-->
L0
VM-Exit2.
Handler
makesvcpu
request
to
update
L1
VMCS3.
Next
L0
-->
L1
VM-
Entry:
GUP
waits
for
page
migration
……4.
Update
L1
VMCS5.
Update
L2
VMCS
innext
L1
-->
L2
VM-Entry25L0(HostMode) hpa1 hpa2L2G61L0
(Host
Mode)
hpa1page1
hpa2page2L2
GuestVMCSL1
GuestVMCSLong-lived
Pins:
KVM
APIC
access
page
CPU
is
running
L2
Guest:
Guest
ModePageMigration:1.
Try
to
unmap
page2.
MMU
notifier
works3.
Unmap
and
migrate
page
……4.
PagemigratedKVM:1.
Handler
enforces
a
L2
-->
L0
VM-Exit2.
Handler
makesvcpu
request
to
update
L2
VMCS3.
Next
L0
-->
L2
VM-
Entry:
GUP
waits
for
page
migration
……4.
Update
L2
VMCS5.
Update
L1
VMCS
innext
L2
-->
L1
VM-Exit
26L0(HostMode) hpa1 hpa2L2Gue62Long-lived
Pins:
AIO27?
AIO
Event
Ring
Buffer
–
Used
by
kernel
to
notify
user
space
that
AIO
has
completed.Long-livedPins:AIO27?AIOE63Long-lived
Pins:
AIO
Wh
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 用心做教育用愛(ài)做人師-2024-2025學(xué)年第一學(xué)期述職報(bào)告
- 化驗(yàn)員題庫(kù)填空題
- 2025年春節(jié)前安全檢查方案
- 三方服務(wù)合作合同擔(dān)保書(shū)范本版B版
- 2024年金屬結(jié)構(gòu)焊接合同
- 2025年彩鋼活動(dòng)房租賃與物業(yè)管理服務(wù)合同2篇
- 2024救災(zāi)工作紀(jì)錄片拍攝合同協(xié)議樣本
- 2025年度車(chē)輛出借與租后增值服務(wù)一體化合同3篇
- 2024馬鈴薯種植戶(hù)與農(nóng)產(chǎn)品電商平臺(tái)合作銷(xiāo)售協(xié)議3篇
- 2024技術(shù)服務(wù)合同帶眉腳
- 項(xiàng)目日程表模板
- 項(xiàng)目工程安全管理責(zé)任區(qū)域劃分表
- 公衛(wèi)執(zhí)業(yè)醫(yī)師述職報(bào)告
- 02jrc901b電子海圖操作jan中文說(shuō)明書(shū)
- 教育培訓(xùn)學(xué)校(機(jī)構(gòu))課堂教學(xué)反饋表
- 新人教版高中化學(xué)選擇性必修三第1章有機(jī)化合物的結(jié)構(gòu)特點(diǎn)與研究方法課件
- 通信電子線(xiàn)路實(shí)驗(yàn)(通信)()
- 成功公司年度績(jī)效考核方案
- 《了凡四訓(xùn)》拼音版
- 特種設(shè)備安全管理人員(A)考試題庫(kù)
- JJG 537-2006熒光分光光度計(jì)
評(píng)論
0/150
提交評(píng)論