SlideShare uma empresa Scribd logo
1 de 67
Baixar para ler offline
Running Linux at EL2
Linaro Connect BKK16
Christoffer Dall
This Talk
• Technical Talk
• Assumes Familiarity with Operating Systems and
the ARM architecture
• Make it interactive! Ask Questions!
Virtualization on ARM
Virtualization Extensions
EL ?#@ what?
ARMVirtualization Extensions
Kernel
UserEL0
EL1
ARMVirtualization Extensions
Kernel
User
Hyp
EL0
EL1
EL2
Kernel
User
Hypervisor
Kernel
User
VM 0 VM 1
ARMVirtualization Extensions
EL0
EL1
EL2
Type-1 Hypervisor
Kernel
User
Kernel
User
Dom0 DomU
EL0
EL1
XenEL2
KVM
Kernel / KVM
User
Kernel
User
Host VM
EL0
EL1
EL2 KVM
KVM/ARM VM Exits
Kernel / KVM
User
Kernel
User
Host VM
EL0
EL1
EL2 KVM
KVM/ARM VM Exits
Kernel / KVM
User
Kernel
User
Host VM
EL0
EL1
EL2 KVM
Exception
KVM/ARM VM Exits
Kernel / KVM
User
Kernel
User
Host VM
EL0
EL1
EL2 KVM
Exceptionswitch
state
KVM/ARM VM Exits
Kernel / KVM
User
Kernel
User
Host VM
EL0
EL1
EL2 KVM
Exceptionswitch
state
Ret
KVM/ARM VM Exits
Kernel / KVM
User
Kernel
User
Host VM
EL0
EL1
EL2 KVM
Exceptionswitch
state
RetHVC
KVM/ARM VM Exits
Kernel / KVM
User
Kernel
User
Host VM
EL0
EL1
EL2 KVM
Exceptionswitch
state
Ret
switch
state
HVC
KVM/ARM VM Exits
Kernel / KVM
User
Kernel
User
Host VM
EL0
EL1
EL2 KVM
Exceptionswitch
state
Ret
switch
state Ret
HVC
An alternative
User
Kernel
User
Host VM
EL0
EL1
EL2 Kernel / KVM
A note about VHE
• Virtualization Host Extensions (VHE)
• Available in ARMv8.1
• Allows running the host kernel in EL2 without
modifying the software
• Good starting point.
Implementation
• System Registers
• Memory
• Exceptions
• KVM
System Registers Accesses
• Lots of:



#ifndef CONFIG_EL2_KERNEL

msr tcr_el1, x0

#else

msr tcr_el2, x0

#endif
Implementation
• System Registers
• Memory
• Exceptions
• KVM
EL1 VA Space (39 bits)
Userspace
0x7f ffffffff
0x0
Kernel
0xffffffff ffffffff
0xffffff80 00000000
TTBR0_EL1 TTBR1_EL1
EL2 VA Space (39 bits)
0x7f ffffffff
0x0
TTBR0_EL2
Where do we put
the kernel and
userspace?
Option #1
Kernel
0x7f ffffffff
0x0
TTBR0_EL2
Userspace
• Problem A: Page table
formats
• Problem B: requires
TLB invalidation
• Problem C: address
space compression
0x3f ffffffff
0x40 00000000
Option #1: Page tables
• Must share page tables between kernel and user
• Different page table format in EL0/1 and EL2

Descriptor bit EL1/0 EL2
AP[2] Priv. R/W Priv. R/W
AP[1] User access RES1
UXN/XN UXN XN
PXN PXN RES0
Option #1: Page tables
Descriptor bit
User

entries
Kernel entries
AP[2] 1/0 user: r/rw

kernel: r/rw
1/0 user: none

kernel r/rwAP[1] 1 0
UXN/XN 0/1
user: x/xn

kernel: x/xn
0
user: x

kernel: x
PXN 0
user: no effect
kernel: no effect
0
user: no effect
kernel: no effect
Descriptor bit EL1/0 EL2
AP[2] Priv. R/W Priv. R/W
AP[1] User access RES1
UXN/XN UXN XN
PXN PXN RES0
Option #1: Page tables
Descriptor bit
User

entries
Kernel entries
AP[2] 1/0 user: r/rw

kernel: r/rw
1/0 user: none

kernel r/rwAP[1] 1 0
UXN/XN 0/1
user: x/xn

kernel: x/xn
0
user: x

kernel: x
PXN 0
user: no effect
kernel: no effect
0
user: no effect
kernel: no effect
Descriptor bit EL1/0 EL2
AP[2] Priv. R/W Priv. R/W
AP[1] User access RES1
UXN/XN UXN XN
PXN PXN RES0
Option #1: Page tables
User Memory Accesses
CPU Mode Memory AP[1] Access
Option #1: Page tables
User Memory Accesses
CPU Mode Memory AP[1] Access
EL0 User 1 access
EL0 Kernel 0 no access
Option #1: Page tables
User Memory Accesses
CPU Mode Memory AP[1] Access
EL0 User 1 access
EL0 Kernel 0 no access
CPU Mode Memory AP[1] Access
EL2 User 1 access
EL2 Kernel 0 access
Kernel Memory Accesses
Option #1: RES1
• ARMv8.0 hardware must treat non-register RES1
bits as:



reads-as-written with no effect on the behaviour of
the CPU
Option #1: Page tables
Descriptor bit
User

entries
Kernel entries
AP[2] 1/0 user: r/rw

kernel: r/rw
1/0 user: none

kernel r/rwAP[1] 1 0
UXN/XN 0/1
user: x/xn

kernel: x/xn
0
user: x

kernel: x
PXN 0
user: no effect
kernel: no effect
0
user: no effect
kernel: no effect
Descriptor bit EL1/0 EL2
AP[2] Priv. R/W Priv. R/W
AP[1] User access RES1
UXN/XN UXN XN
PXN PXN RES0
Option #1: Page tables
Descriptor bit
User

entries
Kernel entries
AP[2] 1/0 user: r/rw

kernel: r/rw
1/0 user: none

