IP Library › Granted Patent US 12,405,901
Granted Patent B2
US 12,405,901 · App. 18/314,999 · Granted Sep 2, 2025

Method for configuring address translation relationship, and computer system

Inventors: Zhangkai Zhang (Beijing, CN); Dongdong Yao (Beijing, CN); Cong Wang (Beijing, CN); Yihua Tan (Shenzhen, CN)
Assignee: Huawei Technologies Co., Ltd.
G06F12/1441G06F12/1009G06F12/1036
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,405,901
App. No.
18/314,999
Granted
Sep 2, 2025
Kind
B2
Abstract

Methods and systems for configuring an address translation relationship is disclosed. In an implementation, a method comprises: transferring, by a virtual machine manager (VMM) deployed in a rich execution environment (REE) of a computer system, a first address translation relationship to a secure partition manager (SPM) deployed in a trusted execution environment (TEE) of the computer system, wherein the first address translation relationship comprises an address translation relationship from an intermediate physical address (IPA) allocated to a virtual machine (VM) deployed in the REE to a physical address (PA) for the SPM to perform IPA-to-PA address translation based on the first address translation relationship when transmitting data from the SP to the VM, wherein the PA is a memory address.

Claims (27)

1. A method for configuring an address translation relationship, the method comprises:

transferring, by a virtual machine manager (VMM) deployed in a rich execution environment (REE) of a computer system, a first address translation relationship to a secure partition manager (SPM) deployed in a trusted execution environment (TEE) of the computer system, wherein the first address translation relationship comprises an address translation relationship from an intermediate physical address (IPA) allocated to a virtual machine (VM) deployed in the REE to a physical address (PA) for the SPM to perform IPA-to-PA address translation based on the first address translation relationship when transmitting data from the SP to the VM, wherein the PA is a memory address.

2. The method according to claim 1 , wherein the IPA allocated to the VM is a contiguous address, and the PA is a discrete address obtained by performing, based on the first address translation relationship, address translation on the IPA.

3. The method according to claim 1 , wherein a first virtualization translation table base address register (vttbr_el2) and a first control register (vtcr_el2) are deployed in the REE, and the first address translation relationship comprises: a base address of a page table configured in the first vttbr_el2 and used for performing stage-2 memory address translation (stage 2 translation) on a REE side, an address translation attribute configured in the first vtcr_el2 and used for performing the stage-2 memory address translation on the REE side, and the IPA, wherein the IPA is translated into the PA based on the base address and a memory translation rule expressed by the address translation attribute.

4. The method according to claim 3 , wherein the method further comprises:

transferring, by the SPM, the IPA allocated to the VM to the SP, wherein the SP is configured to establish a second address mapping relationship based on the IPA allocated to the VM, and a second address translation relationship comprises an address translation relationship from a virtual address (VA) to an IPA for the SP to perform VA-to-IPA address translation based on the second address mapping relationship when transmitting the data to the VM.

5. The method according to claim 3 , wherein a second vttbr_el2 and a second vtcr_el2 are deployed in the TEE, and the method further comprises:

writing, by the SPM, the base address to the second vttbr_el2; and

writing the address translation attribute to the second vtcr_el2 for the SPM to perform the IPA-to-PA address translation based on the base address stored in the second vttbr_el2 and the address translation attribute stored in the second vtcr_el2 when transmitting the data from the SP to the VM.

6. The method according to claim 5 , wherein before the writing, by the SPM, the base address to the second vttbr_el2, and writing the address translation attribute to the second vtcr_el2, the method further comprises:

receiving, by the SPM, a start request sent by the VMM, wherein the start request indicates the SPM to start the SP; and

writing the base address to the second vttbr_el2 and writing the address translation attribute to the second vtcr_el2 when starting the SP.

7. The method according to claim 3 , wherein the transferring, by the VMM, a first address translation relationship to the SPM comprises:

writing, by the VMM, the first address translation relationship to a general-purpose register; and

triggering, based on an SMC instruction, the SPM to obtain the first address translation relationship from the general-purpose register.

8. A computer system comprising: a rich execution environment (REE) and a trusted execution environment (TEE), wherein a virtual machine (VM) and a virtual machine manager (VMM) are deployed in the REE, and a secure partition (SP) and a secure partition manager (SPM) are deployed in the TEE; and wherein

