Multicore Expert Series: How to Solve Multicore Partitioning

TM
Stuart Yoder
Software Architect
June 2012
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire,
ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis, mobileGT, PowerQUICC,
Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of
Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack,
CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and
Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service
names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
.
•
Embedded Consolidation
•
Overview of KVM
•
Performance Considerations
•
Status/Roadmap
TM
2
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire,
ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis, mobileGT, PowerQUICC,
Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of
Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack,
CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and
Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service
names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
.
control
data
App
OS
control
App
data
App
App
hardware
OS
OS
hardware
OS
hardware
•
Take multiple discrete systems/domains on separate
processors and consolidate on a single multi-core processor.
•
Benefits:
в€’ Cost
savings (bill-of-material, power)
в€’ Flexibility
TM
4
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
App
OS
App
OS
hardware
•
Migration – move to new hardware, preserve investment in software
в€’
•
•
•
Run legacy software alongside Linux
Provide an isolated environment where untrusted software can run
Dynamic resource management
High availability – active/standby configuration without additional
hardware
TM
5
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
control
data
control
data
control
data
hypervisor
Multiple Processors
/ Boards
control
Unsupervised AMP
data
control
LinuxВ®
KVM
control
data
USDPAA
Linux Containers
= OS
6
data
LinuxВ®
LinuxВ®
= hardware
TM
Topaz
(Supervised AMP)
= App
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
Good performance, but at cost
of fragility and complexity
•
Agreement by all OSes required
on how memory and I/O devices
are partitioned
•
•
Cooperation by all OSes
required for initializing and
managing global resources
data
control
App
App
OS
OS
CPU
I/O
MMU
Complexities: boot sequence,
OS reboot, error management,
debugging
CPU
Memory
CPU
Memory
Interrupt
Controller
I/O
I/O
Unsupervised AMP
TM
7
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
A lightweight framework for
partitioning an SoC
•
Partition CPUs, memory, I/O
devices (no scheduler)
•
•
•
data
Gives you the best of both
worlds–performance
comparable with AMP with
enforced partitioning
Topaz
Solves many of the
headaches of running
multiple unsupervised Oses
App
OS
OS
CPU
Memory
CPU
Memory
Interrupt
Controller
Supported cores: e500mc,
e5500
TM
App
CPU
I/O
MMU
control
I/O
8
I/O
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
•
•
•
•
data
KVM/QEMU – open source
virtualization technology based
on the Linux kernel
App
Run virtual machines alongside
Linux applications
App
control
App
App
OS
OS
Virtual Machines (VMs) are fully
isolated from rest of the system
KVM
LinuxВ®
Number of VMs supported is
limited only by available
resources (CPU cycles,
memory)
CPU
I/O
MMU
Virtual I/O capabilities
CPU
Memory
Interrupt
Controller
I/O
TM
CPU
9
I/O
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
Linux Containers provides
OS-level virtualization
data
App
в€’ Provides
low-overhead,
lightweight, secure partitioning of
Linux applications into different
domains
control
App
App
App
в€’ Can
control resource utilization of
domains – CPU, I/O utilization
LinuxВ®
в€’ Linux
Containers is based on a
collection of technologies
including kernel and user-space
components (LXC).
CPU
I/O
MMU
CPU
CPU
Memory
Interrupt
Controller
I/O
TM
10
I/O
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
•
Infrastructure to build Linux
based networking applications
data
control
App
Bare metal performance with the
rich APIs available in Linux
App
App
App
LinuxВ®
CPU
I/O
MMU
CPU
CPU
Memory
Interrupt
Controller
I/O
TM
11
I/O
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
These technologies are not
mutually exclusive:
в€’ Run
USDPAA on a Linux guest on
Topaz
в€’ Run
USDPAA
App
USDPAA in a Linux container
OS
в€’ Run
a KVM virtual machine in a
Linux container
App
App
LinuxВ®
KVM
hardware
TM
12
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
Unsupervised AMP
− High-performance–
•
Topaz
в€’ Static
•
partitioning of hardware
Linux containers
в€’ Partitioning
•
at cost of fragility, complexity
of Linux applications
KVM
в€’ Virtual
machines in a Linux environment
TM
13
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
control
data
control
data
control
data
hypervisor
Multiple
processors/boards
control
data
LinuxВ®
KVM
TM
Unsupervised AMP
control
data
LinuxВ®
Linux Containers
14
Topaz
(Supervised AMP)
control
data
LinuxВ®
USDPAA
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire,
ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis, mobileGT, PowerQUICC,
Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of
Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack,
CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and
Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service
names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
.
•
•
•
•
•
•
•
KVM/QEMU– open source
virtualization technology based on
the Linux kernel
Supports e500v2, e500mc, e5500
CPUs
No or minimal OS changes required
Virtual I/O – virtual disk, network
interfaces, serial
Direct/pass thru I/O – assign SoC
devices to partitions (some
limitations)
ePAPR compliant
e500v2 uses paravirtualization (OS
modifications) for improved
performance
TM
16
Virtual
Machine 1
Virtual
Machine 2
App
App
App
QEMU
kvm
OS
QEMU
OS
LinuxВ® Kernel
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
QEMU provides
в€’ Virtual
QEMU
machine setup
VM init,
boot
в€’ Initialization
в€’ Memory
•
allocation
в€’ Virtual
I/O services
в€’ Debug
stub
App
OS
debug
KVM provides
в€’ Virtual
KVM
CPU services
LinuxВ®
Kernel
в€’ API
used by QEMU (see
Documentation/kvm/api.txt)
•
Virtual
I/O
App
Virtual
CPU
Kernel schedules VMs
TM
17
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
Embedded Power ArchitectureВ® Platform
Requirements (ePAPR)
• A platform standard from Power.org
• Standard for how to boot an embedded OS
•
Standard
interfaces
в€’ Device
tree standards
в€’ Multi-CPU boot
в€’ Definition of initial state of system
OS
B oot Program
•
Version 1.1 released in 2011
в€’ Virtualization
extensions-- /hypervisor node,
hcall ABI, set of hcall APIs
в€’ Hardware thread representation
TM
18
hardware
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
Each CPU in a virtual
machine is Linux thread
(created by QEMU)
QEMU
App
App
OS
•
Full capabilities of the Linux
scheduler can be used to
manage VCPUs/threads
в€’ CPU
VCPU
affinity
в€’ priority
в€’ Isolcpus
KVM
(Isolate CPUs)
TM
LinuxВ®
Kernel
19
Virtual
CPU
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
Enables sharing of host network
interfaces
• Host
в€’ Bridge
(virtual switch) is
connected to physical host
interface
в€’ QEMU uses tun/tap device
connected to the bridge
•
App
App
App
OS
QEMU
QEMU
tap0
Guest
LinuxВ®
в€’ Each
guest sees a private “virtio”
network device on PCI bus
в€’ Virtio network driver is needed in
guest
TM
Partition 2
Partition 1
20
OS
tap1
br0
eth0
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
Give each guest a
private storage device
Partition 1
Partition 2
App
App
•
App
Virtual disk could be
single binary image on
host file system or
logical volume on the
host’s disk
OS
QEMU
QEMU
OS
LinuxВ®
TM
21
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
•
Debug stub in QEMU
allows guest debugging
using GDB
QEMU
VM init,
boot
QEMU monitor shell allows
examining VM state
Virtual
I/O
App
App
OS
debug
monitor
KVM
Linux
Kernel
Virtual
CPU
GDB
TM
22
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire,
ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis, mobileGT, PowerQUICC,
Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of
Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack,
CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and
Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service
names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
.
QEMU
VM init,
boot
App
Virtual
I/O
OS
debug
KVM
LinuxВ®
Kernel
TM
Virtual
CPU
24
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
The performance overhead when running on a hypervisor
is workload dependent
•
Sources of CPU overhead when running under a
hypervisor
в€’ Privileged
operations