kernel r/rwAP[1] 1 0
UXN/XN 0/1
user: x/xn

kernel: x/xn
0
user: x

kernel: x
PXN 0
user: no effect
kernel: no effect
0
user: no effect
kernel: no effect
Descriptor bit EL1/0 EL2
AP[2] Priv. R/W Priv. R/W
AP[1] User access RES1
UXN/XN UXN XN
PXN PXN RES0
Option #1: Page tables
Descriptor bit
User

entries
Kernel entries
AP[2] 1/0 user: r/rw

kernel: r/rw
1/0 user: none

kernel r/rwAP[1] 1 0
UXN/XN 0/1
user: x/xn

kernel: x/xn
0
user: x

kernel: x
PXN 0
user: no effect
kernel: no effect
0
user: no effect
kernel: no effect
Descriptor bit EL1/0 EL2
AP[2] Priv. R/W Priv. R/W
AP[1] User access RES1
UXN/XN UXN XN
PXN PXN RES0
Option #1: TLB Invalidation
EL1

Kernel
task #1 task #2
Mode ASID VA PA
TLB
Kernel accesses to userspace
Option #1: TLB Invalidation
EL1

Kernel
task #1 task #2
Mode ASID VA PA
EL1 2 0xf000 0xba000
TLB
Kernel accesses to userspace
Option #1: TLB Invalidation
EL1

Kernel
task #1 task #2
Mode ASID VA PA
EL1 2 0xf000 0xba000
EL1 45 0xf000 0xbc000
TLB
Kernel accesses to userspace
Option #1: TLB Invalidation
EL2

Kernel
task #1 task #2
TLB
Mode ASID VA PA
Kernel accesses to userspace
Option #1: TLB Invalidation
EL2

Kernel
task #1 task #2
TLB
Mode ASID VA PA
EL2 - 0xf000 0xba000
Kernel accesses to userspace
Option #1: TLB Invalidation
EL2

Kernel
task #1 task #2
TLB
Mode ASID VA PA
EL2 - 0xf000 0xba000
Hit
Kernel accesses to userspace
Option #2:
Kernel
0x7f ffffffff
0x0
TTBR0_EL2
Userspace
0x7f ffffffff
0x0
TTBR0_EL1
• Benefit: No EL2 TLB
invalidation
• Benefit: No address
space compression
• Problem: How to
access userspace
(copy_from_user)
Option #2
copy_from_user(uaddr, buf, len)
{
while (len) {
bytes = len;
offset = uaddr & (PAGE_SIZE - 1);
if (bytes > PAGE_SIZE - offset)
bytes = PAGE_SIZE - offset;
get_user_pages_fast(uaddr, 1, 0, &page);
kaddr = kmap_atomic(page);
memcpy(buf, kaddr + offset, bytes);
kunmap_atomic(page);
put_page(page);
len -= bytes;
buf += bytes;
uaddr += bytes;
}
}
Accessing userspace
• get_user_pages walks
page tables in software
• access memory via
linear address
• real code gets messy
• this is slow!
Option #2
Potential Improvement with AT instruction
user_va_to_phys(va)

{

asm(“at s1e1r, %0”: : “r” (va));

return par_to_phys(read_par());

}
while true {

pa = user_va_to_phys(va);

page = phys_to_page(pa);

get_page(page);

_pa = user_va_to_phys(va);

if (pa == _pa)

break;

put_page(page);

}
Option #2
Potential Improvement with AT instruction
user_va_to_phys(va)

{

asm(“at s1e1r, %0”: : “r” (va));

return par_to_phys(read_par());

}
while true {

pa = user_va_to_phys(va);

page = phys_to_page(pa);

get_page(page);

_pa = user_va_to_phys(va);

if (pa == _pa)

break;

put_page(page);

}
race
Memory in EL2
Kernel
0x7f ffffffff
0x0
Userspace
0x3f ffffffff
0x40 00000000
Option #1
Benefit: No changes

to uaccess
Implementation
• System Registers
• Memory
• Exceptions
• KVM
Exceptions to EL1
Kernel
UserEL0
EL1
Exceptions
from kernel
Exceptions
from userspace
Exceptions to EL2
Kernel
UserEL0
EL2
Exceptions
from kernel
Exceptions
from userspaceEL1
Handling IRQs to EL2
• HCR_EL2.IMO:
Traps IRQs to EL2
Kernel
UserEL0
EL2
EL1
Routing Synchronous
Exceptions to EL2
• HCR_EL2.TGE:
Traps general
exceptions to EL2
• Does NOT work
because TGE
implies
SCTLR_EL1.M=0
Kernel
UserEL0
EL2
EL1
Routing Synchronous
Exceptions to EL2
• Program TTBR1_EL1
with simple pgtable
• Set VBAR_EL1 to
address of highest
page in VA space
• Implement EL1
exception vector
handler
Kernel
UserEL0
EL2
EL1 shim
EL1 Shim Handler
ventry el1_shim_sync_invalid

ventry el1_shim_irq_invalid

ventry el1_shim_fiq_invalid

ventry el1_shim_error_invalid



ventry el1_shim_sync_invalid

ventry el1_shim_irq_invalid

ventry el1_shim_fiq_invalid

ventry el1_shim_error_invalid
ventry el0_shim_sync

ventry el0_shim_irq

ventry el0_shim_irq_invalid

ventry el0_shim_fiq_invalid

ventry el0_shim_error_invalid
el0_shim_sync:

hvc #0
el0_shim_irq:

hvc #1
Changes to entry.S
• Exception syndrome and return address are stored
in ESR_EL1 and SPSR_EL1
• CONFIG_EL2_KERNEL modifies exception handler
to read _EL2 registers
• Check for hypercalls from the EL1 shim and read
information from EL1 registers in this case
Exceptions Summary
• Expect low overhead from:
• one extra exception going through the EL1 shim
• a few extra assembly instructions in entry.S
Gotcha: Interrupts in EL1
el0_shim_sync:

hvc #0
b el0_shim_sync
Two instructions in EL1:
On exception entry:

PSTATE.I = 1
HCR_EL2.IMO==1:
masks virtual IRQs
Gotcha: Interrupts in EL1
el0_shim_sync:

hvc #0
b el0_shim_sync
Two instructions in EL1:
On exception entry:

PSTATE.I = 1
HCR_EL2.IMO==1:
masks virtual IRQs
Physical IRQ
Gotcha: solution
Kernel
UserEL0
EL2
EL1 shim
clear HCR_EL2.IMO IRQ
set HCR_EL2.IMO
Implementation
• System Registers
• Memory
• Exceptions
• KVM
Changes to KVM
• Rely on VHE code for functionality (tiny tweaks)
• ARM64_HAS_VIRT_HOST_EXTN
• Currently just checks current CPU mode
• Change to check VHE is enabled and in EL2
• Have separate ARM64_RUNS_IN_EL2
• Optimizations
KVM Optimizations
• Essentially lazy save/restore of registers
• Move register save/restore to vcpu_put/vcpu_load
• Only touch the vgic when you really have to
• Avoid saving/restoring timer state on every exit
Challenges
Performance ?
Challenges
#ifndef CONFIG_EL2_KERNEL
foo
#else
bar
#endif
Challenges
Upstream?
Challenges
Upstream?
Dead Code?
Challenges
Upstream?
Dead Code? Maintenance Burden?
Implementation Complexity
arch/arm/include/asm/kvm_host.h | 4 +
arch/arm/kvm/arm.c | 7 ++
arch/arm64/Kconfig | 13 +++
arch/arm64/include/asm/cpufeature.h | 3 +-
arch/arm64/include/asm/esr.h | 2 +-
arch/arm64/include/asm/kernel-pgtable.h | 5 +
arch/arm64/include/asm/kvm_hyp.h | 5 +
arch/arm64/include/asm/memory.h | 15 ++-
arch/arm64/include/asm/mmu_context.h | 23 ++++
arch/arm64/include/asm/percpu.h | 9 ++
arch/arm64/include/asm/pgtable-hwdef.h | 5 +
arch/arm64/include/asm/pgtable.h | 12 +-
arch/arm64/include/asm/suspend.h | 4 +
arch/arm64/include/asm/tlbflush.h | 32 +++++-
arch/arm64/include/asm/virt.h | 52 +++++++++
arch/arm64/kernel/Makefile | 1 +
arch/arm64/kernel/cpufeature.c | 10 ++
arch/arm64/kernel/el1-vectors.c | 107 ++++++++++++++++++
arch/arm64/kernel/entry.S | 195 ++++++++++++++++++++++++++++++--
arch/arm64/kernel/head.S | 150 +++++++++++++++++++++++-
arch/arm64/kernel/setup.c | 22 ++++
arch/arm64/kernel/smp.c | 6 +
arch/arm64/kernel/traps.c | 6 +
arch/arm64/kernel/vmlinux.lds.S | 9 ++
arch/arm64/kvm/hyp.S | 5 +
arch/arm64/kvm/hyp/switch.c | 21 +++-
arch/arm64/mm/init.c | 2 +
arch/arm64/mm/mmu.c | 2 +
arch/arm64/mm/pgd.c | 23 +++-
arch/arm64/mm/proc.S | 69 ++++++++++-
drivers/clocksource/arm_arch_timer.c | 2 +-
31 files changed, 792 insertions(+), 29 deletions(-)
792 insertions(+)
29 deletions(-)
It works
EL2 Kernel boot CPU started in EL2
CPU features: detected feature: Runs at EL2
CPU: All CPU(s) started at EL2
Conclusions
• It is possible to run Linux in EL2
• It’s a bit invasive, but not overly so
• Potential performance benefits, remains to be
measured
• To Upstream or not to Upstream; that’s the question

Mais conteúdo relacionado

Mais procurados

EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux NetworkingPLUMgrid
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)Brendan Gregg
 
Linux kernel tracing
Linux kernel tracingLinux kernel tracing
Linux kernel tracingViller Hsiao
 
Open vSwitch Introduction
Open vSwitch IntroductionOpen vSwitch Introduction
Open vSwitch IntroductionHungWei Chiu
 
Virtualization Support in ARMv8+
Virtualization Support in ARMv8+Virtualization Support in ARMv8+
Virtualization Support in ARMv8+Aananth C N
 
[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅NAVER D2
 
Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...
Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...
Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...The Linux Foundation
 
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
BPF  & Cilium - Turning Linux into a Microservices-aware Operating SystemBPF  & Cilium - Turning Linux into a Microservices-aware Operating System
BPF & Cilium - Turning Linux into a Microservices-aware Operating SystemThomas Graf
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecturehugo lu
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Linaro
 
Intel QLC: Cost-effective Ceph on NVMe
Intel QLC: Cost-effective Ceph on NVMeIntel QLC: Cost-effective Ceph on NVMe
Intel QLC: Cost-effective Ceph on NVMeCeph Community
 
UM2019 Extended BPF: A New Type of Software
UM2019 Extended BPF: A New Type of SoftwareUM2019 Extended BPF: A New Type of Software
UM2019 Extended BPF: A New Type of SoftwareBrendan Gregg
 
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Cilium - Bringing the BPF Revolution to Kubernetes Networking and SecurityCilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Cilium - Bringing the BPF Revolution to Kubernetes Networking and SecurityThomas Graf
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughThomas Graf
 
Linux Kernel Module - For NLKB
Linux Kernel Module - For NLKBLinux Kernel Module - For NLKB
Linux Kernel Module - For NLKBshimosawa
 
Replacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumReplacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumMichal Rostecki
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabMichelle Holley
 

Mais procurados (20)

EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux Networking
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)
 
Linux kernel tracing
Linux kernel tracingLinux kernel tracing
Linux kernel tracing
 
Open vSwitch Introduction
Open vSwitch IntroductionOpen vSwitch Introduction
Open vSwitch Introduction
 
Virtualization Support in ARMv8+
Virtualization Support in ARMv8+Virtualization Support in ARMv8+
Virtualization Support in ARMv8+
 
