Hardware assisted Virtualization in
                 Embedded
                                Tanveer Alam
                Platform Architect – Embedded Virtualization



Sponsored by:

                &
Agenda

 Embedded Virtualization
     What is embedded?
     Embedded specific requirements
     Key Embedded Use Cases
     Hardware Virtualization Features Review


 Embedded Virtualization and Retail/Digital Signage– OS Soft
  Failover Proof-of-Concept Example

 Embedded Virtualization and Medical – Critical OS Isolation
  Proof-of-Concept Example

 Call to Action

      Other names and brands may be claimed as the property of others.
      Copyright © 2010, Intel Corporation                                Intelligence Where You Need It   2
Embedded Virtualization




                                                                                       Medical
    Industrial

                                                                       Energy




                Retail                                                          Automotive

    Other names and brands may be claimed as the property of others.
    Copyright © 2010, Intel Corporation                                              Intelligence Where You Need It   3
Technical requirements for Embedded Virtualization

 Smaller code base – lesser points of failure
 Highly robust and reliable
 Remote management
 Certification
 Legacy code
 Consolidation + Critical function isolation/partitioning
 Real time
 Easy and fast to implement – “turnkey”




    Other names and brands may be claimed as the property of others.
    Copyright © 2010, Intel Corporation                                Intelligence Where You Need It   4
Embedded Virtualization Usage Models
                              Legacy OS Consolidation                                                   Trusted/Open Application Integration

         Legacy OS                          Legacy OS                                                                               Embedded OS with
                                                                                                        Media                         GUI, calendar,
      (Single threaded:                   (Single threaded:
                                                                                 Guest OS             (Phone, Video)
     RTOS e.g. VxWorks)                  RTOS e.g VxWorks)
                                                                                                        Application                    voice mail,
                                                                                                                                       games etc.


                                      Thin Hypervisor                                                                  Thin Hypervisor
                                                                                                        CPU 0                                  CPU 1
                                VT-x & VT-d enabled
                                                                                                       Antenna                    VT-x & VT-d enabled
                            Multi-Core Intel® Architecture                                                                     Multi-Core Intel Architecture



                            RTOS & GPOS Consolidation                                               Performance-Critical Application Separation

       Linux* X-windows                                                                                                                         User Space
                                                                 Real Time Kernel                  Modified NetBSD*
                  MS Windows*                                                                        SMP kernel                                  Standard
                           API                                      Real Time Process                IP Stack Changes                             NetBSD


                                          Hypervisor                                                                     Hypervisor
           CPU 0                                                                 CPU 1               CPU 0                                        CPU 1
             NIC                                                                 Chipset              NIC                                         Chipset
                    VT-x & VT-d enabled Multi-Core Intel Architecture                                  VT-x & VT-d enabled Multi-Core Intel Architecture


 VT-x: Intel® Virtualization Technology (Intel® VT) for IA-32, Intel® 64 and Intel® Architecture
 VT-d: Intel® Virtualization Technology (Intel® VT) for Directed I/O
 * Other names and brands may bebrands may beproperty of others.
             Other names and claimed as the claimed as the property of others.
             Copyright © 2010, Intel Corporation                                                                                    Intelligence Where You Need It   5
Intel® Virtualization Technology Review - HW Virtualization

   Extended Page Tables                                                Virtual Processor ID (VPID)
           (EPT)
                                                                             VPID [0:15]


                                                                              Guest 0
                                                                                           VPID [0:15]



                                                                                           Guest 1




   Preemption Timer / Pause                                               VT-d I/O Virtualization
           Loop Exit                                                        DMA remap
                                                                            PCIe pass-through
    Guest 0                                                                 Interrupt remap

                                      Guest 1




    Other names and brands may be claimed as the property of others.
    Copyright © 2010, Intel Corporation                                                              Intelligence Where You Need It   6
Virtualization in Embedded : Soft Failover Proof-of-Concept




    Other names and brands may be claimed as the property of others.
    Copyright © 2010, Intel Corporation                                Intelligence Where You Need It   7
Virtualization in Embedded : Soft Failover

                                                                   Automatic
                                                                    System
                                                                   Recovery




                                                                                 Real-time task
                         Preserve Critical
                                                                                pointer tracking
                          Data and State
                                                                                  and resume




                                                                 Requires No
                                                                  Network
                                                                 Connectivity




     Other names and brands may be claimed as the property of others.
     Copyright © 2010, Intel Corporation                                                           Intelligence Where You Need It   8
