VM–SP Address Translation for Simplified Shared Memory Mapping
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing method for establishing shared memory between virtual machines (VMs) and secure partitions (SPs) in a computer system with an ARM architecture involves high code complexity and code amount due to the need for the Secure Partition Monitor (SPM) to map discrete physical addresses to contiguous intermediate physical addresses, especially when a large number of VMs/SPs are involved.
Innovation Solution
The method involves transferring a first address translation relationship from an intermediate physical address (IPA) allocated to the VM to a physical address (PA) to the SPM, allowing the SPM to perform direct IPA-to-PA address translation based on this relationship, thereby simplifying the memory mapping process and reducing code complexity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the SPM maps discrete physical addresses to contiguous intermediate physical addresses, then shared memory can be established between VM and SP, but code complexity and code amount increase significantly
Solution Approach 1:
The patent introduces a stage-2 page table as an intermediary data structure to facilitate address translation between the VM and SP. This page table stores the mapping relationships between IPA and PA, allowing the SPM to perform direct translation without complex discrete-to-contiguous mapping logic, thereby reducing code complexity while maintaining reliable shared memory establishment
Solution Approach 2:
The address translation process is segmented into two distinct stages: stage-1 translation from virtual address to intermediate physical address (IPA), and stage-2 translation from IPA to physical address (PA). This segmentation allows each stage to handle specific translation tasks independently, simplifying the overall complexity and enabling the SPM to focus only on the second stage using the pre-established page table
2Adaptability or versatility
If discrete physical addresses are mapped to contiguous intermediate physical addresses, then memory sharing is enabled, but the code amount required for memory mapping increases
Solution Approach 1:
The stage-2 page table is automatically generated and maintained by the system, storing the mapping relationships between IPA and PA. This self-service mechanism eliminates the need for the SPM to implement complex discrete-to-contiguous mapping algorithms, significantly reducing the code amount required for memory mapping while preserving full adaptability for memory sharing between multiple VM/SP pairs
3Measurement precision
If the SPM performs complex address mapping, then accurate address translation is achieved, but processing efficiency decreases
Solution Approach 1:
The stage-2 page table is prepared in advance by the system, pre-establishing the mapping relationships between intermediate physical addresses and physical addresses. This preliminary action allows the SPM to perform direct table-lookup translation during runtime without executing complex mapping algorithms, thereby maintaining high address translation accuracy while significantly improving processing efficiency
Data Source
AI summary
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.