[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅[232] 성능어디까지쥐어짜봤니 송태웅
[232] 성능어디까지쥐어짜봤니 송태웅
 
Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...
Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...
Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...
 
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
BPF  & Cilium - Turning Linux into a Microservices-aware Operating SystemBPF  & Cilium - Turning Linux into a Microservices-aware Operating System
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecture
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
 
eBPF maps 101
eBPF maps 101eBPF maps 101
eBPF maps 101
 
Intel QLC: Cost-effective Ceph on NVMe
Intel QLC: Cost-effective Ceph on NVMeIntel QLC: Cost-effective Ceph on NVMe
Intel QLC: Cost-effective Ceph on NVMe
 
eBPF Basics
eBPF BasicseBPF Basics
eBPF Basics
 
UM2019 Extended BPF: A New Type of Software
UM2019 Extended BPF: A New Type of SoftwareUM2019 Extended BPF: A New Type of Software
UM2019 Extended BPF: A New Type of Software
 
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Cilium - Bringing the BPF Revolution to Kubernetes Networking and SecurityCilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking Walkthrough
 
Linux Kernel Module - For NLKB
Linux Kernel Module - For NLKBLinux Kernel Module - For NLKB
Linux Kernel Module - For NLKB
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 
Replacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumReplacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with Cilium
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 

Destaque

HKG15-400: Next steps in KVM enablement on ARM
HKG15-400: Next steps in KVM enablement on ARMHKG15-400: Next steps in KVM enablement on ARM
HKG15-400: Next steps in KVM enablement on ARMLinaro
 
Hardware accelerated Virtualization in the ARM Cortex™ Processors
Hardware accelerated Virtualization in the ARM Cortex™ ProcessorsHardware accelerated Virtualization in the ARM Cortex™ Processors
Hardware accelerated Virtualization in the ARM Cortex™ ProcessorsThe Linux Foundation
 
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...FFRI, Inc.
 
Sierraware ARM hypervisor
Sierraware ARM hypervisor Sierraware ARM hypervisor
Sierraware ARM hypervisor Sierraware
 
2010 11 psa montreal explanation and fundamentalism
2010 11 psa montreal explanation and fundamentalism2010 11 psa montreal explanation and fundamentalism
2010 11 psa montreal explanation and fundamentalismIoan Muntean
 
HKG15-405: Redundant zero/sign-extension elimination in GCC
HKG15-405: Redundant zero/sign-extension elimination in GCCHKG15-405: Redundant zero/sign-extension elimination in GCC
HKG15-405: Redundant zero/sign-extension elimination in GCCLinaro
 
20141111_SOS3_Gallo
20141111_SOS3_Gallo20141111_SOS3_Gallo
20141111_SOS3_GalloAndrea Gallo
 
BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64Linaro
 
LAS16-301: OpenStack on Aarch64, running in production, upstream improvements...
LAS16-301: OpenStack on Aarch64, running in production, upstream improvements...LAS16-301: OpenStack on Aarch64, running in production, upstream improvements...
LAS16-301: OpenStack on Aarch64, running in production, upstream improvements...Linaro
 
BKK16-305B ILP32 Performance on AArch64
BKK16-305B ILP32 Performance on AArch64BKK16-305B ILP32 Performance on AArch64
BKK16-305B ILP32 Performance on AArch64Linaro
 
LCE12: LCE12 ARMv8 Plenary
LCE12: LCE12 ARMv8 PlenaryLCE12: LCE12 ARMv8 Plenary
LCE12: LCE12 ARMv8 PlenaryLinaro
 
Dave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDanny Abukalam
 
Linux on ARM 64-bit Architecture
Linux on ARM 64-bit ArchitectureLinux on ARM 64-bit Architecture
Linux on ARM 64-bit ArchitectureRyo Jin
 
GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64Yi-Hsiu Hsu
 
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from HellLAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from HellLinaro
 
Introduction to armv8 aarch64
Introduction to armv8 aarch64Introduction to armv8 aarch64
Introduction to armv8 aarch64Yi-Hsiu Hsu
 
Tree of quantum_mechanics2
Tree of quantum_mechanics2Tree of quantum_mechanics2
Tree of quantum_mechanics2thambaji
 
The britannica guide to relativity and quantum mechanics (physics explained)
The britannica guide to relativity and quantum mechanics (physics explained) The britannica guide to relativity and quantum mechanics (physics explained)
The britannica guide to relativity and quantum mechanics (physics explained) أحمد عبد القادر
 

Destaque (20)

HKG15-400: Next steps in KVM enablement on ARM
HKG15-400: Next steps in KVM enablement on ARMHKG15-400: Next steps in KVM enablement on ARM
HKG15-400: Next steps in KVM enablement on ARM
 
Hardware accelerated Virtualization in the ARM Cortex™ Processors
Hardware accelerated Virtualization in the ARM Cortex™ ProcessorsHardware accelerated Virtualization in the ARM Cortex™ Processors
Hardware accelerated Virtualization in the ARM Cortex™ Processors
 
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
 
Sierraware ARM hypervisor
Sierraware ARM hypervisor Sierraware ARM hypervisor
Sierraware ARM hypervisor
 
ARM-KVM: Weather Report
ARM-KVM: Weather ReportARM-KVM: Weather Report
ARM-KVM: Weather Report
 
2010 11 psa montreal explanation and fundamentalism
2010 11 psa montreal explanation and fundamentalism2010 11 psa montreal explanation and fundamentalism
2010 11 psa montreal explanation and fundamentalism
 
Embedded Hypervisor for ARM
Embedded Hypervisor for ARMEmbedded Hypervisor for ARM
Embedded Hypervisor for ARM
 
HKG15-405: Redundant zero/sign-extension elimination in GCC
HKG15-405: Redundant zero/sign-extension elimination in GCCHKG15-405: Redundant zero/sign-extension elimination in GCC
HKG15-405: Redundant zero/sign-extension elimination in GCC
 
20141111_SOS3_Gallo
20141111_SOS3_Gallo20141111_SOS3_Gallo
20141111_SOS3_Gallo
 
BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64
 
LAS16-301: OpenStack on Aarch64, running in production, upstream improvements...
LAS16-301: OpenStack on Aarch64, running in production, upstream improvements...LAS16-301: OpenStack on Aarch64, running in production, upstream improvements...
LAS16-301: OpenStack on Aarch64, running in production, upstream improvements...
 
BKK16-305B ILP32 Performance on AArch64
BKK16-305B ILP32 Performance on AArch64BKK16-305B ILP32 Performance on AArch64
BKK16-305B ILP32 Performance on AArch64
 
LCE12: LCE12 ARMv8 Plenary
LCE12: LCE12 ARMv8 PlenaryLCE12: LCE12 ARMv8 Plenary
LCE12: LCE12 ARMv8 Plenary
 
Dave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMUDave Gilbert - KVM and QEMU
Dave Gilbert - KVM and QEMU
 
Linux on ARM 64-bit Architecture
Linux on ARM 64-bit ArchitectureLinux on ARM 64-bit Architecture
Linux on ARM 64-bit Architecture
 
GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64GCC for ARMv8 Aarch64
GCC for ARMv8 Aarch64
 
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from HellLAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
 
Introduction to armv8 aarch64
Introduction to armv8 aarch64Introduction to armv8 aarch64
Introduction to armv8 aarch64
 
Tree of quantum_mechanics2
Tree of quantum_mechanics2Tree of quantum_mechanics2
Tree of quantum_mechanics2
 
The britannica guide to relativity and quantum mechanics (physics explained)
The britannica guide to relativity and quantum mechanics (physics explained) The britannica guide to relativity and quantum mechanics (physics explained)
The britannica guide to relativity and quantum mechanics (physics explained)
 

Semelhante a BKK16-504 Running Linux in EL2 Virtualization

MOVED: Optimizing the Design and Implementation of KVM/ARM - SFO17-403
MOVED: Optimizing the Design and Implementation of KVM/ARM - SFO17-403MOVED: Optimizing the Design and Implementation of KVM/ARM - SFO17-403
MOVED: Optimizing the Design and Implementation of KVM/ARM - SFO17-403Linaro
 
SFO15-407: Performance Overhead of ARM Virtualization
SFO15-407: Performance Overhead of ARM VirtualizationSFO15-407: Performance Overhead of ARM Virtualization
SFO15-407: Performance Overhead of ARM VirtualizationLinaro
 
Q4.11: ARM Technology Update Plenary
Q4.11: ARM Technology Update PlenaryQ4.11: ARM Technology Update Plenary
Q4.11: ARM Technology Update PlenaryLinaro
 
Optimizing the Design and Implementation of KVM/ARM - SFO17-403
Optimizing the Design and Implementation of KVM/ARM - SFO17-403Optimizing the Design and Implementation of KVM/ARM - SFO17-403
Optimizing the Design and Implementation of KVM/ARM - SFO17-403Linaro
 
Olive Introduction for TOI
Olive Introduction for TOIOlive Introduction for TOI
Olive Introduction for TOIJohnson Liu
 
Virtual Machine Introspection with Xen
Virtual Machine Introspection with XenVirtual Machine Introspection with Xen
Virtual Machine Introspection with XenTamas K Lengyel
 
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]RootedCON
 