the VMM is configured to transfer a first address translation relationship to the SPM, wherein the first address translation relationship comprises an address translation relationship from an intermediate physical address (IPA) allocated to the VM to a physical address (PA) for the SPM to perform IPA-to-PA address translation based on the first address translation relationship when transmitting data from the SP to the VM, wherein the PA is a memory address.

9. The computer system according to claim 8 , wherein the IPA allocated to the VM is a contiguous address, and the PA is a discrete address obtained by performing, based on the first address translation relationship, address translation on the IPA.

10. The computer system according to claim 8 , wherein a first virtualization translation table base address register (vttbr_el2) and a first control register (vtcr_el2) are deployed in the REE, and the first address translation relationship comprises: a base address of a page table configured in the first vttbr_el2 and used for performing stage-2 memory address translation (stage 2 translation) on a REE side, an address translation attribute configured in the first vtcr_el2 and used for performing the stage-2 memory address translation on the REE side, and the IPA, wherein the IPA is translated into the PA based on the base address and a memory translation rule expressed by the address translation attribute.

11. The computer system according to claim 10 , wherein the SPM is configured to transfer the IPA allocated to the VM to the SP, the SP is configured to establish a second address mapping relationship based on the IPA allocated to the VM, and a second address translation relationship comprises an address translation relationship from a virtual address VA to an IPA for the SP to perform VA-to-IPA address translation based on the second address mapping relationship when transmitting the data to the VM.

12. The computer system according to claim 10 , wherein a second vttbr_el2 and a second vtcr_el2 are deployed in the TEE; and the SPM is configured to write the base address to the second vttbr_el2, and write the address translation attribute to the vtcr_el2 for the SPM to perform the IPA-to-PA address translation based on the base address stored in the second vttbr_el2 and the address translation attribute stored in the second vtcr_el2 when transmitting the data from the SP to the VM.

13. The computer system according to claim 12 , wherein the SPM is configured to:

receive a start request sent by the VMM, wherein the start request indicates the SPM to start the SP; and

write the base address to the second vttbr_el2 and write the address translation attribute to the second vtcr_el2 when starting the SP.

14. The computer system according to claim 10 , wherein the VMM is configured to:

write the first address translation relationship to a general-purpose register; and

trigger, based on an SMC instruction, the SPM to obtain the first address translation relationship from the general-purpose register.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 9, 2023
From: ZHANG, ZHANGKAI; YAO, DONGDONG; WANG, CONG; TAN, YIHUA
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 064531/0158 →
Priority Claims (1)
CN 202011265320.1 · Nov 12, 2020 · national
Continuity (2)
Continuation PCTCN2021130316 · Nov 12, 2021
Related Publication 20230281135A1 · Sep 7, 2023
References Cited (19)
US 10592428B1 · Saidi · 2020 [cited by applicant]
US 11461247B1 · Bolbenes · 2022 [cited by examiner]
US 12045471B2 · Chatterjee · 2024 [cited by examiner]
US 20040143720A1 · Mansell · 2004 [cited by examiner]
US 20050114616A1 · Tune · 2005 [cited by examiner]
US 20160350534A1 · Poornachandran · 2016 [cited by examiner]
US 20160364341A1 · Banginwar · 2016 [cited by examiner]
US 20180074863A1 · Kung · 2018 [cited by examiner]
US 20180121125A1 · Zeng · 2018 [cited by examiner]
US 20180129525A1 · Hong · 2018 [cited by examiner]
US 20180136967A1 · Asbe · 2018 [cited by examiner]
US 20190205264A1 · Varghese et al. · 2019 [cited by applicant]
US 20190311141A1 · Brehove · 2019 [cited by examiner]
CN 109522754A · 2019 [cited by applicant]
CN 109558211A · 2019 [cited by applicant]
CN 109783188A · 2019 [cited by applicant]
CN 111400702A · 2020 [cited by applicant]
Extended European Search Report in European Appln. No. 21891213.7, mailed on Feb. 26, 2024, 8 pages. [cited by applicant]
Architecture and Technology Group, “Arm Platform Security Architecture Firmware Framework 1.0,” DEN 0063, Jun. 19, 2019, 101 pages. [cited by applicant]