Communication method, device and equipment of Jailhome-Hypervisor and SPM and medium
The proposed method addresses the inefficiency in Jailhouse Hypervisor and SPM communication by using virtual machines and specific instructions to facilitate secure and efficient authentication and resource management, optimizing hardware usage and reducing costs.
Patent Information
- Application Number
- CN202510181267.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2045-02-19
AI Technical Summary
Current technologies lack an efficient and reliable method for communication between the Jailhouse Hypervisor and ARM EL3's Secure Monitor Program (SPM), which is crucial for secure world and normal world interaction and resource management, leading to underutilization of hardware resources and increased costs.
A method that involves creating business and secure virtual machines in both worlds, using SMC and ERET instructions to facilitate communication by converting authentication requests into SMC commands, sending them to SPM, and returning authentication results through ERET instructions, enabling secure and efficient interaction between Jailhouse Hypervisor and SPM.
This method enables efficient and secure communication between Jailhouse Hypervisor and SPM, allowing for effective authentication and resource management across secure and normal worlds, optimizing hardware usage and reducing costs by enabling multiple OS operations in the normal world while maintaining secure operations in the secure world.
Smart Images

Figure CN119645689A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer systems, and in particular to a communication method, device, equipment and medium between a jailhouse-hypervisor and an SPM. Background Art
[0002] Jailhouse is a semi-virtualized lightweight virtualization solution. Jailhouse focuses on the partitioning of hardware resources rather than the sharing and virtualization of hardware resources, so it can minimize the overhead and latency introduced by virtualization. According to business needs, Jailhouse can allocate resources such as CPU, memory, device interface, interrupt, etc. before running, and ensure the security and independence of resource allocation during operation, so as to realize the division of a multi-core CPU into multiple independent operating environments, each of which can run different operating systems and deploy different businesses.
[0003] The ARM architecture introduces TrustZone technology, which achieves higher security by dividing the system into a secure world and a normal world. On this basis, the ARM EL3 hierarchy allows developers to run a secure monitor (SPM) at the highest privilege level to manage and coordinate the security functions of the system. The Arm A-profile firmware framework (hereinafter referred to as FF-A) describes a software architecture that aims to achieve the following goals: apply virtualization extensions to isolate software images provided by different vendors; describe interfaces for standardizing communication between various software images, including communication between images in the secure world and the normal world. The main components of Arm FF-A are as follows: Partition Manager (PM), which is a hypervisor in the normal world and a secure partition manager (SPM) in the secure world. One or more sandbox partitions created by PM can be VMs in the normal world or the secure world. VMs in the secure world are called secure partitions (SP).
[0004] The GP standard clearly defines the interfaces provided to CA (Client Application) and TA (Trust Application) on the REE (Rich Execution Environment, which is a traditional server operating environment compared to TEE) and TEE (Trusted Execution Environment, which is a trusted environment based on isolation (generally hardware-based architecture) mechanism to protect confidential data, compared to REE), including the function name, function, parameter description, return value, etc. of the interface function. During the development of CA and TA, it is necessary to follow the interfaces defined by the GP standard to achieve communication and data transfer between TA and CA.
[0005] In many business scenarios, authentication and other actions are performed in the secure world. When Jailhouse is not running, the secure world can only communicate with the only operating system in the ordinary world. Running only one operating system greatly wastes hardware performance and increases hardware costs.
[0006] After running Jailhouse, although multiple operating systems can be run in the normal world, in the existing technology, there is a lack of an efficient and reliable method for communication between the Jailhouse Hypervisor and the SPM of ARM EL3. This communication is crucial for realizing information exchange and resource management between the secure world and the normal world. Summary of the invention
[0007] Based on this, it is necessary to provide a communication method, device, equipment and medium between Jailhouse-Hypervisor and SPM to address the above technical problems, so as to realize information interaction between Jailhouse Hypervisor and SPM.
[0008] In a first aspect, the present invention provides a communication method between a Jailhouse-Hypervisor and an SPM, which is applicable to the Jailhouse-Hypervisor, and the method includes: Create at least one business virtual machine in the normal world; the business virtual machine includes an operating system and business programs running on the operating system; each business program has a unique corresponding authentication program in the secure world; Convert the authentication request of the current business program into an SMC instruction, and send the SMC instruction to the SPM, so that the SPM sends the authentication content carried by the SMC instruction to the target authentication program, and generates an ERET instruction after the target authentication program performs an authentication operation according to the authentication content; the authentication request includes the authentication content and the secure virtual machine identifier; Receive the ERET instruction from SPM and send the authentication result carried by the ERET instruction to the current business program.
[0009] In one embodiment, converting the authentication request of the current service program into an SMC instruction and sending the SMC instruction to the SPM includes: Receive the HVC instruction generated when the business program calls the TEE driver of the operating system where it is located to initiate an authentication request; Convert HVC instructions into SMC instructions; Send SMC instructions to SPM.
[0010] In one embodiment, the service program runs on EL0 of the ARM architecture, the operating system of the service virtual machine runs on EL1 of the ARM architecture, and the Jailhouse-Hypervisor runs on EL2 of the ARM architecture; sending the authentication result carried by the ERET instruction to the current service program includes: Parse the ERET instruction to obtain the authentication result and business virtual machine identifier; Determine the target business virtual machine according to the business virtual machine identifier; Through the ERET instruction, switch from EL2 to EL1, and send the authentication result to the TEE driver of the operating system of the target business virtual machine; The operating system's TEE driver switches from EL1 to EL0 through the ERET instruction and sends the authentication result to the current business program.
[0011] In a second aspect, the present invention provides a communication method between a jailhouse-hypervisor and an SPM, which is applicable to the SPM, and the method includes: At least one secure virtual machine is created in the secure world; the secure virtual machine includes an operating system and an authentication program running on the operating system; each authentication program has a unique corresponding business program in the ordinary world; Receive the SMC instruction from Jailhouse-Hypervisor and send the authentication content carried by the SMC instruction to the target authentication program; After the target authentication program performs the authentication operation according to the authentication content, the ERET instruction carrying the authentication result and the business virtual machine identifier is sent to the Jailhouse-Hypervisor, so that the Jailhouse-Hypervisor sends the authentication result carried by the ERET instruction to the current business program.
[0012] In one embodiment, the authentication program runs on SEL0 of the ARM architecture, the operating system of the secure virtual machine runs on SEL1 of the ARM architecture, and the SPM runs on SEL3 of the ARM architecture; sending the authentication content carried by the SMC instruction to the target authentication program includes: Parse the SMC instruction to obtain the authentication content and authentication virtual machine identifier; Determine the target authentication virtual machine according to the authentication virtual machine identifier; Through the ERET instruction, switch from SEL3 to SEL1, and send the authentication content to the operating system of the target authentication virtual machine; The operating system of the target authentication virtual machine switches from SEL1 to SEL0 through the ERET instruction and sends the authentication content to the target authentication program.
[0013] In one embodiment, after the target authentication program performs the authentication operation according to the authentication content, an ERET instruction carrying the authentication result is sent to the Jailhouse-Hypervisor, including: Receiving an SMC instruction carrying an authentication result from a target authentication program; Parse the SMC command and obtain the authentication result; Generate an ERET instruction carrying the authentication result; The ERET instruction carrying the authentication result is sent to the Jailhouse-Hypervisor.
[0014] In a third aspect, the present invention further provides a communication device between a Jailhouse-Hypervisor and an SPM, which is applicable to the Jailhouse-Hypervisor, and includes: A first creation module is used to create at least one business virtual machine in the ordinary world; The first sending module is used to convert the authentication request of the current business program into an SMC instruction, and send the SMC instruction to the SPM, so that the SPM sends the authentication content carried by the SMC instruction to the target authentication program, and generates an ERET instruction after the target authentication program performs an authentication operation according to the authentication content; The first receiving module is used to receive the ERET instruction from the SPM, and send the authentication result carried by the ERET instruction to the current business program.
[0015] In a fourth aspect, the present invention further provides a communication device between a jailhouse-hypervisor and an SPM, which is applicable to an SPM, and includes: A second creation module, used to create at least one secure virtual machine in the secure world; The second receiving module is used to receive the SMC instruction from the Jailhouse-Hypervisor and send the authentication content carried by the SMC instruction to the target authentication program; The second sending module is used to send an ERET instruction carrying the authentication result and the business virtual machine identifier to the Jailhouse-Hypervisor after the target authentication program performs an authentication operation according to the authentication content, so that the Jailhouse-Hypervisor sends the authentication result carried by the ERET instruction to the current business program.
[0016] In a fifth aspect, the present invention further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: Create at least one business virtual machine in the normal world; the business virtual machine includes an operating system and business programs running on the operating system; each business program has a unique corresponding authentication program in the secure world; Convert the authentication request of the current business program into an SMC instruction, and send the SMC instruction to the SPM, so that the SPM sends the authentication content carried by the SMC instruction to the target authentication program, and generates an ERET instruction after the target authentication program performs an authentication operation according to the authentication content; the authentication request includes the authentication content and the secure virtual machine identifier; Receive the ERET instruction from SPM and send the authentication result carried by the ERET instruction to the current business program.
[0017] In a sixth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented: Create at least one business virtual machine in the normal world; the business virtual machine includes an operating system and business programs running on the operating system; each business program has a unique corresponding authentication program in the secure world; Convert the authentication request of the current business program into an SMC instruction, and send the SMC instruction to the SPM, so that the SPM sends the authentication content carried by the SMC instruction to the target authentication program, and generates an ERET instruction after the target authentication program performs an authentication operation according to the authentication content; the authentication request includes the authentication content and the secure virtual machine identifier; Receive the ERET instruction from SPM and send the authentication result carried by the ERET instruction to the current business program.
[0018] In the above-mentioned communication method, device, equipment and medium between Jailhouse-Hypervisor and SPM, Jailhouse-Hypervisor creates at least one business virtual machine in the ordinary world to achieve resource isolation; converts the authentication request of the current business program into an SMC instruction, and sends the SMC instruction to SPM, so that SPM sends the authentication content carried by the SMC instruction to the target authentication program, and generates an ERET instruction after the target authentication program performs an authentication operation according to the authentication content, so that information can be exchanged between Jailhouse-Hypervisor and SPM through the SMC instruction; receives the ERET instruction from SPM, and sends the authentication result carried by the ERET instruction to the current business program, thereby completing the authentication process between Jailhouse-Hypervisor and SPM. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments of the present invention or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 is a flow chart of a communication method between a Jailhouse-Hypervisor and an SPM in one embodiment; Figure 2 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0021] The technical scheme in the embodiment of the present invention is described clearly and completely below in conjunction with the accompanying drawings in the embodiment of the present invention. In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.
[0022] In an optional embodiment, a communication method between a Jailhouse-Hypervisor and an SPM is provided with a Jailhouse-Hypervisor as an execution subject. In this embodiment, the method includes the following steps: S110, creating at least one business virtual machine in the common world.
[0023] Among them, relative to the secure world, the ordinary world (also called the non-secure world) can be understood as a general operating area, where conventional operating systems and applications run to handle tasks such as daily computing and business logic; the secure world and the ordinary world are isolated from each other, and the secure world can be understood as an area with a higher security level, which is used to handle sensitive operations and security-related tasks, such as encryption tasks and authentication tasks.
[0024] In the normal world, Jailhouse-Hypervisor is used to create and manage business virtual machines in the normal world. Business virtual machines can be understood as virtual machines used to run specific business software and process business logic. Business virtual machines may include operating systems and business programs running on the operating systems. Business programs can be understood as applications used to implement specific business functions. Each business program has a unique corresponding authentication program in the secure world. Authentication programs can be understood as applications used for verification, such as: verifying identity and permissions, etc.
[0025] S120, converting the authentication request of the current business program into an SMC instruction, and sending the SMC instruction to the SPM, so that the SPM sends the authentication content carried by the SMC instruction to the target authentication program, and generates an ERET instruction after the target authentication program performs the authentication operation according to the authentication content.
[0026] Among them, the SMC (Supervisor Mode Call) instruction is generally used to switch between the normal world and the secure world to perform some operations or tasks that require a higher privilege level. The authentication content can be understood as information used for verification, such as a combination of a user name and a password. The target authentication program can be understood as an authentication program that performs authentication operations based on the authentication content. The ERET (Exception Return) instruction is generally used to switch the privilege level of the processor. In the ARM architecture, the privilege levels in the normal world include: EL0 (application running level), EL1 (operating system kernel running level), EL2 (virtualization related running level) and EL3 (highest security privilege level); the privilege levels in the secure world include: SEL0 (basic security level), SEL1 (specific security operation level), SEL2 (security mechanism management level) and SEL3 (highest security control level).
[0027] Optionally, in the normal world of the ARM architecture, business programs can run on EL0, the operating system can run on EL1, and the Jailhouse-Hypervisor can run on EL2; in the secure world of the ARM architecture, the authentication program can run on SEL0, the operating system can run on SEL1, and the SPM can run on SEL3.
[0028] In an optional embodiment, converting the authentication request of the current service program into an SMC instruction and sending the SMC instruction to the SPM includes: Receive the HVC instruction generated when the business program calls the TEE driver of the operating system where it is located to initiate an authentication request; Convert HVC instructions into SMC instructions; Send SMC instructions to SPM.
[0029] For example, under the ARM architecture, for the service program CA1 on the service virtual machine VM0 in the ordinary world: CA1 on EL0 will call TEEdriver (Trusted Execution Environment driver) running on GuestOS1 (the operating system where CA1 is located) on EL1 to initiate an authentication request. Specifically, TEE driver can send an authentication request to Jailhouse-Hypervisor of EL2 through ARM HVC assembly instructions; After receiving the HVC instruction, Jailhouse-Hypervisor will forward the authentication request to the SPM running in EL3 through the ARM assembly instruction SMC, thereby switching the execution of the program to the secure world.
[0030] S130, receiving an ERET instruction from the SPM, and sending the authentication result carried by the ERET instruction to the current service program.
[0031] In an optional embodiment, sending the authentication result carried by the ERET instruction to the current service program includes: Parse the ERET instruction to obtain the authentication result and business virtual machine identifier; Determine the target business virtual machine according to the business virtual machine identifier; Through the ERET instruction, switch from EL2 to EL1, and send the authentication result to the TEE driver of the operating system of the target business virtual machine; The operating system's TEE driver switches from EL1 to EL0 through the ERET instruction and sends the authentication result to the current business program.
[0032] The business virtual machine identifier may be understood as identification information used to match a target business virtual machine.
[0033] In this embodiment, the Jailhouse-Hypervisor creates at least one business virtual machine in the ordinary world to achieve resource isolation; converts the authentication request of the current business program into an SMC instruction, and sends the SMC instruction to the SPM, so that the SPM sends the authentication content carried by the SMC instruction to the target authentication program, and generates an ERET instruction after the target authentication program performs an authentication operation according to the authentication content, so that information can be exchanged between the Jailhouse-Hypervisor and the SPM through the SMC instruction; receives the ERET instruction from the SPM, and sends the authentication result carried by the ERET instruction to the current business program, thereby completing the authentication process between the Jailhouse-Hypervisor and the SPM.
[0034] In an optional embodiment, a communication method between a Jailhouse-Hypervisor and an SPM is provided with the SPM as the execution subject. In this embodiment, the method includes the following steps: S210, creating at least one secure virtual machine in the secure world.
[0035] Among them, a secure virtual machine (also called a secure partition) can be understood as a virtual machine used to process sensitive data and perform critical security operations.
[0036] S220, receiving the SMC instruction from the Jailhouse-Hypervisor, and sending the authentication content carried by the SMC instruction to the target authentication program.
[0037] In an optional embodiment, sending the authentication content carried by the SMC instruction to the target authentication program includes: Parse the SMC instruction to obtain the authentication content and authentication virtual machine identifier; Determine the target authentication virtual machine according to the authentication virtual machine identifier; Through the ERET instruction, switch from SEL3 to SEL1, and send the authentication content to the operating system of the target authentication virtual machine; The operating system of the target authentication virtual machine switches from SEL1 to SEL0 through the ERET instruction and sends the authentication content to the target authentication program.
[0038] The authentication virtual machine identifier can be understood as the identification information used to match the target authentication virtual machine. It should be noted that the ERET instruction cannot return directly from EL3 to EL0, because according to the ARM exception hierarchy design, the processor needs to switch context level by level through EL1 or EL2 to ensure that each exception level has the opportunity to handle exceptions and state recovery tasks.
[0039] For example, under the ARM architecture, for the authentication program TA1 on the secure virtual machine SP0 in the secure world: SPM parses the SMC instructions from Jailhouse-Hypervisor and determines the specific authentication content (e.g., request type) and the target authentication VM (SP0). Enter the TEE OS of SEL1 (the operating system where TA1 is located) through the arm assembly instruction ERET, and enter SEL0 through ERET again to send the authentication content to TA1; TA1 can perform authentication operations according to the authentication content and obtain the authentication result.
[0040] S230, after the target authentication program performs the authentication operation according to the authentication content, it sends the ERET instruction carrying the authentication result and the business virtual machine identifier to the Jailhouse-Hypervisor, so that the Jailhouse-Hypervisor sends the authentication result carried by the ERET instruction to the current business program.
[0041] In an optional embodiment, sending an ERET instruction carrying the authentication result to the Jailhouse-Hypervisor includes: Receiving an SMC instruction carrying an authentication result from a target authentication program; Parse the SMC command and obtain the authentication result; Generate an ERET instruction carrying the authentication result; The ERET instruction carrying the authentication result is sent to the Jailhouse-Hypervisor.
[0042] In this embodiment, SPM creates at least one secure virtual machine in the secure world to achieve resource isolation; receives SMC instructions from Jailhouse-Hypervisor, and sends the authentication content carried by the SMC instructions to the target authentication program, so that SPM can exchange information with Jailhouse-Hypervisor; after the target authentication program performs an authentication operation according to the authentication content, it sends an ERET instruction carrying the authentication result and the business virtual machine identifier to Jailhouse-Hypervisor, so that Jailhouse-Hypervisor sends the authentication result carried by the ERET instruction to the current business program, thereby completing the authentication process between Jailhouse-Hypervisor and SPM.
[0043] In an alternative embodiment, if Figure 1 As shown, a communication method between a Jailhouse-Hypervisor and an SPM is provided. In this embodiment, the method includes the following steps: S301, the business program CA1 on VM0 calls the TEE driver in GuestOS1 on EL1.
[0044] S302, the TEE driver in GuestOS1 on El1 sends an authentication request to the Jailhouse-Hypervisor of El2 through the ARM HVC assembly instruction; S303, after receiving the HVC instruction, the Jailhouse-Hypervisor will forward the authentication request to the SPM of EL3 through the ARM assembly instruction SMC, and complete the switching of the program execution to the secure world.
[0045] S304, SPM parses the SMC instruction from Jailhouse-Hypervisor and determines the specific request type and target security partition (SP0).
[0046] S305, SPM enters the TEE OS of SEL1 through the arm assembly instruction ERET, then enters SEL0 through ERET, and sends the request type to SP0.
[0047] S306, the authentication program TA1 in SP0 authenticates CA1.
[0048] S307, sending the authentication result to SPM via SMC instruction.
[0049] S308, SPM sends the authentication result directly to the Jailhouse-Hypervisor in the ordinary world through the ERET instruction.
[0050] S309, Jailhouse-Hypervisor parses the ERET instruction from SPM to determine the authentication result and the target business virtual machine (VM0).
[0051] S310, Jailhouse-Hypervisor sends the authentication result to the corresponding VM0 through the ERET instruction, which is received by the TEE driver in VM0.
[0052] S311, the TEE driver in VM0 sends the authentication result to the corresponding CA program (CA1) through the ERET instruction, thus completing a complete authentication process.
[0053] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0054] Based on the same inventive concept, an embodiment of the present invention further provides a Jailhouse-Hypervisor and SPM communication device for implementing the Jailhouse-Hypervisor and SPM communication method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more Jailhouse-Hypervisor and SPM communication device embodiments provided below can refer to the above limitations on the method, and will not be repeated here.
[0055] In an exemplary embodiment, a communication between a Jailhouse-Hypervisor and an SPM is provided, which is applicable to the Jailhouse-Hypervisor and includes: a first creation module, a first sending module, and a first receiving module, wherein: The first creation module is used to create at least one business virtual machine in the non-secure world.
[0056] The first sending module is used to convert the authentication request of the current business program into an SMC instruction, and send the SMC instruction to the SPM, so that the SPM sends the authentication content carried by the SMC instruction to the target authentication program, and generates an ERET instruction after the target authentication program performs an authentication operation according to the authentication content.
[0057] The first receiving module is used to receive an ERET instruction from the SPM, and send the authentication result carried by the ERET instruction to the current business program.
[0058] In one of the embodiments, the first sending module includes: a first receiving unit, used to receive the HVC instruction generated when the business program calls the TEE driver of the operating system in which it is located to initiate an authentication request; a first conversion unit, used to convert the HVC instruction into an SMC instruction; and a first sending unit, used to send the SMC instruction to the SPM.
[0059] In one of the embodiments, the first receiving module includes: a first parsing unit, used to parse the ERET instruction to obtain the authentication result and the business virtual machine identifier; a first determination unit, used to determine the target business virtual machine according to the business virtual machine identifier; a second sending unit, used to switch from EL2 to EL1 through the ERET instruction, and send the authentication result to the TEE driver of the operating system of the target business virtual machine; a third sending unit, used for the TEE driver of the operating system to switch from EL1 to EL0 through the ERET instruction, and send the authentication result to the current business program.
[0060] In an exemplary embodiment, a communication between a jailhouse-hypervisor and an SPM is provided, which is applicable to the SPM and includes: a second creation module, a second receiving module, and a second sending module, wherein: A second creation module, used to create at least one secure virtual machine in the secure world; The second receiving module is used to receive the SMC instruction from the Jailhouse-Hypervisor and send the authentication content carried by the SMC instruction to the target authentication program; The second sending module is used to send an ERET instruction carrying the authentication result and the business virtual machine identifier to the Jailhouse-Hypervisor after the target authentication program performs an authentication operation according to the authentication content, so that the Jailhouse-Hypervisor sends the authentication result carried by the ERET instruction to the current business program.
[0061] In one of the embodiments, the second receiving module includes: a second parsing unit, used to parse the SMC instruction to obtain the authentication content and the authentication virtual machine identifier; a second determination unit, used to determine the target authentication virtual machine according to the authentication virtual machine identifier; a fourth sending unit, used to switch from SEL3 to SEL1 through an ERET instruction, and send the authentication content to the operating system of the target authentication virtual machine; a fifth sending unit, used for the operating system of the target authentication virtual machine to switch from SEL1 to SEL0 through an ERET instruction, and send the authentication content to the target authentication program.
[0062] In one of the embodiments, the second sending module includes: a second receiving unit, used to receive an SMC instruction carrying an authentication result from a target authentication program; a third parsing unit, used to parse the SMC instruction to obtain the authentication result; a first generating unit, used to generate an ERET instruction carrying the authentication result; and a sixth sending unit, used to send the ERET instruction carrying the authentication result to a Jailhouse-Hypervisor.
[0063] Each module in the above device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.
[0064] In an exemplary embodiment, a computer device is provided, the internal structure of which can be shown as follows: Figure 2As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a communication method between a Jailhouse-Hypervisor and an SPM is implemented.
[0065] Those skilled in the art will understand that Figure 2 The structure shown in the figure is only a block diagram of a part of the structure related to the present invention, and does not constitute a limitation on the computer device to which the present invention is applied. The specific computer device may include more or less components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0066] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented: Create at least one business virtual machine in the normal world; the business virtual machine includes an operating system and business programs running on the operating system; each business program has a unique corresponding authentication program in the secure world; Convert the authentication request of the current business program into an SMC instruction, and send the SMC instruction to the SPM, so that the SPM sends the authentication content carried by the SMC instruction to the target authentication program, and generates an ERET instruction after the target authentication program performs an authentication operation according to the authentication content; the authentication request includes the authentication content and the secure virtual machine identifier; Receive the ERET instruction from SPM and send the authentication result carried by the ERET instruction to the current business program.
[0067] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: Receive the HVC instruction generated when the business program calls the TEE driver of the operating system where it is located to initiate an authentication request; Convert HVC instructions into SMC instructions; Send SMC instructions to SPM.
[0068] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: Parse the ERET instruction to obtain the authentication result and business virtual machine identifier; Determine the target business virtual machine according to the business virtual machine identifier; Through the ERET instruction, switch from EL2 to EL1, and send the authentication result to the TEE driver of the operating system of the target business virtual machine; The operating system's TEE driver switches from EL1 to EL0 through the ERET instruction and sends the authentication result to the current business program.
[0069] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: At least one secure virtual machine is created in the secure world; the secure virtual machine includes an operating system and an authentication program running on the operating system; each authentication program has a unique corresponding business program in the ordinary world; Receive the SMC instruction from Jailhouse-Hypervisor and send the authentication content carried by the SMC instruction to the target authentication program; After the target authentication program performs the authentication operation according to the authentication content, the ERET instruction carrying the authentication result and the business virtual machine identifier is sent to the Jailhouse-Hypervisor, so that the Jailhouse-Hypervisor sends the authentication result carried by the ERET instruction to the current business program.
[0070] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: Parse the SMC instruction to obtain the authentication content and authentication virtual machine identifier; Determine the target authentication virtual machine according to the authentication virtual machine identifier; Through the ERET instruction, switch from SEL3 to SEL1, and send the authentication content to the operating system of the target authentication virtual machine; The operating system of the target authentication virtual machine switches from SEL1 to SEL0 through the ERET instruction and sends the authentication content to the target authentication program.
[0071] In one embodiment, when the processor executes the computer program, the processor further implements the following steps: Receiving an SMC instruction carrying an authentication result from a target authentication program; Parse the SMC command and obtain the authentication result; Generate an ERET instruction carrying the authentication result; The ERET instruction carrying the authentication result is sent to the Jailhouse-Hypervisor.
[0072] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: Create at least one business virtual machine in the normal world; the business virtual machine includes an operating system and business programs running on the operating system; each business program has a unique corresponding authentication program in the secure world; Convert the authentication request of the current business program into an SMC instruction, and send the SMC instruction to the SPM, so that the SPM sends the authentication content carried by the SMC instruction to the target authentication program, and generates an ERET instruction after the target authentication program performs an authentication operation according to the authentication content; the authentication request includes the authentication content and the secure virtual machine identifier; Receive the ERET instruction from SPM and send the authentication result carried by the ERET instruction to the current business program.
[0073] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: Receive the HVC instruction generated when the business program calls the TEE driver of the operating system where it is located to initiate an authentication request; Convert HVC instructions into SMC instructions; Send SMC instructions to SPM.
[0074] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: Parse the ERET instruction to obtain the authentication result and business virtual machine identifier; Determine the target business virtual machine according to the business virtual machine identifier; Through the ERET instruction, switch from EL2 to EL1, and send the authentication result to the TEE driver of the operating system of the target business virtual machine; The operating system's TEE driver switches from EL1 to EL0 through the ERET instruction and sends the authentication result to the current business program.
[0075] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: At least one secure virtual machine is created in the secure world; the secure virtual machine includes an operating system and an authentication program running on the operating system; each authentication program has a unique corresponding business program in the ordinary world; Receive the SMC instruction from Jailhouse-Hypervisor and send the authentication content carried by the SMC instruction to the target authentication program; After the target authentication program performs the authentication operation according to the authentication content, the ERET instruction carrying the authentication result and the business virtual machine identifier is sent to the Jailhouse-Hypervisor, so that the Jailhouse-Hypervisor sends the authentication result carried by the ERET instruction to the current business program.
[0076] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: Parse the SMC instruction to obtain the authentication content and authentication virtual machine identifier; Determine the target authentication virtual machine according to the authentication virtual machine identifier; Through the ERET instruction, switch from SEL3 to SEL1, and send the authentication content to the operating system of the target authentication virtual machine; The operating system of the target authentication virtual machine switches from SEL1 to SEL0 through the ERET instruction and sends the authentication content to the target authentication program.
[0077] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: Receiving an SMC instruction carrying an authentication result from a target authentication program; Parse the SMC command and obtain the authentication result; Generate an ERET instruction carrying the authentication result; The ERET instruction carrying the authentication result is sent to the Jailhouse-Hypervisor.
[0078] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present invention may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided by the present invention may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0079] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present invention.
[0080] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.
Claims
1. A communication method between a jailhouse-hypervisor and an SPM, characterized in that: Applicable to Jailhouse-Hypervisor, the method comprises: Create at least one business virtual machine in the normal world; the business virtual machine includes an operating system and business programs running on the operating system; each business program has a unique corresponding authentication program in the secure world; Convert the authentication request of the current business program into an SMC instruction, and send the SMC instruction to the SPM, so that the SPM sends the authentication content carried by the SMC instruction to the target authentication program, and generates an ERET instruction after the target authentication program performs an authentication operation according to the authentication content; the authentication request includes the authentication content and the secure virtual machine identifier; Receive an ERET instruction from the SPM, and send the authentication result carried by the ERET instruction to the current business program.
2. The method according to claim 1, characterized in that: Converting the authentication request of the current service program into an SMC instruction, and sending the SMC instruction to the SPM, including: Receive the HVC instruction generated when the business program calls the TEE driver of the operating system where it is located to initiate an authentication request; Convert the HVC instruction into an SMC instruction; The SMC instruction is sent to the SPM.
3. The method according to claim 1, characterized in that The business program runs on EL0 of the ARM architecture, the operating system of the business virtual machine runs on EL1 of the ARM architecture, and the Jailhouse-Hypervisor runs on EL2 of the ARM architecture; the sending of the authentication result carried by the ERET instruction to the current business program includes: Parse the ERET instruction to obtain the authentication result and the business virtual machine identifier; Determine the target business virtual machine according to the business virtual machine identifier; Switch from EL2 to EL1 through the ERET instruction, and send the authentication result to the TEE driver of the operating system of the target business virtual machine; The TEE driver of the operating system switches from EL1 to EL0 through the ERET instruction, and sends the authentication result to the current business program.
4. A communication method between a jailhouse-hypervisor and an SPM, characterized in that: Applicable to SPM, the method comprises: At least one secure virtual machine is created in the secure world; the secure virtual machine includes an operating system and an authentication program running on the operating system; each authentication program has a unique corresponding business program in the ordinary world; Receive the SMC instruction from the Jailhouse-Hypervisor, and send the authentication content carried by the SMC instruction to the target authentication program; After the target authentication program performs the authentication operation according to the authentication content, the ERET instruction carrying the authentication result and the business virtual machine identifier is sent to the Jailhouse-Hypervisor, so that the Jailhouse-Hypervisor sends the authentication result carried by the ERET instruction to the current business program.
5. The method according to claim 4, characterized in that The authentication program runs on SEL0 of the ARM architecture, the operating system of the secure virtual machine runs on SEL1 of the ARM architecture, and the SPM runs on SEL3 of the ARM architecture; the authentication content carried by the SMC instruction is sent to the target authentication program, including: Parsing the SMC instruction to obtain authentication content and an authentication virtual machine identifier; Determining a target authentication virtual machine according to the authentication virtual machine identifier; Switch from SEL3 to SEL1 through the ERET instruction, and send the authentication content to the operating system of the target authentication virtual machine; The operating system of the target authentication virtual machine switches from SEL1 to SEL0 through the ERET instruction, and sends the authentication content to the target authentication program.
6. The method according to claim 5, characterized in that After the target authentication program performs the authentication operation according to the authentication content, the ERET instruction carrying the authentication result is sent to the Jailhouse-Hypervisor, including: Receiving an SMC instruction carrying an authentication result from a target authentication program; Parsing the SMC instruction to obtain the authentication result; Generate an ERET instruction carrying the authentication result; The ERET instruction carrying the authentication result is sent to the Jailhouse-Hypervisor.
7. A communication device between a jailhouse-hypervisor and an SPM, characterized in that: Applicable to Jailhouse-Hypervisor, the device comprises: A first creation module is used to create at least one business virtual machine in the ordinary world; A first sending module, configured to convert the authentication request of the current service program into an SMC instruction, and send the SMC instruction to the SPM, so that the SPM sends the authentication content carried by the SMC instruction to the target authentication program, and generates an ERET instruction after the target authentication program performs an authentication operation according to the authentication content; The first receiving module is used to receive an ERET instruction from the SPM, and send the authentication result carried by the ERET instruction to the current service program.
8. A communication device between a jailhouse-hypervisor and an SPM, characterized in that: Suitable for SPM, the device comprises: A second creation module, used to create at least one secure virtual machine in the secure world; A second receiving module is used to receive the SMC instruction from the Jailhouse-Hypervisor and send the authentication content carried by the SMC instruction to the target authentication program; The second sending module is used to send an ERET instruction carrying the authentication result and the business virtual machine identifier to the Jailhouse-Hypervisor after the target authentication program performs an authentication operation according to the authentication content, so that the Jailhouse-Hypervisor sends the authentication result carried by the ERET instruction to the current business program.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Vulnerability detection method and device
CN113868673A
Communication method between virtual machine and security isolation interval and related device
CN115509677A
ARM (Advanced RISC Machines) TrustZone architecture for realizing secure world Jailhouse virtualization
CN119201351A
Method and system for guiding jailhome to start based on authentication
CN119396537A
Implementing upcall from secure to non-secure mode by injecting exception into non-secure mode
US9465617B1