Equipment access method and device

By dividing the secure and non-secure worlds in heterogeneous devices, using the MMIO address mechanism and key negotiation protocol, the security and efficiency of confidential computing in heterogeneous computing scenarios are solved, and efficient confidential data protection is achieved.

CN119004554AActive Publication Date: 2024-11-22HUAWEI TECH CO LTD

Patent Information

Application Number
CN202310551446.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-16
Publication Date
2024-11-22
Estimated Expiration
2043-05-16

AI Technical Summary

Technical Problem

The current confidential computing architecture cannot meet the confidential computing needs in heterogeneous computing scenarios, and there are shortcomings in terms of security, work efficiency and ease of use.

Method used

By dividing the secure and non-secure worlds in the device, using the Memory Mapping Input and Output (MMIO) address mechanism, the server can request and access the device's secure memory address and accelerator, ensure the security of the data channel, and encrypt it through the key negotiation protocol Communication data.

Benefits of technology

It realizes the confidential computing needs of tenants under a heterogeneous computing architecture, reduces costs and power consumption, improves the security and efficiency of computing, and meets the protection needs of confidential data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119004554A_ABST
    Figure CN119004554A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a device access method and device, the method is applied to a first device, the first device comprises a secure world and a non-secure world, the method comprises the following steps: the first device receives first request information sent by a server, the first request information is used for requesting the first device to determine a first memory address, and the first memory address is sent to the server; the first memory address corresponds to a first MMIO address in a secure world of the server; and the first device determines a first memory address in the secure world of the first device according to the first request information. By means of the method, the data channel established between the server and the first device cannot be stolen by software in a non-secure world, and therefore the confidential computing requirement of tenants in a heterogeneous computing architecture scene is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of cloud computing, and more specifically, to a method and apparatus for accessing a device. Background Art

[0002] Virtualization technology is the mainstream technology on the current cloud computing platform. Through virtualization, tenants can deploy multiple computing instances (such as virtual machines) in the cloud computing platform and use hardware resources in a time-sharing manner. Under the current virtualization technology framework, the virtual machine manager (VMM) manages all memory resources, that is, the VMM can access the code and data of all tenant virtual machines. When tenants deploy cloud computing services on the cloud platform, cloud service providers can obtain tenant data by inserting malicious code into the VMM. In order to prevent the above situation from happening, confidential computing technology came into being.

[0003] Confidential computing technology is a computing model that builds an encrypted, isolated, and provable computing environment based on trusted hardware, combined with firmware and software to ensure the confidentiality, integrity, code integrity, and confidentiality of the computing process within the environment. Currently, the confidential computing environment is a confidential computing architecture centered on the central processing unit (CPU), that is, confidential data completes all computing processes in the CPU and returns the final computing results. Although this confidential computing architecture can better protect the data security of tenants, it cannot meet the confidential computing needs of tenants in heterogeneous computing architecture scenarios, and this confidential computing architecture still needs to be improved in terms of computing security, work efficiency, and ease of use. Summary of the invention

[0004] The embodiments of the present application provide a method and apparatus for accessing a device, which can meet the confidential computing needs of tenants in a heterogeneous computing architecture scenario.

[0005] In a first aspect, a memory access method is provided, which is applied to a first device, wherein the first device includes: a secure world and a non-secure world, and the method includes: the first device receives first request information sent by a server, wherein the first request information is used to request the first device to determine a first memory address, and the first memory address corresponds to a first memory mapping input and output MMIO address in the secure world of the server; the first device determines the first memory address in the secure world of the first device according to the first request information.

[0006] Optionally, the first memory address may be a memory address with a physical page as the granularity, or the first memory address may be a memory address with a physical memory segment as the granularity.

[0007] It should be understood that the secure world may also be referred to as a confidential domain or a trusted execution environment in this application, and the non-secure world may also be referred to as a normal domain or a non-trusted execution environment in this application; the first device may be referred to as a confidential device or a heterogeneous device (Device) in this application, and the server may be referred to as a host (HOST) in this application.

[0008] In an embodiment of the present application, the first device can divide the first memory address according to the first request information, so as to facilitate the server to access the first memory address through the first MMIO address. In this way, the data channel established between the server and the first device cannot be stolen by software in the non-secure world, thereby meeting the confidential computing needs of tenants in heterogeneous computing architecture scenarios.

[0009] In combination with the first aspect, in certain implementations of the first aspect, the first device determines a first memory address in the secure world of the first device based on the first request information, including: the first device divides a second memory address in the non-secure world of the first device into the first memory address based on the first request information.

[0010] Optionally, the first memory address and the second memory address may be the same memory address, but have different security attributes.

[0011] Optionally, classifying the second memory address in the non-secure world of the first device as the first memory address can also be understood as: the first device classifies the memory attribute of the second memory address as secure and sets the corresponding page table.

[0012] In an embodiment of the present application, the first device may divide the second memory address in the non-secure world of the first device into the first memory address according to the indication of the first request information, thereby facilitating the server to access the first memory address based on the first MMIO address.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the first memory address is a memory address with physical memory segment as granularity. Before the first device divides the second memory address in the non-secure world of the first device into the first memory address according to the first request information, the method also includes: the first device divides the memory of the first device according to a fixed memory division method to obtain the second memory address.

[0014] Exemplarily, when the first device has a total memory of 64GB, the first device can divide the memory according to a fixed memory division method (for example, 8GB, 16GB, 32GB), and the first device can authorize the divided memory according to the instruction of the first request information. For example, the first request information requests the first device to grant the right to use 8GB of memory to the secure world of the first device. The first device can divide the 64GB of memory in 8GB manner and authorize the divided 8GB of memory to be used by the secure world of the first device. Among them, the address corresponding to the divided 8GB of memory before being authorized to be used by the secure world of the first device can be called the second memory address, and the address corresponding to the address after being authorized to be used by the secure world of the first device can be called the first memory address.

[0015] In an embodiment of the present application, the first device can divide the second memory address according to a fixed memory division method, so that the first device can simply and efficiently divide the first memory address, thereby reducing the cost and power consumption of confidential computing under a heterogeneous computing architecture.

[0016] In combination with the first aspect, in certain implementations of the first aspect, the first device determines a first memory address in the security world of the first device based on the first request information, including: the first device checks the legality of the first request information; when the first request information is legal, the first device determines the first memory address based on the first request information.

[0017] Optionally, the first device checks the legitimacy of the first request information, including: the first device checks whether the second memory address has been used by the secure world of the first device, and if the second memory address is not used by the secure world of the first device, confirms that the first request information is legal; otherwise, confirms that the first request information is illegal.

[0018] In the embodiment of the present application, the first device can check the legitimacy of the first request information before determining the first memory address, so as to prevent the first request information from being tampered with and ensure the security of the server accessing the first memory address through the first MMIO address.

[0019] In combination with the first aspect, in some implementations of the first aspect, the method also includes: the first device receives a second request message sent by the server, the second request message being used to request the first device to partition one or more accelerators into the secure world of the first device; and the first device partitions, based on the second request message, one or more accelerators in the non-secure world of the first device into the secure world of the first device.

[0020] Optionally, the first device may assign one or more accelerators to the secure world of the first device according to preset rules. For example, the first device includes 8 accelerators, and the first device may assign 1, 2, or 4 of the accelerators to the secure world of the first device for use according to the indication of the second request information.

[0021] Optionally, before being divided into the secure world of the first device, the one or more accelerators may be located in the non-secure world of the first device.