Q4.11: ARM Architecture
Q4.11: ARM ArchitectureQ4.11: ARM Architecture
Q4.11: ARM ArchitectureLinaro
 
Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_Linaro
 
Linaro Connect Asia 13 : Citrix - Xen on ARM plenary session
Linaro Connect Asia 13 : Citrix - Xen on ARM plenary sessionLinaro Connect Asia 13 : Citrix - Xen on ARM plenary session
Linaro Connect Asia 13 : Citrix - Xen on ARM plenary sessionThe Linux Foundation
 
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/StableSR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stablejuet-y
 
Extending OpenVIM R3 to support Unikernels (and Xen)
Extending OpenVIM R3 to support Unikernels (and Xen)Extending OpenVIM R3 to support Unikernels (and Xen)
Extending OpenVIM R3 to support Unikernels (and Xen)Stefano Salsano
 
ESD_05_ARM_Instructions set for preparation
ESD_05_ARM_Instructions set for preparationESD_05_ARM_Instructions set for preparation
ESD_05_ARM_Instructions set for preparationssuser026e94
 
Disaggregated Networking - The Drivers, the Software & The High Availability
Disaggregated Networking - The Drivers, the Software & The High AvailabilityDisaggregated Networking - The Drivers, the Software & The High Availability
Disaggregated Networking - The Drivers, the Software & The High AvailabilityOpen Networking Summit
 
PLNOG 7: Piotr Jabłoński - Jak wygląda mój pakiet?
PLNOG 7: Piotr Jabłoński - Jak wygląda mój pakiet?PLNOG 7: Piotr Jabłoński - Jak wygląda mój pakiet?
PLNOG 7: Piotr Jabłoński - Jak wygląda mój pakiet?PROIDEA
 

Semelhante a BKK16-504 Running Linux in EL2 Virtualization (20)

MOVED: Optimizing the Design and Implementation of KVM/ARM - SFO17-403
MOVED: Optimizing the Design and Implementation of KVM/ARM - SFO17-403MOVED: Optimizing the Design and Implementation of KVM/ARM - SFO17-403
MOVED: Optimizing the Design and Implementation of KVM/ARM - SFO17-403
 
SFO15-407: Performance Overhead of ARM Virtualization
SFO15-407: Performance Overhead of ARM VirtualizationSFO15-407: Performance Overhead of ARM Virtualization
SFO15-407: Performance Overhead of ARM Virtualization
 
Q4.11: ARM Technology Update Plenary
Q4.11: ARM Technology Update PlenaryQ4.11: ARM Technology Update Plenary
Q4.11: ARM Technology Update Plenary
 
Optimizing the Design and Implementation of KVM/ARM - SFO17-403
Optimizing the Design and Implementation of KVM/ARM - SFO17-403Optimizing the Design and Implementation of KVM/ARM - SFO17-403
Optimizing the Design and Implementation of KVM/ARM - SFO17-403
 
