The handset vendors are selling their products by the millions. And they crank out new models every few months. That would lead the consumer to believe that it's easy to design and manufacture new handsets. But a good engineer knows that that's far from the truth. Even adding a few features to an existing model can be a tricky path to navigate.
But what if the handset you were designing wasn't designed using actual hardware, but with virtual hardware? That would make changes to the design go very quickly, assuming the virtual models were accurate.
In the case of the Motorola Evoke handset, the initial design was done using virtualization technology. In addition to increasing the performance of the handset, it also greatly simplified the task of spinning out new models in the same family. Motorola's goal in this design was to do a CPU consolidation and get smartphone-like functionality from a bill-of-materials typically associated with a mid-tier handset.
It's positioned in their product line as a messaging phone, and it’s appeared in a number of geographical markets. The Evoke is based on a Qualcomm chipset. The consolidation that took place was achieved by virtualizing all the major functions. This allows the designers to get more performance from the processor without raising the BOM.
“The OKL hypervisor, or microvisor as we like to call it, is native on a very large swath of Qualcomm chip sets and ships on 500 million phones in one form or another,” says Bill Weinberg, a virtualization expert who works with Open Kernel Labs (OK Labs). “OK Labs ships pre-virtualized guest OSs off the shelf, so it's easy to virtualize the stacks and it gives you a big head start. The real bottlenecks occur in the integration with the hardware and the choice of which of the guests owns which device drivers. Then, from an integration standpoint, you give each guest access to the different pieces of hardware that they need to do their job.”
In a traditional handset design, there's often dedicated silicon for each function. In some cases, they are separate ICs; in others they are separate die in a multi-chip module. They can also be different blocks of silicon on an SoC. This could result in potential communication bottlenecks if the partitioning is not handled correctly. The kinds of interconnects in place are typically serial buses of varying speeds and bandwidths. Shared memory interfaces can also be problematic as they are not always optimized for the functions present on the phone.
These two challenges can be addressed by employing the virtualization concept. Obviously, the virtualized design will have shared-memory interfaces, because these are virtual processors, not physical processors. But the single virtualized processor offers better options for implementing the shared memory interface among virtual machines. In addition, these shared memory interfaces are very secure.
The time investment associated with a virtualized design depends on a number of factors, including the chosen hardware, the operating system of choice, and the real-time requirements.
“If a customer has a proprietary OS that we haven't worked with, it could cause a delay,” says Ram Sarabu, a senior product manager at OK Labs. “But if it's an off the shelf product that we've already virtualized, it'll go smoothly. The same thing is true on the hardware side. If it's a processor that we already support, the integration goes smoothly. Those are the kind of dependencies that must be considered when you estimate the time it'll take to do the integration.”
Motorola also discovered during the design process that that they had a shared TCP/IP stack and were able to handle a dedicated connection to each of the guests. This resulted in a significant increase in their networking performance.The Evoke runs the Linux OS, and it also handles BREW applications. Because both APIs are in place, they can launch and run BREW applications under Linux. The BREW application is then running in its own virtual machine on top of the BREW APIs.
One may ask why every handset isn't designed in this manner. “One reason is tradition, and the availability of mobile virtualization is relatively recent,” says Weinberg. “And there's still some skepticism around virtualization.”
It's also true that many designers simply are not aware of the potential benefits of virtualization. The technology has made a name for itself in the server space, but it's fairly new in mobile markets. In the server area, the virtual machines are hosted on top of a hypervisor, on top of an operating system, where it essentially lives inside a single application.
The technology deployed by OK Labs is more akin to data center mainframe virtualization, where the OS is booted into the hypervisor, which in turn boots each of the guest OSs. In this configuration, the hypervisor is supervising the whole system.
The OK Labs hypervisor, called OKL4, includes a microkernel. Hence, it's capable of enforcing security policy. This is not always the case with competitive products. In some cases, the alternative hypervisors rely on an RTOS as the primary guest OS and everything else is wrapped into a secondary guest OS. A problem with this approach is that if the guest fails or is compromised, the whole system can be affected.