[0022] It should be understood that the accelerator in the present application may also be referred to as a heterogeneous accelerator, which may be used to perform cyclic calculations on a resource-consuming portion of a CPU in a server or a first device, thereby saving CPU computing resources.

[0023] In the embodiment of the present application, the first device may divide one or more accelerators into the secure world of the first device for use according to the second request information, thereby facilitating the server to access the one or more accelerators based on the first MMIO address.

[0024] In combination with the first aspect, in certain implementations of the first aspect, the first device divides one or more accelerators in the non-secure world of the first device to the secure world of the first device based on the second request information, including: the first device checks the legality of the second request information; when the second request information is legal, the first device divides one or more accelerators in the non-secure world of the first device to the secure world of the first device based on the second request information.

[0025] Optionally, the first device checks the legitimacy of the second request information, including: the first device checks whether the one or more accelerators divided this time have been used by the secure world of the first device, and if the one or more accelerators have been used by the secure world of the first device, it is determined that the second request information is illegal; otherwise, it can be determined that the second request information is legal.

[0026] In an embodiment of the present application, before the first device divides one or more accelerators into the secure world of the first device, the legitimacy of the second request information can be checked, thereby ensuring the security of the divided one or more accelerators.

[0027] In combination with the first aspect, in some implementations of the first aspect, the method also includes: the first device negotiates a session key with the server according to a key negotiation protocol, and the session key is used to encrypt or decrypt communication data between the server and the first device; the first device stores the session key.

[0028] In an embodiment of the present application, the first device can store a session key, so that the first device can use the session key to encrypt or decrypt communication data between the first device and the server. In this way, the communication security between the server and the first device can be further guaranteed, thereby meeting the tenant's confidential computing needs in a heterogeneous computing architecture scenario.

[0029] In a second aspect, a device access method is provided, which is applied to a server, the server including: a secure world and a non-secure world, the method including: the server determining a first MMIO address in the secure world of the server; the server sending a first request message to a first device, the first request message being used to request the first device to determine a first memory address in the secure world of the first device, the first memory address corresponding to the first MMIO address; the server accessing the first memory address through the first MMIO address.

[0030] Optionally, after receiving a response message in which the first device allocates the first memory address, the server may access the first memory address through the first MMIO address.

[0031] In an embodiment of the present application, the server can send a first request message to the first device, requesting the first device to divide the first memory address, and the server can access the first memory address through the first MMIO address. In this way, the data channel established between the server and the first device cannot be stolen by software in the non-secure world, and can meet the confidential computing needs of tenants in heterogeneous computing architecture scenarios.

[0032] In combination with the second aspect, in some implementations of the second aspect, the method also includes: the server sends a second request message to the first device, the second request message is used to request the first device to divide one or more accelerators into the secure world of the first device; and the server accesses the one or more accelerators through the first MMIO address.

[0033] Optionally, after receiving a response message sent by the first device indicating that one or more accelerators have been divided, the server may access the one or more accelerators through the first MMIO address.

[0034] In an embodiment of the present application, the server can send a second request message to the first device, requesting the first device to divide out one or more accelerators, and the server can access the one or more accelerators based on the first MMIO address, thereby facilitating the server to send confidential computing tasks to the one or more accelerators.

[0035] In combination with the second aspect, in some implementations of the second aspect, the server determining the first MMIO address includes: the server dividing a second MMIO address in a non-secure world of the server into the first MMIO address.

[0036] Optionally, the first MMIO address and the second MMIO address may be the same memory address, but have different security attributes.

[0037] In combination with the second aspect, in some implementations of the second aspect, the method also includes: the server negotiates a session key with the first device according to a key negotiation protocol, and the session key is used to encrypt or decrypt communication data between the server and the first device; and the server stores the session key.

[0038] In an embodiment of the present application, the server can store a session key, so that the server can use the session key to encrypt or decrypt communication data between the first device and the server. In this way, the communication security between the server and the first device can be further guaranteed, thereby meeting the tenant's confidential computing needs in a heterogeneous computing architecture scenario.

[0039] In combination with the second aspect, in some implementations of the second aspect, the first memory address is a memory address with a physical page as the granularity, or the first memory address is a memory address with a physical memory segment as the granularity.

[0040] According to a third aspect, a device for accessing a device is provided, the device being applied to a first device, the first device comprising: a secure world and a non-secure world, the device comprising: a transceiver module and a processing module; the transceiver module being used to receive a first request message sent by a server, the first request message being used to request the first device to determine a first memory address, the first memory address corresponding to a first MMIO address in the secure world of the server; the processing module being used to determine the first memory address in the secure world of the first device according to the first request message.

[0041] In combination with the third aspect, in certain implementations of the third aspect, the processing module is specifically used to divide the second memory address in the non-secure world of the first device into the first memory address according to the first request information.

[0042] In combination with the third aspect, in certain implementations of the third aspect, the first memory address is a memory address with a physical memory segment as the granularity; the processing module is also used to divide the memory of the first device according to a fixed memory partitioning method to obtain a second memory address.

[0043] In combination with the third aspect, in certain implementations of the third aspect, the processing module is specifically used to: check the legality of the first request information; and when the first request information is legal, divide the second memory address of the non-secure world of the first device into the first memory address according to the first request information.

[0044] In combination with the third aspect, in certain implementations of the third aspect, the transceiver module is further used to receive a second request message sent by the server, wherein the second request message is used to request the first device to divide one or more accelerators into the secure world of the first device; the processing module is further used to divide one or more accelerators in the non-secure world of the first device into the secure world of the first device according to the second request message.

[0045] In combination with the third aspect, in certain implementations of the third aspect, the processing module is specifically used to: check the legality of the second request information; if the second request information is legal, divide one or more accelerators in the non-secure world of the first device into the secure world of the first device according to the second request information.

[0046] In combination with the third aspect, in certain implementations of the third aspect, the processing module is also used to: negotiate a session key with the server according to a key negotiation protocol, wherein the session key is used to encrypt or decrypt communication data between the server and the first device; and store the session key.

[0047] In a fourth aspect, a device access apparatus is provided, which is applied to a first device, wherein the first device includes: a secure world and a non-secure world, and the apparatus includes: a transceiver module and a processing module; the transceiver module is used to receive a first request information sent by a server, wherein the first request information is used to request the first device to determine a first memory address, and the first memory address corresponds to a first MMIO address in the secure world of the server; the processing module is used to determine the first memory address in the secure world of the first device according to the first request information.

[0048] In combination with the fourth aspect, in certain implementations of the fourth aspect, the transceiver module is further used to send a second request message to the first device, wherein the second request message is used to request the first device to partition one or more accelerators into the secure world of the first device; and the processing module accesses the one or more accelerators through the first MMIO address.

[0049] In combination with the fourth aspect, in some implementations of the fourth aspect, the processing module is specifically configured to divide the second MMIO address in the non-secure world of the server into the first MMIO address.

[0050] In combination with the fourth aspect, in certain implementations of the fourth aspect, the processing module is also used to negotiate a session key with the first device according to a key negotiation protocol, and the session key is used to encrypt or decrypt communication data between the server and the first device; and store the session key.

[0051] In a fifth aspect, an embodiment of the present application provides an access device for a device, the device comprising a processor, the processor being used to couple with a memory, read and execute instructions and / or program codes in the memory to execute the method in the first aspect and its various implementations or the second aspect and its various implementations.

[0052] In a sixth aspect, an embodiment of the present application provides a chip system, which includes a logic circuit, which is used to couple with an input / output interface and transmit data through the input / output interface to execute the method in the first aspect and its various implementations or the second aspect and its various implementations.