Olive Introduction for TOI
Olive Introduction for TOIOlive Introduction for TOI
Olive Introduction for TOI
 
Virtual Machine Introspection with Xen
Virtual Machine Introspection with XenVirtual Machine Introspection with Xen
Virtual Machine Introspection with Xen
 
Windows kernel
Windows kernelWindows kernel
Windows kernel
 
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]
Jaime Peñalba - Kernel exploitation. ¿El octavo arte? [rooted2019]
 
ARMInst.ppt
ARMInst.pptARMInst.ppt
ARMInst.ppt
 
ARMInst.ppt
ARMInst.pptARMInst.ppt
ARMInst.ppt
 
Q4.11: ARM Architecture
Q4.11: ARM ArchitectureQ4.11: ARM Architecture
Q4.11: ARM Architecture
 
Secure Containers with EPT Isolation
Secure Containers with EPT IsolationSecure Containers with EPT Isolation
Secure Containers with EPT Isolation
 
Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_Trusted firmware deep_dive_v1.0_
Trusted firmware deep_dive_v1.0_
 
Linaro Connect Asia 13 : Citrix - Xen on ARM plenary session
Linaro Connect Asia 13 : Citrix - Xen on ARM plenary sessionLinaro Connect Asia 13 : Citrix - Xen on ARM plenary session
Linaro Connect Asia 13 : Citrix - Xen on ARM plenary session
 
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/StableSR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
 
Ap7181 cli guide
Ap7181 cli guideAp7181 cli guide
Ap7181 cli guide
 
Extending OpenVIM R3 to support Unikernels (and Xen)
Extending OpenVIM R3 to support Unikernels (and Xen)Extending OpenVIM R3 to support Unikernels (and Xen)
Extending OpenVIM R3 to support Unikernels (and Xen)
 
ESD_05_ARM_Instructions set for preparation
ESD_05_ARM_Instructions set for preparationESD_05_ARM_Instructions set for preparation
ESD_05_ARM_Instructions set for preparation
 
Disaggregated Networking - The Drivers, the Software & The High Availability
Disaggregated Networking - The Drivers, the Software & The High AvailabilityDisaggregated Networking - The Drivers, the Software & The High Availability
Disaggregated Networking - The Drivers, the Software & The High Availability
 
PLNOG 7: Piotr Jabłoński - Jak wygląda mój pakiet?
PLNOG 7: Piotr Jabłoński - Jak wygląda mój pakiet?PLNOG 7: Piotr Jabłoński - Jak wygląda mój pakiet?
PLNOG 7: Piotr Jabłoński - Jak wygląda mój pakiet?
 

Mais de Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloLinaro
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaLinaro
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraLinaro
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaLinaro
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018Linaro
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Linaro
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteLinaro
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allLinaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorLinaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMULinaro
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MLinaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootLinaro
 

Mais de Linaro (20)

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 

Último

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 

