BACKGROUND

Trusted execution environments may be used to provide some physical components as logical objects in order to allow running various software modules, for example, multiple operating systems, concurrently and in isolation from other software modules, on one or more interconnected physical computer systems. Trusted execution environments may allow, for example, for consolidating multiple physical servers into one physical server running multiple guest virtual machines in order to improve the hardware utilization rate.

Virtualization may be achieved by running a software layer, often referred to as a hypervisor, above the hardware and below the trusted execution environment, such as guest virtual machines or containers. A hypervisor may run directly on the server hardware without an operating system beneath it or as an application running on a traditional operating system. A hypervisor may virtualize the physical layer and provide interfaces between the underlying hardware and trusted execution environments. In some cases, the trusted execution environments may be encrypted for security purposes.

SUMMARY

The present disclosure provides new and innovative systems and methods for hypervisor level signature checks for encrypted trusted execution environments, such as virtual machines. In an example, a system includes a hypervisor, a memory, and boot firmware stored in the memory. The boot firmware is configured to execute on a processor to load a trusted code that includes a condition checker from the hypervisor, check a signature of the trusted code, and verify the signature is trusted by a guest. The boot firmware is also configured to load the trusted code into an encrypted memory at a known guest address. The hypervisor is configured to protect the known guest address. The trusted code includes a first instruction, one or more intermediate instructions, and a final instruction. The first instruction and the final instruction are exits to the hypervisor. The hypervisor is also configured to execute the condition checker and detect an inconsistency in guest memory.

In an example, a method includes loading, by a boot firmware, a trusted code that includes a condition checker from the hypervisor. The boot firmware checks a signature of the trusted code and verifies that a guest trusts the signature. Then, the boot firmware loads the trusted code into an encrypted memory at a known guest address. The trusted code includes a first instruction, one or more intermediate instructions, and a final instruction. The first instruction and the final instruction are exits to the hypervisor. The method also includes protecting, by the hypervisor, the known guest address. The hypervisor also executes the condition checker and detects an inconsistency in guest memory.

In an example, a non-transitory machine-readable medium storing code, which when executed by a processor is configured to load a trusted code that includes a condition checker from the hypervisor, check a signature of the trusted code and verify the signature is trusted by a guest. The non-transitory machine-readable medium is also configured to load the trusted code into an encrypted memory at a known guest address and protect the known guest address. The trusted code includes a first instruction, one or more intermediate instructions, and a final instruction. Additionally, the first instruction and the final instruction are exits to the hypervisor. The non-transitory machine-readable medium is also configured to execute the condition checker and detect an inconsistency in the guest memory.

Additional features and advantages of the disclosed method and apparatus are described in, and will be apparent from, the following Detailed Description and the Figures. The features and advantages described herein are not all-inclusive and, in particular, many additional features and advantages will be apparent to one of ordinary skill in the art in view of the figures and description. Moreover, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and not to limit the scope of the inventive subject matter.