[0053] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium, which stores program code. When the computer storage medium runs on a computer, it enables the computer to execute the method in the first aspect and its various implementations or the second aspect and its various implementations.

[0054] In an eighth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, when the computer program code runs on a computer, enables the computer to execute the method in the first aspect and its various implementations or the second aspect and its various implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 It is a schematic diagram of a virtualization technology framework provided by an embodiment of the present application;

[0056] Figure 2 It is a schematic diagram of another virtualization technology framework provided by an embodiment of the present application;

[0057] Figure 3 It is a confidential computing architecture based on an authorization mechanism provided in an embodiment of the present application;

[0058] Figure 4 It is a requester-responder model provided by an embodiment of the present application;

[0059] Figure 5 This is the system architecture to which the device access method provided in the embodiment of the present application is applicable;

[0060] Figure 6 A method for accessing a device provided in an embodiment of the present application;

[0061] Figure 7 It is another system architecture applicable to the device access method provided in the embodiment of the present application;

[0062] Figure 8 This is another device access method provided by an embodiment of the present application;

[0063] Fig. 9 It is a system architecture applicable to a computing environment destruction method provided in an embodiment of the present application;

[0064] Fig.10 A method for destroying a confidential computing environment provided by an embodiment of the present application;

[0065] Fig.11 It is a schematic diagram of a control CPU supporting an authorization mechanism deployed on a heterogeneous device provided by an embodiment of the present application;

[0066] Fig.12 This is a construction process of a heterogeneous confidential computing environment provided in an embodiment of the present application;

[0067] Fig.13 It is a schematic diagram of deploying simple partitioning logic on heterogeneous devices provided by an embodiment of the present application;

[0068] Fig.14 This is a construction process in another heterogeneous confidential computing environment provided by an embodiment of the present application;

[0069] Fig.15 This is a structural example diagram of an access device of a device provided in an embodiment of the present application;

[0070] Fig.16 This is a structural example diagram of an access device of another device provided in an embodiment of the present application;

[0071] Fig.17 It is an example diagram of a computer program product provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0073] Virtualization technology is the mainstream technology on the current cloud computing platform. Through virtualization, tenants can deploy multiple computing instances (such as virtual machines) on the cloud platform and use hardware resources in a time-sharing manner. Figure 1As shown in the figure, in this virtualization technology framework, tenants provide computing services, cloud service providers provide VMM software, hardware providers provide CPUs that support virtualization functions, and VMM provides resource management, dynamic scheduling and other functions for upper-level virtual machines through the virtualization support provided by the CPU. For example, VMM can configure different access control lists for different virtual machines to access memory, so that virtual machines cannot access the memory resources of other virtual machines without authorization.

[0074] Confidential computing is a computing model that builds an encrypted, isolated, and provable computing environment based on trusted hardware, combined with firmware and software to ensure the confidentiality, integrity, code integrity, and confidentiality of the computing process in the environment. The demand for confidential computing stems from tenants' distrust of VMM software. Under the current virtualization technology framework, VMM manages all memory resources, that is, VMM can access the code and data of all tenant virtual machines. When tenants deploy cloud computing services on the cloud platform, cloud service providers can obtain tenant data by inserting malicious code into VMM. Confidential computing uses an isolation mechanism to isolate the general computing environment from the confidential computing environment, so that unauthorized applications cannot access the confidential computing environment. Confidential computing can verify applications running in the confidential computing environment through remote attestation to ensure the integrity and legitimacy of the program, and through encryption mechanisms, it ensures that the computing in memory is in an encrypted form to prevent privileged software or even hardware from snooping.

[0075] The foundation of confidential computing technology lies in the trusted execution environment (TEE) of the hardware architecture. Through the hardware-based isolation mechanism, it is ensured that the code and data running in the TEE cannot be accessed or tampered by untrusted code. The advantage of confidential computing over other privacy technologies is that it takes into account security, versatility, and efficiency. It can not only seamlessly support general computing frameworks and applications, but also has computing performance that is basically comparable to plaintext computing. It can be used alone to protect data in the computing state, or it can be combined with other technologies to protect data. It is an important technical means, especially for scenarios involving big data, high performance, and general privacy computing, such as secure and trusted cloud computing, large-scale data confidentiality collaboration, and privacy-protected deep learning.

[0076] On the other hand, the computing characteristics of artificial intelligence (AI) technology represented by machine learning and deep neural networks are parallel computing of large-scale data. From the perspective of hardware architecture, AI computing is more suitable for heterogeneous computing architectures such as graphics processing units (GPUs) or neural network processing units (NPUs). The architectural characteristics of heterogeneous computing units such as GPU / NPU are high bandwidth and high concurrency, which are suitable for simple calculation logic, such as matrix operations. Compared with the CPU architecture, the characteristics of GPU / NPU are strong computing power and weak control capabilities (conditional judgment, predictive execution). Therefore, the current characteristic of heterogeneous computing is that the CPU side analyzes the computing tasks through control logic and splits them into single computing tasks, and then sends the computing tasks to the GPU / NPU to complete the calculation. The CPU then combines the calculation results and returns the final calculation result. Figure 2 As shown in the figure, the confidential virtual machine (also called confidential virtual machine) on the server (Host) side issues instructions and distributes data to the heterogeneous device (Device) through the memory mapped input and output (MMIO) address. The system software can access the heterogeneous device just like accessing the memory. At the same time, after completing the heterogeneous calculation, the heterogeneous device writes the data back to the physical address memory space and notifies the host side CPU at the same time. After receiving the notification, the host side CPU can read the data in the memory space. The MMIO address space and the physical address memory space are both part of the address space that the CPU can access. The MMIO address space represents the access space of the heterogeneous device, and the physical address space represents the access space of the dynamic random access memory (DRAM).

[0077] Figure 3 This is a confidential computing architecture based on an authorization mechanism provided in an embodiment of the present application.

[0078] Figure 3 The architecture shown includes a secure world and a non-secure world. Figure 4 As shown, the architecture is based on a requester-responder model, where the requester (i.e. Figure 3 The virtual machine management module in the non-secure world in the non-secure world) initiates a memory space authorization request to grant the use right of the memory space in the non-secure world to the secure world. Figure 3The RMM in the secure world checks the legitimacy of the request and performs subsequent operations if the legitimacy check passes. The confidential virtual machine built in the secure world can access confidential data through the page table entries built by the RMM. At the same time, since the memory space is authorized to the secure world, malware in the non-secure world cannot steal confidential data in the memory. The advantage of this authorization mechanism is that the responder in the secure world only needs to check the legitimacy of the request. The original virtual machine scheduling, page fault and other management logic can reuse existing code to the maximum extent while meeting the data protection requirements of confidential computing.

[0079] However, the development of heterogeneous computing architecture has brought new challenges to the above-mentioned CPU-centric confidential computing architecture. This confidential computing architecture cannot meet the confidential computing needs of tenants in heterogeneous computing architecture scenarios. Moreover, this confidential computing architecture needs to be improved in terms of computing security, work efficiency, and ease of use.

[0080] The embodiment of the present application provides a method for accessing a device, which can build a confidential computing environment in a heterogeneous scenario to meet the confidential computing needs of tenants in a heterogeneous computing scenario.

[0081] Figure 5 This is the system architecture applicable to the device access method provided in the embodiment of the present application.