Último (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 

BKK16-504 Running Linux in EL2 Virtualization

  • 1. Running Linux at EL2 Linaro Connect BKK16 Christoffer Dall
  • 2. This Talk • Technical Talk • Assumes Familiarity with Operating Systems and the ARM architecture • Make it interactive! Ask Questions!
  • 3. Virtualization on ARM Virtualization Extensions EL ?#@ what?
  • 6. Kernel User Hypervisor Kernel User VM 0 VM 1 ARMVirtualization Extensions EL0 EL1 EL2
  • 9. KVM/ARM VM Exits Kernel / KVM User Kernel User Host VM EL0 EL1 EL2 KVM
  • 10. KVM/ARM VM Exits Kernel / KVM User Kernel User Host VM EL0 EL1 EL2 KVM Exception
  • 11. KVM/ARM VM Exits Kernel / KVM User Kernel User Host VM EL0 EL1 EL2 KVM Exceptionswitch state
  • 12. KVM/ARM VM Exits Kernel / KVM User Kernel User Host VM EL0 EL1 EL2 KVM Exceptionswitch state Ret
  • 13. KVM/ARM VM Exits Kernel / KVM User Kernel User Host VM EL0 EL1 EL2 KVM Exceptionswitch state RetHVC
  • 14. KVM/ARM VM Exits Kernel / KVM User Kernel User Host VM EL0 EL1 EL2 KVM Exceptionswitch state Ret switch state HVC
  • 15. KVM/ARM VM Exits Kernel / KVM User Kernel User Host VM EL0 EL1 EL2 KVM Exceptionswitch state Ret switch state Ret HVC
  • 17. A note about VHE • Virtualization Host Extensions (VHE) • Available in ARMv8.1 • Allows running the host kernel in EL2 without modifying the software • Good starting point.
  • 18. Implementation • System Registers • Memory • Exceptions • KVM
  • 19. System Registers Accesses • Lots of:
 
 #ifndef CONFIG_EL2_KERNEL
 msr tcr_el1, x0
 #else
 msr tcr_el2, x0
 #endif
  • 20. Implementation • System Registers • Memory • Exceptions • KVM
  • 21. EL1 VA Space (39 bits) Userspace 0x7f ffffffff 0x0 Kernel 0xffffffff ffffffff 0xffffff80 00000000 TTBR0_EL1 TTBR1_EL1
  • 22. EL2 VA Space (39 bits) 0x7f ffffffff 0x0 TTBR0_EL2 Where do we put the kernel and userspace?
  • 23. Option #1 Kernel 0x7f ffffffff 0x0 TTBR0_EL2 Userspace • Problem A: Page table formats • Problem B: requires TLB invalidation • Problem C: address space compression 0x3f ffffffff 0x40 00000000
  • 24. Option #1: Page tables • Must share page tables between kernel and user • Different page table format in EL0/1 and EL2
 Descriptor bit EL1/0 EL2 AP[2] Priv. R/W Priv. R/W AP[1] User access RES1 UXN/XN UXN XN PXN PXN RES0
  • 25. Option #1: Page tables Descriptor bit User
 entries Kernel entries AP[2] 1/0 user: r/rw
 kernel: r/rw 1/0 user: none
 kernel r/rwAP[1] 1 0 UXN/XN 0/1 user: x/xn
 kernel: x/xn 0 user: x
 kernel: x PXN 0 user: no effect kernel: no effect 0 user: no effect kernel: no effect Descriptor bit EL1/0 EL2 AP[2] Priv. R/W Priv. R/W AP[1] User access RES1 UXN/XN UXN XN PXN PXN RES0
  • 26. Option #1: Page tables Descriptor bit User
 entries Kernel entries AP[2] 1/0 user: r/rw
 kernel: r/rw 1/0 user: none
 kernel r/rwAP[1] 1 0 UXN/XN 0/1 user: x/xn
 kernel: x/xn 0 user: x
 kernel: x PXN 0 user: no effect kernel: no effect 0 user: no effect kernel: no effect Descriptor bit EL1/0 EL2 AP[2] Priv. R/W Priv. R/W AP[1] User access RES1 UXN/XN UXN XN PXN PXN RES0
  • 27. Option #1: Page tables User Memory Accesses CPU Mode Memory AP[1] Access
  • 28. Option #1: Page tables User Memory Accesses CPU Mode Memory AP[1] Access EL0 User 1 access EL0 Kernel 0 no access
  • 29. Option #1: Page tables User Memory Accesses CPU Mode Memory AP[1] Access EL0 User 1 access EL0 Kernel 0 no access CPU Mode Memory AP[1] Access EL2 User 1 access EL2 Kernel 0 access Kernel Memory Accesses
  • 30. Option #1: RES1 • ARMv8.0 hardware must treat non-register RES1 bits as:
 
 reads-as-written with no effect on the behaviour of the CPU
  • 31. Option #1: Page tables Descriptor bit User
 entries Kernel entries AP[2] 1/0 user: r/rw
 kernel: r/rw 1/0 user: none
 kernel r/rwAP[1] 1 0 UXN/XN 0/1 user: x/xn
 kernel: x/xn 0 user: x
 kernel: x PXN 0 user: no effect kernel: no effect 0 user: no effect kernel: no effect Descriptor bit EL1/0 EL2 AP[2] Priv. R/W Priv. R/W AP[1] User access RES1 UXN/XN UXN XN PXN PXN RES0
  • 32. Option #1: Page tables Descriptor bit User
 entries Kernel entries AP[2] 1/0 user: r/rw
 kernel: r/rw 1/0 user: none
 kernel r/rwAP[1] 1 0 UXN/XN 0/1 user: x/xn
 kernel: x/xn 0 user: x
 kernel: x PXN 0 user: no effect kernel: no effect 0 user: no effect kernel: no effect Descriptor bit EL1/0 EL2 AP[2] Priv. R/W Priv. R/W AP[1] User access RES1 UXN/XN UXN XN PXN PXN RES0
  • 33. Option #1: Page tables Descriptor bit User
 entries Kernel entries AP[2] 1/0 user: r/rw
 kernel: r/rw 1/0 user: none
 kernel r/rwAP[1] 1 0 UXN/XN 0/1 user: x/xn
 kernel: x/xn 0 user: x
 kernel: x PXN 0 user: no effect kernel: no effect 0 user: no effect kernel: no effect Descriptor bit EL1/0 EL2 AP[2] Priv. R/W Priv. R/W AP[1] User access RES1 UXN/XN UXN XN PXN PXN RES0
  • 34. Option #1: TLB Invalidation EL1
 Kernel task #1 task #2 Mode ASID VA PA TLB Kernel accesses to userspace
  • 35. Option #1: TLB Invalidation EL1
 Kernel task #1 task #2 Mode ASID VA PA EL1 2 0xf000 0xba000 TLB Kernel accesses to userspace
  • 36. Option #1: TLB Invalidation EL1
 Kernel task #1 task #2 Mode ASID VA PA EL1 2 0xf000 0xba000 EL1 45 0xf000 0xbc000 TLB Kernel accesses to userspace
  • 37. Option #1: TLB Invalidation EL2
 Kernel task #1 task #2 TLB Mode ASID VA PA Kernel accesses to userspace
  • 38. Option #1: TLB Invalidation EL2
 Kernel task #1 task #2 TLB Mode ASID VA PA EL2 - 0xf000 0xba000 Kernel accesses to userspace
  • 39. Option #1: TLB Invalidation EL2
 Kernel task #1 task #2 TLB Mode ASID VA PA EL2 - 0xf000 0xba000 Hit Kernel accesses to userspace
  • 40. Option #2: Kernel 0x7f ffffffff 0x0 TTBR0_EL2 Userspace 0x7f ffffffff 0x0 TTBR0_EL1 • Benefit: No EL2 TLB invalidation • Benefit: No address space compression • Problem: How to access userspace (copy_from_user)
  • 41. Option #2 copy_from_user(uaddr, buf, len) { while (len) { bytes = len; offset = uaddr & (PAGE_SIZE - 1); if (bytes > PAGE_SIZE - offset) bytes = PAGE_SIZE - offset; get_user_pages_fast(uaddr, 1, 0, &page); kaddr = kmap_atomic(page); memcpy(buf, kaddr + offset, bytes); kunmap_atomic(page); put_page(page); len -= bytes; buf += bytes; uaddr += bytes; } } Accessing userspace • get_user_pages walks page tables in software • access memory via linear address • real code gets messy • this is slow!
  • 42. Option #2 Potential Improvement with AT instruction user_va_to_phys(va)
 {
 asm(“at s1e1r, %0”: : “r” (va));
 return par_to_phys(read_par());
 } while true {
 pa = user_va_to_phys(va);
 page = phys_to_page(pa);
 get_page(page);
 _pa = user_va_to_phys(va);
 if (pa == _pa)
 break;
 put_page(page);
 }
  • 43. Option #2 Potential Improvement with AT instruction user_va_to_phys(va)
 {
 asm(“at s1e1r, %0”: : “r” (va));
 return par_to_phys(read_par());
 } while true {
 pa = user_va_to_phys(va);
 page = phys_to_page(pa);
 get_page(page);
 _pa = user_va_to_phys(va);
 if (pa == _pa)
 break;
 put_page(page);
 } race
  • 44. Memory in EL2 Kernel 0x7f ffffffff 0x0 Userspace 0x3f ffffffff 0x40 00000000 Option #1 Benefit: No changes
 to uaccess
  • 45. Implementation • System Registers • Memory • Exceptions • KVM
  • 46. Exceptions to EL1 Kernel UserEL0 EL1 Exceptions from kernel Exceptions from userspace
  • 47. Exceptions to EL2 Kernel UserEL0 EL2 Exceptions from kernel Exceptions from userspaceEL1
  • 48. Handling IRQs to EL2 • HCR_EL2.IMO: Traps IRQs to EL2 Kernel UserEL0 EL2 EL1
  • 49. Routing Synchronous Exceptions to EL2 • HCR_EL2.TGE: Traps general exceptions to EL2 • Does NOT work because TGE implies SCTLR_EL1.M=0 Kernel UserEL0 EL2 EL1
  • 50. Routing Synchronous Exceptions to EL2 • Program TTBR1_EL1 with simple pgtable • Set VBAR_EL1 to address of highest page in VA space • Implement EL1 exception vector handler Kernel UserEL0 EL2 EL1 shim
  • 51. EL1 Shim Handler ventry el1_shim_sync_invalid
 ventry el1_shim_irq_invalid
 ventry el1_shim_fiq_invalid
 ventry el1_shim_error_invalid
 
 ventry el1_shim_sync_invalid
 ventry el1_shim_irq_invalid
 ventry el1_shim_fiq_invalid
 ventry el1_shim_error_invalid ventry el0_shim_sync
 ventry el0_shim_irq
 ventry el0_shim_irq_invalid
 ventry el0_shim_fiq_invalid
 ventry el0_shim_error_invalid el0_shim_sync:
 hvc #0 el0_shim_irq:
 hvc #1
  • 52. Changes to entry.S • Exception syndrome and return address are stored in ESR_EL1 and SPSR_EL1 • CONFIG_EL2_KERNEL modifies exception handler to read _EL2 registers • Check for hypercalls from the EL1 shim and read information from EL1 registers in this case
  • 53. Exceptions Summary • Expect low overhead from: • one extra exception going through the EL1 shim • a few extra assembly instructions in entry.S
  • 54. Gotcha: Interrupts in EL1 el0_shim_sync:
 hvc #0 b el0_shim_sync Two instructions in EL1: On exception entry:
 PSTATE.I = 1 HCR_EL2.IMO==1: masks virtual IRQs
  • 55. Gotcha: Interrupts in EL1 el0_shim_sync:
 hvc #0 b el0_shim_sync Two instructions in EL1: On exception entry:
 PSTATE.I = 1 HCR_EL2.IMO==1: masks virtual IRQs Physical IRQ
  • 56. Gotcha: solution Kernel UserEL0 EL2 EL1 shim clear HCR_EL2.IMO IRQ set HCR_EL2.IMO
  • 57. Implementation • System Registers • Memory • Exceptions • KVM
  • 58. Changes to KVM • Rely on VHE code for functionality (tiny tweaks) • ARM64_HAS_VIRT_HOST_EXTN • Currently just checks current CPU mode • Change to check VHE is enabled and in EL2 • Have separate ARM64_RUNS_IN_EL2 • Optimizations
  • 59. KVM Optimizations • Essentially lazy save/restore of registers • Move register save/restore to vcpu_put/vcpu_load • Only touch the vgic when you really have to • Avoid saving/restoring timer state on every exit
  • 65. Implementation Complexity arch/arm/include/asm/kvm_host.h | 4 + arch/arm/kvm/arm.c | 7 ++ arch/arm64/Kconfig | 13 +++ arch/arm64/include/asm/cpufeature.h | 3 +- arch/arm64/include/asm/esr.h | 2 +- arch/arm64/include/asm/kernel-pgtable.h | 5 + arch/arm64/include/asm/kvm_hyp.h | 5 + arch/arm64/include/asm/memory.h | 15 ++- arch/arm64/include/asm/mmu_context.h | 23 ++++ arch/arm64/include/asm/percpu.h | 9 ++ arch/arm64/include/asm/pgtable-hwdef.h | 5 + arch/arm64/include/asm/pgtable.h | 12 +- arch/arm64/include/asm/suspend.h | 4 + arch/arm64/include/asm/tlbflush.h | 32 +++++- arch/arm64/include/asm/virt.h | 52 +++++++++ arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/cpufeature.c | 10 ++ arch/arm64/kernel/el1-vectors.c | 107 ++++++++++++++++++ arch/arm64/kernel/entry.S | 195 ++++++++++++++++++++++++++++++-- arch/arm64/kernel/head.S | 150 +++++++++++++++++++++++- arch/arm64/kernel/setup.c | 22 ++++ arch/arm64/kernel/smp.c | 6 + arch/arm64/kernel/traps.c | 6 + arch/arm64/kernel/vmlinux.lds.S | 9 ++ arch/arm64/kvm/hyp.S | 5 + arch/arm64/kvm/hyp/switch.c | 21 +++- arch/arm64/mm/init.c | 2 + arch/arm64/mm/mmu.c | 2 + arch/arm64/mm/pgd.c | 23 +++- arch/arm64/mm/proc.S | 69 ++++++++++- drivers/clocksource/arm_arch_timer.c | 2 +- 31 files changed, 792 insertions(+), 29 deletions(-) 792 insertions(+) 29 deletions(-)
  • 66. It works EL2 Kernel boot CPU started in EL2 CPU features: detected feature: Runs at EL2 CPU: All CPU(s) started at EL2
  • 67. Conclusions • It is possible to run Linux in EL2 • It’s a bit invasive, but not overly so • Potential performance benefits, remains to be measured • To Upstream or not to Upstream; that’s the question