Virtualization in Embedded : Soft Failover
                        Xen DomU (P)                                       Xen DomU (B)




                                                                               Ryarc Player




                                           Samba
                                                                             Heartbeat Mon
                              Samba                     Xen Dom0 Host OS        daemon




     Other names and brands may be claimed as the property of others.
     Copyright © 2010, Intel Corporation                                                      Intelligence Where You Need It   9
Virtualization in Embedded : Soft Failover

 Specifications:


          Software                                                       Rev/Version
          Linux Kernel                                                   2.6.32.26
          Fedora                                                         14 (64 bits)
          Xen pvops                                                      4.1
          Video Player                                                   Ryarc
          File Share                                                     Samba




      Other names and brands may be claimed as the property of others.
      Copyright © 2010, Intel Corporation                                               Intelligence Where You Need It   10
Virtualization in Embedded: Medical Proof-of-Concept




    Other names and brands may be claimed as the property of others.
    Copyright © 2010, Intel Corporation                                Intelligence Where You Need It   11
Virtualization in Embedded : Critical Path Isolation (Medical) PoC


                                             RHEL*                                                                                 VGA
                                                                                            Windows* XP
          RHEL*                                                                                                                   Display
           HDD
                                           SQL Database


                                              BT Driver                            Waveform Display   VNC* terminal               Windows
                                                                                                                                   *HDD




                                           Bare Metal Hypervisor (e. g. Xen or Commercial VMM)


       USB Drive
    (VMM/Hypervisor)



                                                                                                 VT-x : VMX & HW
                                                                                                      assist

                                                  VT-d : DMA & Interrupt Remapping




                                                                         RHEL*           Windows*
                                                  Bluetooth                              Ethernet
                                                                        Ethernet




     Other names and brands may be claimed as the property of others.
     Copyright © 2010, Intel Corporation                                                                              Intelligence Where You Need It   12
Virtualization in Embedded : Critical Path Isolation (Medical)

                             100

                             90

                             80

                             70
           CPU Utilization




                             60

                             50                                                                              Windows
                                                                                                             Linux/RTOS
                             40

                             30

                             20

                             10

                              0
                                   1    2         3        4            5   6   7   8   9   10   11


                                                                 Running Processes



     Other names and brands may be claimed as the property of others.
     Copyright © 2010, Intel Corporation                                                              Intelligence Where You Need It   13
Virtualization in Embedded
Call to Action

            Few Embedded Challenges: real-time, simpler
               Dom0, fast path interVM comms

            Open to developing similar creative ideas using
               Xen and open source in the embedded domains.

            Explore Xen community collaboration
                 possibilities to enable better embedded
                 practical solutions.




    Other names and brands may be claimed as the property of others.
    Copyright © 2010, Intel Corporation                                Intelligence Where You Need It   14
References



 Resource                                                               Link
 Intel® HD Graphics Driver                                              http://support.intel.com

 Xen how-to guide                                                       http://wiki.xensource.com

 Xen VGA pass-though (using Intel® VT-d)                                http://wiki.xensource.com/xenwiki/XenPCIpassthrou
                                                                        gh
 Xen PCI pass-through (using Intel® VT-d)                               http://wiki.xensource.com/xenwiki/XenVGAPassthro
                                                                        ugh
 Intel Embedded Developer Site                                          http://edc.intel.com




     Other names and brands may be claimed as the property of others.
     Copyright © 2010, Intel Corporation                                                              Intelligence Where You Need It   15