[0082] like Figure 5 As shown in the figure, the virtual function driver module (VF) is authorized to the secure world. On this basis, the confidential virtual machine in the server can send confidential computing tasks to the secure memory and secure accelerator in the heterogeneous device through the VF module. The data channel established between the server and the heterogeneous device cannot be stolen by malware in the non-secure world, thus meeting the confidential computing needs of tenants in the heterogeneous computing architecture scenario.

[0083] Figure 6 is a device access method provided by an embodiment of the present application. The method 600 can be applied to Figure 5 In the illustrated architecture, method 600 may include the following steps.

[0084] S601: The server sends first request information to the first device.

[0085] The first request information is used to request the first device to determine a first memory address, and the first memory address corresponds to a first memory mapping input and output MMIO address in the secure world of the server.

[0086] Optionally, the first memory address may be a memory address with a physical page as the granularity, or the first memory address may be a memory address with a physical memory segment as the granularity. The first device includes: a secure world and a non-secure world, and the server includes: a secure world and a non-secure world.

[0087] Optionally, the secure world in the server and the secure world in the first device may not be the same secure world, and correspondingly, the non-secure world in the server and the non-secure world in the first device may not be the same non-secure world.

[0088] It should be understood that the secure world may also be referred to as a confidential domain or a trusted execution environment in this application, and the non-secure world may also be referred to as a normal domain or a non-trusted execution environment in this application; the first device may be referred to as a confidential device or a heterogeneous device (Device) in this application, and the server may be referred to as a host (Host) in this application.

[0089] In one embodiment, before step S601, method 600 further includes: the server determines a first MMIO address in the secure world of the server.

[0090] Alternatively, the server may divide the second MMIO address in the non-secure world of the server into the first MMIO address.

[0091] Optionally, the first MMIO address and the second MMIO address may be the same memory address, but have different security attributes.

[0092] S602: The first device determines a first memory address in the secure world of the first device according to the first request information.

[0093] In one embodiment, the first device may divide the second memory address in the non-secure world of the first device into the first memory address according to the first request information, thereby facilitating the server to access the first memory address based on the first MMIO address.

[0094] Optionally, the first memory address and the second memory address may be the same memory address, but have different security attributes.

[0095] Optionally, dividing the second memory address in the non-secure world of the first device into the first memory address can also be understood as: the first device sets the memory attribute of the second memory address to secure and sets the corresponding page table. For example, the memory attribute of the second memory address can be set to secure by modifying the label of the physical address of the second memory address, thereby dividing the second memory address into the first memory address.

[0096] In one embodiment, the first memory address is a memory address with a physical memory segment as the granularity. Before the first device divides the second memory address in the non-secure world of the first device into the first memory address according to the first request information, the method 600 may further include: the first device may divide the memory of the first device according to a fixed memory division method to obtain the second memory address. In this way, the first device can simply and efficiently divide the first memory address, thereby reducing the cost and power consumption of confidential computing under the heterogeneous computing architecture.

[0097] Exemplarily, when the first device has a total memory of 64GB, the first device can divide the memory in a fixed memory division manner (for example, 8GB, 16GB, 32GB), and the first device can authorize the divided memory according to the instruction of the first request information. For example, the first request information requests the first device to grant 8GB of memory usage rights to the secure world of the first device. The first device can divide the 64GB of memory in 8GB manner and authorize the divided 8GB of memory to be used by the secure world of the first device. Among them, the address corresponding to the divided 8GB of memory before being authorized for use by the secure world of the first device can be called the second memory address, and the address corresponding to the address after being authorized for use by the secure world of the first device can be called the first memory address.

[0098] In one embodiment, before step S602, the first device may check the legitimacy of the first request information; if the first request information is legitimate, the first device may determine the first memory address according to the first request information. In this way, the first request information can be prevented from being tampered with, and the security of the server accessing the first memory address through the first MMIO address is guaranteed.

[0099] Optionally, the first device checks the legitimacy of the first request information, including: the first device checks whether the second memory address has been used by the secure world of the first device, and if the second memory address is not used by the secure world of the first device, confirms that the first request information is legal; otherwise, confirms that the first request information is illegal.

[0100] S603: The server accesses the first memory address through the first MMIO address.

[0101] Optionally, after receiving a response message from the first device that the first memory address is divided, the server may access the first memory address through the first MMIO address.

[0102] In an embodiment of the present application, the server can send a first request message to the first device, requesting the first device to divide the first memory address, and the server can access the first memory address through the first MMIO address. In this way, the data channel established between the server and the first device cannot be stolen by software in the non-secure world, and can meet the confidential computing needs of tenants in heterogeneous computing architecture scenarios.

[0103] The first device may not only divide the security attributes of the memory in the first device based on the request information sent by the server, but may also divide the security attributes of the accelerator in the first device based on the request information sent by the server.

[0104] In one embodiment, the method 600 further includes: the server sends a second request message to the first device, the second request message is used to request the first device to divide one or more accelerators into the secure world of the first device; the first device receives the second request message sent by the server, and the first device divides one or more accelerators in the non-secure world of the first device into the secure world of the first device according to the second request message, and the server accesses the one or more accelerators through the first MMIO address. In this way, it is convenient for the server to send confidential computing tasks to the one or more accelerators.

[0105] Optionally, the first device may divide one or more accelerators into the secure world of the first device according to preset rules. For example, the first device includes 8 accelerators, and the first device may divide 1, 2 or 4 of the accelerators into the secure world of the first device for use according to the instruction of the second request information.

[0106] Optionally, before being divided into the secure world of the first device, the one or more accelerators may be located in the non-secure world of the first device.

[0107] Optionally, after receiving a response message sent by the first device indicating that one or more accelerators have been divided, the server may access the one or more accelerators through the first MMIO address.

[0108] It should be understood that the accelerator may include a heterogeneous accelerator, which may be used to perform cyclic calculations on a resource-consuming portion of a CPU in a server or a first device, thereby saving computing resources of the CPU.

[0109] In one embodiment, the first device divides one or more accelerators in the non-secure world of the first device into the secure world of the first device according to the second request information, including: the first device checks the legitimacy of the second request information; if the second request information is legitimate, the first device divides the one or more accelerators in the non-secure world of the first device into the secure world of the first device according to the second request information. In this way, the security of the divided one or more accelerators can be guaranteed.

[0110] Optionally, the first device checks the legitimacy of the second request information, including: the first device checks whether the one or more accelerators divided this time have been used by the secure world of the first device, and if the one or more accelerators have been used by the secure world of the first device, it is determined that the second request information is illegal; otherwise, it can be determined that the second request information is legal.

[0111] In one embodiment, the method 600 further includes: the first device negotiates a session key with the server according to a key negotiation protocol, the session key being used to encrypt or decrypt communication data between the server and the first device; and the first device and the server storing the session key. In this way, the communication security between the server and the first device can be further guaranteed, thereby meeting the confidential computing needs of tenants in heterogeneous computing architecture scenarios.

[0112] Figure 7 This is another system architecture applicable to the device access method provided in the embodiment of the present application.

[0113] exist Figure 7 In the , the host side can be divided into a common domain and a confidential domain, and the confidential virtual machine can run in the confidential domain. On the heterogeneous device side, the memory attributes and the attributes of the heterogeneous accelerator can be securely divided, and the secure memory can only be accessed by the confidential virtual machine and the secure heterogeneous accelerator on the host side.

[0114] Among them, the normal domain can be the non-secure world in method 600, the confidential domain can be the secure world in method 600, and the heterogeneous accelerator can be used to perform cyclic calculations on the resource-consuming part of the CPU, thereby saving the computing resources of the CPU.