Instructions– e.g. TLB operations (tlbwe, tlbilx, tlbsx)
 Privileged SPRs– e.g. DEC, timer control registers
в€’ Exceptions
– Decremeter, TLB misses, DSI/ISI, external interrupts,
etc.
в€’ Emulated I/O accesses
в€’ Hypercalls
в€’ Scheduling / Context switches
TM
25
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
ehpriv
•
msgclr
•
ehpriv
•
msgsnd
•
msgclr
•
rfci
•
msgsnd
•
rfdi
•
rfci
•
rfmci
•
rfdi
•
tlbivax
•
rfmci
•
tlbre
•
tlbivax
•
tlbsx
•
tlbre
•
tlbsync
•
tlbsx
•
tlbwe
•
tlbsync
•
tlbilx
e500mc/e5500
TM
e6500
26
With LRAT
tlbwe and tlbilx
can be executed
by guest OS
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
BUCSR
CDCSR0
CSRR0
CSRR1
DAC1
DAC2
DBCR0
DBCR1
DBCR2
DBCR4
DBSR
DBSRWR
DEC
DECAR
DSRR0
DSRR1
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
TM
HID0
IAC1
IAC2
IVOR13
IVOR14
IVOR0
IVOR1
IVOR2
IVOR3
IVOR4
IVOR5
IVOR6
IVOR7
IVOR8
IVOR9
IVOR10
IVOR11
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
IVOR12
IVOR13
IVOR14
IVOR15
IVOR35
IVOR36
IVOR37
IVOR38
IVOR39
IVOR40
IVOR41
IVPR
L1CSR0
L1CSR1
L1CSR2
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
27
L2CAPTDATAHI
L2CAPTDATALO
L2CAPTECC
L2CSR0
L2CSR1
L2ERRADDR
L2ERRATTR
L2ERRCTL
L2ERRDET
L2ERRDIS
L2ERREADDR
L2ERRINJCTL
L2ERRINJHI
L2ERRINJLO
L2ERRINTEN
•
•
•
•
•
•
•
•
•
•
•
•
•
MCAR
MCSR
MCSRR0
MCSRR1
MMUCFG
MMUCSR0
SPRG9
TBL(W)
TBU (W)
TCR
TLB0CFG
TLB1CFG
TSR
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
QEMU
User mode
MSR[PR]=1
TM
App
Guest
OS
LinuxВ®
Kernel
Kernel mode
MSR[PR]=0
App
KVM
MPIC
28
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
QEMU
App
User
MSR[PR]=1
MSR[GS]=0
App
Guest
OS
LinuxВ®
Kernel
Hypervisor
MSR[PR]=0
MSR[GS]=0
Guest User
MSR[PR]=1
MSR[GS]=1
Guest Kernel
MSR[PR]=0
MSR[GS]=1
KVM
MPIC
TM
29
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
TM
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire,
ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis, mobileGT, PowerQUICC,
Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of
Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack,
CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and
Xtrinsic are trademarks of Freescale Semiconductor, Inc. All other product or service
names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
.
•
Use cases
в€’ Need
to run OS in addition to Linux on the same system
в€’ Need
to run older version of Linux
в€’ Sandboxing
isolation – a guest kernel crash will not affect rest of system
в€’ Fault
•
untrusted software
Other considerations
в€’ Linux
is the hypervisor
в€’ Performance
в€’ Real
time / determinism
TM
31
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
KVM/QEMU are available in Freescale QorIQ SDKs
•
Supports e500v2, e500mc, e5500
•
New capabilities in SDK 1.2 (June 2012)
в€’ SMP
(multiple CPUs in a VM)
в€’ 64-bit
support
в€’ Support
for memory allocation by hugetlbfs
в€’ Improved
error management
TM
32
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
•
Upstream
в€’ All
•
KVM and QEMU development will go upstream
Plans
в€’ Current

Plan is to move to a new Linux infrastructure for doing user space I/O
called “vfio”, which includes IOMMU support.
в€’ E6500

direct map support is preliminary-- no IOMMU support
CPU Support
Including LRAT (Logical to Real Address Translation)
в€’ Performance
improvements
в€’ Virtual Time in guests
в€’ Future: Direct external interrupts, Real time, virtual machine
management
TM
33
Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,
mobileGT, PowerQUICC, Processor Expert, QorIQ, Qorivva, StarCore, Symphony and VortiQa are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. Airfast, BeeKit, BeeStack, CoreNet, Flexis, MagniV, MXC, Platform in a Package, QorIQ Qonverge, QUICC Engine,
Ready Play, SafeAssure, the SafeAssure logo, SMARTMOS, TurboLink, Vybrid and Xtrinsic are trademarks of Freescale Semiconductor, Inc. All
other product or service names are the property of their respective owners. В© 2012 Freescale Semiconductor, Inc.
TM