高级可配置电源接口发展现状课件_第1页
高级可配置电源接口发展现状课件_第2页
高级可配置电源接口发展现状课件_第3页
高级可配置电源接口发展现状课件_第4页
高级可配置电源接口发展现状课件_第5页
已阅读5页,还剩67页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论