[0115] Combine the following Figure 8 The flowchart shown introduces the access process of the device in detail. Method 800 may be a more specific implementation of method 600. Method 800 may include the following steps.

[0116] S801, build a confidential virtual machine on the host side.

[0117] Among them, step S801 may correspond to Figure 7 In ①, step S801 may include the following two sub-steps:

[0118] S801a, after receiving the establishment request of the confidential virtual machine, the host-side virtual machine management module authorizes the host-side non-secure memory to the confidential domain. The memory management module in the confidential domain can check the legitimacy of the memory authorization request in the establishment request. After the detection is passed, the memory management module can classify the memory attribute of the non-secure memory as secure and set the corresponding page table. After the memory management module completes all confidential memory division and data loading, the confidential virtual machine can be started in the confidential domain on the host side.

[0119] Exemplarily, the memory management module performing a validity check on the memory authorization request may include: checking whether the memory authorized this time has been authorized, and / or checking whether the memory authorized this time has been used by the confidentiality domain.

[0120] It should be understood that the page table can be a special data structure stored in the page table area of ​​the system space, storing the correspondence between logical pages and physical pages. The server or confidential device can translate the virtual address it accesses through the page table.

[0121] S801b, the host-side confidential domain kernel module performs integrity measurement on the confidential virtual machine in the confidential domain. The measurement value can be verified by the tenant to ensure that the confidential virtual machine code loaded in the confidential domain meets the tenant's expectations.

[0122] Among them, integrity measurement can verify the integrity of the code and data in the confidential domain. The process of integrity measurement can be: generate a signature (measurement value) based on the hash value (Hash) and random number of the code to be detected, and then hand over the signature to a third party for verification.

[0123] S802, the host side builds a confidential computing environment on the heterogeneous device side.

[0124] The host may be the server in method 600, the heterogeneous device may be the first device in method 600, and step S802 may correspond to Figure 7 In ②, step S802 may include the following four sub-steps:

[0125] S802a, the host-side virtual machine management module receives the confidential device management module ( Figure 7 The establishment request (not shown) is used to authorize the non-secure MMIO address space on the host side to the confidential domain. The memory management module of the confidential domain performs a legitimacy check on the memory authorization request in the establishment request. After the check passes, the memory management module of the confidential domain classifies the MMIO address space attribute as secure.

[0126] S802b, the physical device driver module on the host side receives the establishment request from the confidential device management module, and the host sends a memory authorization request to the heterogeneous device side. The scheduling module on the host side forwards the memory authorization request to the memory management module of the confidential domain on the heterogeneous device side. The memory management module on the heterogeneous device side checks the legitimacy of the request. After the request is checked, the memory management module of the confidential domain on the heterogeneous device side classifies the memory attribute as secure and sets the corresponding page table. Among them, the memory authorization request can be the first request information in method 600.

[0127] Exemplarily, the memory management module performing a validity check on the memory authorization request may include: checking whether the memory authorized this time has been authorized, and / or checking whether the memory authorized this time has been used by a common domain.

[0128] S802c, the host side sends an accelerator authorization request to the heterogeneous device side, and the scheduling module on the heterogeneous device side forwards the request to the hardware resource management module of the confidential domain on the heterogeneous device side. The hardware resource management module of the confidential domain on the heterogeneous device side checks the legitimacy of the request. After the request passes the check, the hardware resource management module of the confidential domain on the heterogeneous device side sets the security attribute of the heterogeneous accelerator to secure. The accelerator authorization request may be the second request information in method 600.

[0129] Exemplarily, the hardware resource management's legitimacy check on the accelerator authorization request may include: checking whether the currently divided accelerator has been divided into the confidential domain, and / or checking whether the currently divided accelerator has been used by the common domain.

[0130] S802d, the confidential domain memory management module on the heterogeneous device side obtains the security configuration on the heterogeneous device side (for example, loaded code, register status, etc.) for integrity measurement, and the measurement value is submitted to the tenant for verification to ensure that the configuration in the confidential domain on the heterogeneous device side meets the tenant's expectations.

[0131] S803: Build an encrypted channel between the host side and the heterogeneous device side.

[0132] Exemplarily, the key management module in the confidentiality domain on the host side and the key management module in the confidentiality domain on the heterogeneous device side may negotiate the session key through a key exchange protocol, and manage and store the key through their respective key management modules.

[0133] After completing steps S801 to S803, the confidential virtual machine can send confidential computing tasks to the secure memory and security accelerator on the heterogeneous device side through the virtual device driver module. In addition, it should be noted that in method 800, step S803 may not be executed. That is, when an attacker sniffs or listens to data in the transmission bus through physical means, it is necessary to enable the encryption channel; when there is no potential physical attacker, the confidential virtual machine can send confidential data in plain text.

[0134] In an embodiment of the present application, the MMIO address space can be divided for use by the confidential domain through the authorization mechanism of the memory space. The confidential virtual machine can access the heterogeneous devices through the divided MMIO address. The data channel cannot be stolen by software in the non-secure world, thereby meeting the confidential computing needs of tenants in the heterogeneous computing architecture scenario.

[0135] Fig. 9 This is a system architecture applicable to a computing environment destruction method provided in an embodiment of the present application.

[0136] exist Fig. 9 In the , the host side can be divided into a common domain and a confidential domain, and the confidential virtual machine can run in the confidential domain. On the heterogeneous device side, the memory attributes and the attributes of the heterogeneous accelerator can be securely divided, and the secure memory can only be accessed by the confidential virtual machine and the secure heterogeneous accelerator on the host side.

[0137] Among them, the normal domain can be the non-secure world in method 600, the confidential domain can be the secure world in method 600, and the heterogeneous accelerator can be used to perform cyclic calculations on the resource-consuming part of the CPU, thereby saving the computing resources of the CPU.

[0138] Combine the following Fig.10 A method for destroying a confidential computing environment is introduced. Method 1000 may include the following steps.

[0139] S1001, destroy the confidential virtual machine on the host side.

[0140] Among them, step S1001 may correspond to Fig. 9 ①.

[0141] Exemplarily, when the host-side virtual machine management module receives a confidential virtual machine destruction request, it can send a memory deauthorization request to the host-side confidential domain memory management module. The confidential domain memory management module can perform a legitimacy check on the memory deauthorization request and check whether the current confidential virtual machine is in an inactive state. Among them, the confidential virtual machine being in an inactive state can be understood as a state in which the confidential virtual machine is not executing a task. When the legitimacy check passes and the confidential virtual machine is in an inactive state, the host-side confidential domain memory management module can clear the data in the memory and deauthorize the memory to the non-secure world. In this process, if there is a session key to be built, the host side can simultaneously destroy the session key used by the confidential virtual machine.

[0142] S1002, destroy the confidential computing environment on the heterogeneous device side.

[0143] Among them, step S1002 corresponds to Fig. 9 ②, step S1002 may include the following three sub-steps.

[0144] S1002a, the host-side virtual machine management module receives the confidential device management module ( Fig. 9 After receiving a destruction request (not shown in the figure), the secure MMIO address space on the host side is deauthorized to the common domain. The confidential domain memory management module performs a legitimacy check on the memory deauthorization request. After the check request is passed, the confidential domain memory management module can classify the MMIO address space attribute as non-secure.

[0145] S1002b, after the physical device driver module on the host side receives the destruction request from the decryption device management module, the host side sends a memory deauthorization request to the heterogeneous device side. The scheduling module on the heterogeneous device side forwards the request to the memory management module of the confidential domain on the heterogeneous device side. The memory management module of the confidential domain on the heterogeneous device side checks the legitimacy of the memory deauthorization request. After the check passes, the memory management module of the confidential domain on the heterogeneous device side can clean up the data in the memory, classify the memory attributes as non-secure and set the corresponding page table. In this process, if there is a session key built on the heterogeneous device side, the session key used by the heterogeneous device side can be destroyed at the same time.

[0146] S1002c, the host side sends an accelerator deauthorization request to the heterogeneous device side. The scheduling module on the heterogeneous device side forwards the request to the hardware resource management module of the confidential domain on the heterogeneous device side. The hardware resource management module of the confidential domain on the heterogeneous device side checks the legitimacy of the accelerator deauthorization request, and checks whether the heterogeneous accelerator is in an inactive state. Among them, the inactive state of the heterogeneous accelerator can be understood as the heterogeneous accelerator is in a state where no tasks are executed. If the check request passes and the heterogeneous accelerator is in an inactive state, the hardware resource management module of the confidential domain on the heterogeneous device side can clean up the data in the heterogeneous accelerator and set the security attributes of the heterogeneous accelerator to non-secure.

[0147] In an embodiment of the present application, the MMIO address can be deauthorized to the non-secure world through the authorization mechanism of the memory space, thereby completing the destruction of the constructed confidential computing environment.

[0148] Fig.11 It is a schematic diagram of a control CPU that supports an authorization mechanism deployed on a heterogeneous device, provided in an embodiment of the present application.

[0149] like Fig.11 As shown, a CPU that supports the authorization mechanism can be deployed on the heterogeneous device side, that is, the CPU supports the division of the secure world and the non-secure world, and supports the switching of memory between the secure world and the non-secure world at the page granularity (for example, 2 megabytes). Figure 7The confidential domain management module (including: memory management module and hardware resource management module) in the CPU can be deployed in the secure world of the CPU, that is, the device trusted management module. The CPU can be called a control CPU.

[0150] Below Fig.12 Taking the access process of a device as an example, method 1200 may be a more specific implementation of method 600 and method 800. Method 1200 may include the following steps.

[0151] S1201, the host-side virtual machine management module receives a request to establish a confidential virtual machine and authorizes the host-side non-secure memory to the confidential domain.

[0152] The host trusted management module on the host side performs a validity check on the memory authorization request in the establishment request. After the check request passes, the confidential domain host trusted management module divides the memory attribute into secure and sets the corresponding page table. After all the required confidential memory division and data loading are completed, the confidential virtual machine is started in the host side confidential domain.

[0153] S1202: The host trusted management module performs integrity measurement on the confidential virtual machine of the confidential domain.

[0154] After the measurement is performed, the measurement value can be verified by the tenant to ensure that the confidential VM code loaded in the confidential domain meets the tenant's expectations.

[0155] S1203, the virtual machine management module receives the establishment request of the confidential device management module, and the virtual machine management module authorizes the host-side non-secure MMIO address space to the confidential domain.

[0156] The host trusted management module may perform a validity check on the memory authorization request in the establishment request. After the check passes, the host trusted management module may classify the MMIO address space attribute as safe.

[0157] S1204 , the physical device driver module on the host side receives the establishment request from the confidential device management module, and sends a memory authorization request to the heterogeneous device side. The memory authorization request may be the first request information in method 600 .

[0158] The scheduling module on the heterogeneous device side forwards the memory authorization request to the non-secure world interface (HomeOS) of the control CPU. After receiving the memory authorization request, the non-secure world interface Home OS can forward the memory authorization request to the device trusted management module. The device trusted management module can classify the memory attributes as secure and set the corresponding page table on the heterogeneous device side.

[0159] Among them, the purpose of the scheduling module sending a memory authorization request to the Home OS that controls the CPU and then forwarding the memory authorization request to the device trusted management module is to simplify the management logic. The device trusted management module that controls the CPU is a new addition to the original device logic. In the original logic, after the scheduling module sends a request to the Home OS, the Home OS can directly manage the memory and heterogeneous accelerators on the heterogeneous device side. After adding the security attributes of the device trusted management module and the memory and heterogeneous accelerators of the secure world, additional signal processing logic can be added to the Home OS to forward the memory authorization request to the device trusted management module. In addition, from the perspective of code implementation, adding additional signal processing programs to the Home OS will not increase the complexity of the code too much. From a security perspective, the scheduling module directly sending a signal to the device trusted management module is the same or similar to the security of this forwarding strategy, and the device trusted management module performs security checks on the memory authorization request.

[0160] S1205: The physical device driver module sends an accelerator authorization request to the heterogeneous device side.

[0161] The accelerator authorization request may be the second request information in method 600 .

[0162] Optionally, the scheduling module on the heterogeneous device side may directly forward the accelerator authorization request to the device trusted management module of the confidentiality domain on the heterogeneous device side.

[0163] Optionally, the scheduling module on the heterogeneous device side forwards the accelerator authorization request to the non-secure world Home OS that controls the CPU. After receiving the accelerator authorization request, the non-secure world Home OS that controls the CPU can forward the accelerator authorization request to the device trusted management module. The device trusted management module can perform a legitimacy check on the accelerator's authorization request. After the check passes, the device trusted management module can classify the accelerator's attributes as secure. Heterogeneous accelerators classified as secure attributes can form a hardware cluster, which can be a division of the heterogeneous accelerator management logic on the heterogeneous device side.

[0164] The authorization request of the heterogeneous accelerator must meet at least one of the following requirements:

[0165] (1) When the attributes of a heterogeneous accelerator in a hardware cluster are set to secure, the attributes of other heterogeneous accelerators in the hardware cluster (including newly authorized heterogeneous accelerators) should also be set to secure.

[0166] (2) The attributes of a heterogeneous accelerator in a hardware cluster are set to secure. When the trusted device management receives a request to reset the heterogeneous accelerator (for example, to deauthorize it as non-secure or assign it to another hardware cluster), it is necessary to ensure that the state of the heterogeneous accelerator is inactive, that is, no security tasks are running.

[0167] (3) After a heterogeneous accelerator is divided into security attributes, the heterogeneous accelerator can only be assigned to one hardware cluster.

[0168] S1206, the device trusted management module obtains the security configuration on the heterogeneous device side, performs integrity measurement, and the measurement value is submitted to the tenant for verification, thereby ensuring that the configuration in the confidential domain on the heterogeneous device side meets the tenant's expectations.

[0169] Optionally, the above security configuration may include: trusted device management code and register status, etc.

[0170] S1207, the host trusted management module and the device trusted management module negotiate a session key through a key exchange protocol, and store the key in their respective data integrity and confidentiality protection (integrity and data encryption, IDE) acceleration modules through their respective key management modules.

[0171] In an embodiment of the present application, by deploying a CPU that supports the authorization mechanism on the heterogeneous device side, the heterogeneous device side can perform fine-grained division of memory and heterogeneous accelerators, thereby facilitating the host to access the divided secure memory and secure accelerators to meet the confidential computing needs of tenants in heterogeneous computing architecture scenarios.

[0172] Fig.13 It is a schematic diagram of deploying simple partitioning logic on heterogeneous devices provided in an embodiment of the present application.

[0173] like Fig.13 As shown in the figure, in some cases, due to cost or power consumption considerations, it is impossible to deploy a control CPU that supports the authorization mechanism on the heterogeneous device side. In this case, Fig. 9The confidential domain management module (including: memory management module and hardware resource management module) in the system is deployed in the scheduling module on the heterogeneous device side. In a specific implementation, the scheduling module can be a CPU with basic functions, which is responsible for scheduling the computing tasks sent from the host side in the heterogeneous device. However, the scheduling module does not have complex functions such as secure world division and memory authorization. In another implementation, the scheduling module can be an application specific integrated circuit (ASIC). After receiving the computing tasks sent from the host side, the scheduling module can send the computing tasks to the heterogeneous accelerator according to the preset scheduling strategy. The CPU on the host side is a CPU that supports the authorization mechanism.

[0174] Below Fig.14 Taking the access process of a device as an example, method 1400 may be a more specific implementation of method 600 and method 800. Method 1400 may include the following steps.

[0175] S1401, the host-side virtual machine management module receives a request to establish a confidential virtual machine and authorizes the host-side non-secure memory to the confidential domain.

[0176] The host-side virtual machine management module performs a validity check on the memory authorization request in the establishment request. After the check request passes, the confidential domain trusted server management module divides the memory attribute into safe and sets the corresponding page table. After all the required confidential memory division and data loading are completed, the confidential virtual machine is started in the host-side confidential domain.

[0177] S1402, the host trusted management module performs integrity measurement on the confidential virtual machine of the confidential domain.

[0178] Among them, the measurement values ​​can be verified by the tenant to ensure that the confidential virtual machine code loaded in the confidential domain meets the tenant's expectations.

[0179] S1403, the virtual machine management module receives the establishment request of the confidential device management module, and the virtual machine management module authorizes the host-side non-secure MMIO address space to the confidential domain.

[0180] The host trusted management module can perform a validity check on the memory authorization request. After the check passes, the trusted server management module can classify the MMIO address space attribute as safe.

[0181] S1404 , the physical device driver module on the host side receives the establishment request from the confidential device management module, and sends a memory authorization request to the heterogeneous device side. The memory authorization request may be the first request information in the method 600 .

[0182] The scheduling module on the heterogeneous device side performs coarse-grained division of memory. For example, when the memory on the heterogeneous device side is 64GB in total, fixed-size memory division methods such as 8GB, 16GB, and 32GB can be provided. The heterogeneous device side can authorize the divided memory according to one of the above division methods based on the instructions issued by the host physical device driver module.

[0183] S1405, the scheduling module divides the security attributes of the heterogeneous accelerators in equal proportion according to the proportion of the secure memory to the total memory.

[0184] For example, when the memory on the heterogeneous device side has a total of 64GB and 8 vector accelerators, the scheduling module can divide 1, 2, or 4 vector accelerators into security attributes according to the ratio.

[0185] S1406, the device trusted management module obtains the security configuration on the heterogeneous device side, performs integrity measurement, and the measurement value is verified by the tenant to ensure that the configuration in the confidential domain on the heterogeneous device side meets the tenant's expectations.

[0186] Optionally, the above security configuration may include: trusted device management code and register status, etc.

[0187] S1407, the host trusted management module and the device trusted management module negotiate a session key through a key exchange protocol, and store the key in their respective IDE acceleration modules through their respective key management modules.

[0188] In an embodiment of the present application, the heterogeneous device side can perform coarse-grained partitioning of memory and heterogeneous accelerators, thereby facilitating the host to access the partitioned secure memory and heterogeneous accelerators. In this way, secure memory and heterogeneous accelerators can be partitioned simply and efficiently, thereby reducing the cost and power consumption of confidential computing under a heterogeneous computing architecture.

[0189] The above describes the access method of the device according to the embodiment of the present application. Fig.15 and Fig.16 The apparatus and device according to the embodiments of the present application are described.

[0190] Fig.15A structural example diagram of an access device 1500 of a device provided in an embodiment of the present application. The access device of the device includes a transceiver module 1510 and a processing module 1520. The transceiver module 1510 is used to send and receive instructions and / or data, and the transceiver module 1510 can also be called a communication interface or a communication module. The processing module 1520 is used to perform data processing. Optionally, the device 1500 also includes a storage module, which is used to implement a corresponding storage function and store corresponding instructions and / or data. The processing module 1520 can read the instructions and / or data in the storage module so that the device 1500 implements the access method of the aforementioned device.

[0191] As a design, apparatus 1500 may execute the actions executed by the first device in the above method embodiment.

[0192] The device 1500 includes: a transceiver module 1510 and a processing module 1520; the transceiver module 1510 is used to receive a first request message sent by a server, and the first request message is used to request a first device to determine a first memory address, and the first memory address corresponds to a first MMIO address in the secure world of the server; the processing module 1520 is used to determine the first memory address in the secure world of the first device according to the first request message.

[0193] In a possible implementation, the processing module 1520 is specifically configured to divide the second memory address in the non-secure world of the first device into the first memory address according to the first request information.

[0194] In a possible implementation, the first memory address is a memory address with a physical memory segment as a granularity; the processing module 1520 is further used to divide the memory of the first device according to a fixed memory division method to obtain the second memory address.

[0195] In one possible implementation, the processing module 1520 is specifically used to: check the legitimacy of the first request information; if the first request information is legal, divide the second memory address of the non-secure world of the first device into the first memory address according to the first request information.

[0196] In one possible implementation, the transceiver module 1510 is further used to receive a second request message sent by the server, where the second request message is used to request the first device to divide one or more accelerators into the secure world of the first device; the processing module 1520 is further used to divide one or more accelerators in the non-secure world of the first device into the secure world of the first device according to the second request message.

[0197] In one possible implementation, the processing module 1520 is specifically used to: check the legitimacy of the second request information; if the second request information is legal, divide one or more accelerators in the non-secure world of the first device into the secure world of the first device according to the second request information.

[0198] In a possible implementation, the processing module 1520 is further used to: negotiate a session key with the server according to a key negotiation protocol, where the session key is used to encrypt or decrypt communication data between the server and the first device; and store the session key.

[0199] As another design, device 1500 can execute the actions performed by the server in the above method embodiment.

[0200] The device 1500 includes: a transceiver module 1510 and a processing module 1520; the transceiver module 1510 is used to receive a first request message sent by a server, and the first request message is used to request a first device to determine a first memory address, and the first memory address corresponds to a first MMIO address in the secure world of the server; the processing module 1520 is used to determine the first memory address in the secure world of the first device according to the first request message.

[0201] In a possible implementation, the transceiver module 1510 is further used to send a second request message to the first device, where the second request message is used to request the first device to divide one or more accelerators into the secure world of the first device; the processing module 1520 accesses the one or more accelerators through the first MMIO address.

[0202] In a possible implementation, the processing module 1520 is specifically configured to divide the second MMIO address in the non-secure world of the server into the first MMIO address.

[0203] In a possible implementation, the processing module 1520 is further configured to negotiate a session key with the first device according to a key negotiation protocol, where the session key is used to encrypt or decrypt communication data between the server and the first device; and store the session key.

[0204] The present application also provides a computer storage medium in which program instructions are stored. When the program is executed, it may include: Figure 6 , 8 , 10, 12, and 14 correspond to part or all of the steps of the method for accessing the device in the embodiment.

[0205] Fig.16This is a structural example diagram of another device access device 1600 provided in an embodiment of the present application. The device 1600 includes a processor 1601, a communication interface 1602, and a memory 1603. An example of the device 1600 is a chip. Another example of the device 1600 is a computing device.

[0206] The method disclosed in the above embodiment of the present application can be applied to the processor 1601, or implemented by the processor 1601. The processor 1601 can be a CPU, or other general-purpose processors, digital signal processors (digital signal processor, DSP), ASIC, field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1601. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be combined and executed.

[0207] The memory 1603 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DRRAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0208] The processor 1601, the memory 1603 and the communication interface 1602 can communicate with each other via a bus. The memory 1603 stores executable code, and the processor 1601 reads the executable code in the memory 1603 to execute the corresponding method. The memory 1603 may also include an operating system and other software modules required for running processes. The operating system may be LINUX TM , UNIX TM , WINDOWS TM wait.

[0209] For example, the executable code in the memory 1603 is used to implement Figure 6 , 8 , 10, 12, 14, the processor 1601 reads the executable code in the memory 1603 to execute Figure 6 , 8 , the methods shown in 10, 12, and 14.

[0210] In some embodiments of the present application, the disclosed methods may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or encoded on other non-transitory media or articles of manufacture.

[0211] Fig.17 Schematically illustrates a conceptual partial view of an example computer program product arranged according to at least some embodiments presented herein, the example computer program product comprising a computer program for executing a computer process on a computing device. In one embodiment, the example computer program product 1700 is provided using a signal bearing medium 1701. The signal bearing medium 1701 may include one or more program instructions 1702, which when executed by one or more processors may provide the above-described Figure 6 , 8 , 10, 12, 14, or some of the functions described in the methods. Thus, for example, referring to Figure 6 , 8 , 10, 12, and 14, one or more features of which may be borne by one or more instructions associated with the signal-bearing medium 1701.

[0212] In some examples, the signal bearing medium 1701 may include a computer readable medium 1703, such as, but not limited to, a hard drive, a compact disk (CD), a digital video disk (DVD), a digital tape, a memory, a read-only memory (ROM) or a random access memory (RAM), etc. In some embodiments, the signal bearing medium 1701 may include a computer recordable medium 1704, such as, but not limited to, a memory, a read / write (R / W) CD, a R / W DVD, etc. In some embodiments, the signal bearing medium 1701 may include a communication medium 1705, such as, but not limited to, a digital and / or analog communication medium (e.g., a fiber optic cable, a waveguide, a wired communication link, a wireless communication link, etc.). Thus, for example, the signal bearing medium 1701 may be communicated by a wireless form of the communication medium 1705 (e.g., a wireless communication medium that complies with the IEEE 802.11 standard or other transmission protocol). One or more program instructions 1702 may be, for example, computer executable instructions or logic implementation instructions. In some examples, the aforementioned computing device may be configured to provide various operations, functions, or actions in response to program instructions 1702 communicated to the computing device by one or more of computer-readable media 1703, computer-recordable media 1704, and / or communication media 1705. It should be understood that the arrangement described herein is only for the purpose of example. Thus, it will be appreciated by those skilled in the art that other arrangements and other elements (e.g., machines, interfaces, functions, sequences, and functional groups, etc.) can be used instead, and some elements can be omitted together according to the desired results. In addition, many of the described elements are functional entities that can be implemented as discrete or distributed components, or in any appropriate combination and position in combination with other components.

[0213] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0214] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0215] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0216] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0217] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0218] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0219] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for accessing a device, characterized in that: The method is applied to a first device, the first device comprising: a secure world and a non-secure world, and the method comprises: The first device receives first request information sent by the server, where the first request information is used to request the first device to determine a first memory address, where the first memory address corresponds to a first memory mapped input / output (MMIO) address in the secure world of the server; The first device determines a first memory address in the secure world of the first device according to the first request information.

