26
Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Embed Size (px)

Citation preview

Page 1: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Virtualization:Not Just For Servers

Hollis BlanchardPowerPC kernel hacker

Page 2: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Topics Definitions Benefits Tradeoffs Embedded Virtualization Use Cases Embedded Issues with Virtualization Conclusion

Page 3: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Virtualization from 10,000 feet Securely share hardware between multiple guest software stacks

Minimize changes to guest software A host kernel manages the hardware resources

Could multiplex hardware; could just provide isolation KVM: Linux as host kernel

Isolation is a requirement Fault containment, security Host kernel must be more privileged than guests

kernel

app app

processor

guest

app app

guest

app app

host

processor

Page 4: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Virtualization Flavors Full virtualization: no guest kernel modifications at all

Privileged operations in the guest are either handled by hardware or emulated by software

Performance could benefit from guest co-operation Paravirtualization: remove all privileged operations from guest kernel

Including MMU and interrupt control Probably requires extensive source code modifications

Balance: good performance, minimize guest modifications Use full virtualization for most operations, but modify guest in performance-critical

areas

Page 5: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Virtualization Benefits

Page 6: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Benefits of Server Virtualization Workload consolidation

Increase server utilization Reduce capital, hardware management, power, space, heat costs

Legacy OS support Especially with large slow-moving 3rd-party software products

Instant provisioning Easily create new virtual machines Easily reallocate resources (memory, processor, IO) between running virtual

machines Migration

Predicted hardware downtime Workload balancing

Page 7: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Benefits of Embedded Virtualization Workload consolidation Flexible resource provisioning License barrier Legacy software support

Especially important with dozens or hundreds of embedded operating systems, commercial and home-brew

Improve reliability Improve security

Page 8: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Virtualization Tradeoffs

Page 9: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Virtualization Tradeoffs There is a performance tradeoff

Applications that used to own the whole processor must now share it Hypervisor adds some runtime overhead too Full virtualization without hardware support means software emulation

Increase in management complexity Old scenario: two software stacks + two hardware systems New scenario: two software stacks + one hardware system + one host kernel

More abstraction, more software layers, more complexity... More bugs

Increases size of Trusted Computing Base Increases impact of (unpredicted) hardware failure

Page 10: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Embedded Virtualization Use Cases

Page 11: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Workload Consolidation Consolidate legacy systems

legacy SW

legacy HWhost kernel

legacySW

new HW

legacy SW

legacy HW

legacySW

legacySW

Page 12: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Legacy Software Run legacy software on new core/chip/board with full virtualization

legacySW

legacy HWhost kernel

legacySW

new HW

newSW

Page 13: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Legacy Software Consolidate legacy software

RT appproprietary

kernel

core

Linux/KVM

visualizationapp

core

RT app

proprietarykernel

core

Linux

visualizationapp

core

Page 14: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Multicore Enablement Legacy uniprocessor applications

legacyapp

core

legacykernel

core

multicore kernel

core core core

host kernel

app app app

legacykernel

legacyapplegacy

app

Page 15: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Multicore Enablement Flexible resource management

core core core core

host kernel

dataplane

dataplane

controlplane

data

control

Page 16: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Improved Reliability Hot standby without additional hardware

HW

host kernel

HW

backupapp

app

app

HW

backupapp

HW

app

Page 17: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Secure Monitoring Protect monitoring software

host kernel

HW

monitorapp

HW

app

kernelkernel

networknetwork

Page 18: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Embedded Virtualization Issues

Page 19: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Memory/flash footprint Is Linux too big to be a host kernel?

Weren't you going to run Linux anyways? Do you need multiple copies of Linux?

Different kernel versions Greater performance and functional isolation than plain Linux tasks

Extremely tight footprint requirements? See TRANGO

Page 20: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Security Host kernel must be certified

Increases size of Trusted Computing Base Extreme security requirements? See Green Hills Software's “Padded Cell”

Page 21: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Direct IO Access Guest can directly access physical IO without host involvement

Native speed IOMMU provides isolation and physical address translation (DMA)

Translation could be done with guest modifications Issues:

IOMMU required for DMA isolation Limited by number of physical IO devices Guests must have device drivers What about legacy guests on new hardware? Breaks migration IRQ delivery and routing

Page 22: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Emulated IO Host software emulates guest IO accesses Issues:

Must write software to (perfectly?) emulate hardware Dramatic increase in IO latency Host OS must have physical device drivers

Device driver availability, licensing concerns

Page 23: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Virtual IO No hardware at all, just inter-guest data transfer New guest device drivers co-operate with host Issues:

Requires guest modification (at least new device drivers) Host OS still needs physical IO drivers

Page 24: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Real-time support RTOS + Linux model Requires RT support in host kernel Scheduling

Dedicated cores? Time-sharing adds context switch latency

Interrupt handler latency Direct IO access?

Linuxtask

RTOS

core

Linux/KVM

RTOStask

core

device

Page 25: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Hardware Virtualization Support Efficient virtualization requires hardware support

Goal: minimize performance overhead and modifications to guests Architecture support

High-end x86 (Intel VT, AMD SVM) High-end PowerPC (PowerPC 970) Embedded PowerPC virtualization architecture announced ARM TrustZone

Page 26: Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker

Conclusion There is overlap between server and embedded virtualization scenarios, but

also scenarios and issues unique to embedded systems. Deploying virtualization is an engineering tradeoff, but virtualization offers

some compelling advantages for embedded applications.