Hardware assisted Virtualization in Embedded

  • 1.
    Hardware assisted Virtualizationin Embedded Tanveer Alam Platform Architect – Embedded Virtualization Sponsored by: &
  • 2.
    Agenda  Embedded Virtualization  What is embedded?  Embedded specific requirements  Key Embedded Use Cases  Hardware Virtualization Features Review  Embedded Virtualization and Retail/Digital Signage– OS Soft Failover Proof-of-Concept Example  Embedded Virtualization and Medical – Critical OS Isolation Proof-of-Concept Example  Call to Action Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 2
  • 3.
    Embedded Virtualization Medical Industrial Energy Retail Automotive Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 3
  • 4.
    Technical requirements forEmbedded Virtualization  Smaller code base – lesser points of failure  Highly robust and reliable  Remote management  Certification  Legacy code  Consolidation + Critical function isolation/partitioning  Real time  Easy and fast to implement – “turnkey” Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 4
  • 5.
    Embedded Virtualization UsageModels Legacy OS Consolidation Trusted/Open Application Integration Legacy OS Legacy OS Embedded OS with Media GUI, calendar, (Single threaded: (Single threaded: Guest OS (Phone, Video) RTOS e.g. VxWorks) RTOS e.g VxWorks) Application voice mail, games etc. Thin Hypervisor Thin Hypervisor CPU 0 CPU 1 VT-x & VT-d enabled Antenna VT-x & VT-d enabled Multi-Core Intel® Architecture Multi-Core Intel Architecture RTOS & GPOS Consolidation Performance-Critical Application Separation Linux* X-windows User Space Real Time Kernel Modified NetBSD* MS Windows* SMP kernel Standard API Real Time Process IP Stack Changes NetBSD Hypervisor Hypervisor CPU 0 CPU 1 CPU 0 CPU 1 NIC Chipset NIC Chipset VT-x & VT-d enabled Multi-Core Intel Architecture VT-x & VT-d enabled Multi-Core Intel Architecture VT-x: Intel® Virtualization Technology (Intel® VT) for IA-32, Intel® 64 and Intel® Architecture VT-d: Intel® Virtualization Technology (Intel® VT) for Directed I/O * Other names and brands may bebrands may beproperty of others. Other names and claimed as the claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 5
  • 6.
    Intel® Virtualization TechnologyReview - HW Virtualization Extended Page Tables Virtual Processor ID (VPID) (EPT) VPID [0:15] Guest 0 VPID [0:15] Guest 1 Preemption Timer / Pause VT-d I/O Virtualization Loop Exit  DMA remap  PCIe pass-through Guest 0  Interrupt remap Guest 1 Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 6
  • 7.
    Virtualization in Embedded: Soft Failover Proof-of-Concept Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 7
  • 8.
    Virtualization in Embedded: Soft Failover Automatic System Recovery Real-time task Preserve Critical pointer tracking Data and State and resume Requires No Network Connectivity Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 8
  • 9.
    Virtualization in Embedded: Soft Failover Xen DomU (P) Xen DomU (B) Ryarc Player Samba Heartbeat Mon Samba Xen Dom0 Host OS daemon Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 9
  • 10.
    Virtualization in Embedded: Soft Failover Specifications: Software Rev/Version Linux Kernel 2.6.32.26 Fedora 14 (64 bits) Xen pvops 4.1 Video Player Ryarc File Share Samba Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 10
  • 11.
    Virtualization in Embedded:Medical Proof-of-Concept Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 11
  • 12.
    Virtualization in Embedded: Critical Path Isolation (Medical) PoC RHEL* VGA Windows* XP RHEL* Display HDD SQL Database BT Driver Waveform Display VNC* terminal Windows *HDD Bare Metal Hypervisor (e. g. Xen or Commercial VMM) USB Drive (VMM/Hypervisor) VT-x : VMX & HW assist VT-d : DMA & Interrupt Remapping RHEL* Windows* Bluetooth Ethernet Ethernet Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 12
  • 13.
    Virtualization in Embedded: Critical Path Isolation (Medical) 100 90 80 70 CPU Utilization 60 50 Windows Linux/RTOS 40 30 20 10 0 1 2 3 4 5 6 7 8 9 10 11 Running Processes Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 13
  • 14.
    Virtualization in Embedded Callto Action  Few Embedded Challenges: real-time, simpler Dom0, fast path interVM comms  Open to developing similar creative ideas using Xen and open source in the embedded domains.  Explore Xen community collaboration possibilities to enable better embedded practical solutions. Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 14
  • 15.
    References Resource Link Intel® HD Graphics Driver http://support.intel.com Xen how-to guide http://wiki.xensource.com Xen VGA pass-though (using Intel® VT-d) http://wiki.xensource.com/xenwiki/XenPCIpassthrou gh Xen PCI pass-through (using Intel® VT-d) http://wiki.xensource.com/xenwiki/XenVGAPassthro ugh Intel Embedded Developer Site http://edc.intel.com Other names and brands may be claimed as the property of others. Copyright © 2010, Intel Corporation Intelligence Where You Need It 15