2. The method according to claim 1, characterized in that The first device determines, according to the first request information, a first memory address in the secure world of the first device, including: The first device divides the second memory address in the non-secure world of the first device into the first memory address according to the first request information.

3. The method according to claim 2, characterized in that The first memory address is a memory address with a physical memory segment as a granularity. Before the first device divides the second memory address in the non-secure world of the first device into the first memory address according to the first request information, the method further includes: The first device divides the memory of the first device according to a fixed memory division method to obtain the second memory address.

4. The method according to any one of claims 1 to 3, characterized in that The first device determines, according to the first request information, a first memory address in the secure world of the first device, including: The first device checks the legitimacy of the first request information; When the first request information is legal, the first device determines the first memory address according to the first request information.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The first device receives second request information sent by the server, where the second request information is used to request the first device to divide one or more accelerators into the security world of the first device; The first device divides one or more accelerators in the non-secure world of the first device into the secure world of the first device according to the second request information.

6. The method according to claim 5, characterized in that The first device divides, according to the second request information, one or more accelerators in the non-secure world of the first device into the secure world of the first device, including: The first device checks the legitimacy of the second request information; If the second request information is legal, the first device divides one or more accelerators in the non-secure world of the first device into the secure world of the first device according to the second request information.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The first device negotiates a session key with the server according to a key negotiation protocol, where the session key is used to encrypt or decrypt communication data between the server and the first device; The first device stores the session key.

