Stuart Yoder Software Architect June 2012

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