




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
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演講完畢,謝謝觀看!演講完畢,謝謝觀看!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. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025屆安徽省蚌埠局屬學(xué)校數(shù)學(xué)七下期末復(fù)習(xí)檢測試題含解析
- 貴州省黔東南州麻江縣2025年八年級數(shù)學(xué)第二學(xué)期期末經(jīng)典試題含解析
- 工業(yè)和信息化領(lǐng)域數(shù)據(jù)安全事件上報(模板)
- 2025屆浙江省江北區(qū)七校聯(lián)考七年級數(shù)學(xué)第二學(xué)期期末質(zhì)量檢測試題含解析
- 法律科學(xué)的分類及應(yīng)用試題及答案
- 戰(zhàn)略性儲蓄的思維與方法計劃
- 江蘇省南京市南航附中2025屆八下數(shù)學(xué)期末學(xué)業(yè)水平測試模擬試題含解析
- 2025年市場需求分析與預(yù)測試題及答案
- 網(wǎng)絡(luò)管理員考試知識結(jié)構(gòu)試題及答案細解
- 城市交通環(huán)境影響評價師重點基礎(chǔ)知識點
- 《意大利美食文化》課件
- 綠色中國智慧樹知到課后章節(jié)答案2023年下華東理工大學(xué)
- 《施之以愛報之以恩》的主題班會
- 茶葉食用農(nóng)產(chǎn)品承諾書(八篇)
- 組織行為學(xué)全套課件(羅賓斯版)
- 數(shù)據(jù)治理咨詢項目投標(biāo)文件技術(shù)方案
- 單梁起重機安全操作培訓(xùn)課件
- 動火證施工現(xiàn)場動火證申請書
- 安保安全隱患排查記錄表
- 2022年05月四川省涼山州國有工業(yè)投資發(fā)展集團有限責(zé)任公司專業(yè)技術(shù)人員及管理人員筆試題庫含答案解析
- 2023年全國測繪生產(chǎn)成本費用定額
評論
0/150
提交評論