8. A method for accessing a device, characterized in that: The method is applied in a server, the server includes: a secure world and a non-secure world, and the method includes: The server determines a first MMIO address in the secure world of the server; The server sends a first request message to the first device, where the first request message is used to request the first device to determine a first memory address in the secure world of the first device, where the first memory address corresponds to the first MMIO address; The server accesses the first memory address through the first MMIO address.

9. The method according to claim 8, characterized in that The method further comprises: The server sends second request information to the first device, where the second request information is used to request the first device to divide one or more accelerators into the secure world of the first device; The server accesses the one or more accelerators through the first MMIO address.

10. The method according to claim 8 or 9, characterized in that The server determines a first MMIO address, including: The server divides a second MMIO address in a non-secure world of the server into the first MMIO address.

11. The method according to any one of claims 8 to 10, characterized in that The method further comprises: The server negotiates a session key with the first device according to a key negotiation protocol, where the session key is used to encrypt or decrypt communication data between the server and the first device; The server stores the session key.

12. The method according to any one of claims 8 to 11, characterized in that The first memory address is a memory address with a physical page as the granularity, or the first memory address is a memory address with a physical memory segment as the granularity.

13. A device access apparatus, characterized in that: include: A module for executing the method according to any one of claims 1 to 7.

14. A device access apparatus, characterized in that: include: A module for executing the method according to any one of claims 8 to 12.

15. A device access apparatus, characterized in that: include: A processor, wherein the processor is used to be coupled to a memory, read and execute instructions and / or program codes in the memory, so as to perform the method according to any one of claims 1 to 7.

16. A device access apparatus, characterized in that: include: A processor, wherein the processor is used to be coupled to a memory, read and execute instructions and / or program codes in the memory, so as to perform the method according to any one of claims 8 to 12.

17. A chip system, characterized in that: include: A logic circuit, wherein the logic circuit is used to be coupled to an input / output interface and transmit data through the input / output interface to execute the method according to any one of claims 1 to 12.

18. A computer readable medium, characterized in that The computer-readable medium stores a program code, and when the computer program code is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Data transmission method and device, computer equipment and storage medium

    CN115664836A

  • Method for display about lighting information at pedestrian crossing traffic light

    KR1020210056157A

  • Dynamic Configuration and Peripheral Access in a Processor

    US20160283402A1

  • Electronic device and method of accessing kernel data

    US20160350543A1

  • Execution environment virtualization method and apparatus and virtual execution environment access method and apparatus

    US20180330081A1

Cited By

  • Device access method and apparatus

    EP4693087A1

  • Device access method and apparatus

    WO2024234801A1