摘要 |
A method includes receiving, from a requesting guest environment, a device call requesting access to a device; sending the device call to an emulating guest environment, the emulating guest environment emulating the device; receiving, from the emulating guest environment, a result of the device call; and sending the result of the device call to the requesting guest environment. |
主权项 |
1. A method, comprising:
receiving, from a requesting guest environment by creating a first virtual machine, a device call requesting access to a device, wherein the requesting guest environment as a part of the first virtual machine contains a developmental code being evaluated for the first virtual machine performance on a computing system having parameters of the first virtual machine; sending the device call to an emulating guest environment by creating a second virtual machine, the emulating guest environment emulating the device, wherein the emulating guest environment as a part of the second virtual machine contains a device code operable to emulate the function of the device and to read the data that was part of the device call made by the developmental code and return the same output as the device being virtualized would return; receiving, from the emulating guest environment, a result of the device call; and sending the result of the device call to the requesting guest environment, wherein the requesting guest environment and the emulating guest environment are coroutines as a group, wherein a coroutine comprises a cooperative operation of the requesting guest environment and the emulating guest environment, where the requesting guest environment and the emulating guest environment use shared resources, and wherein control of the method switches between the requesting guest environment and the emulating guest environment so that only one of the requesting and emulating guest environments is active at a time. |