System supporting virtual machines and method of managing access to physical address spaces in corresponding system
Patent Information
- Application Number
- CN202111396560.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-11-11
- Filing Date
- 2021-11-23
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2041-11-23
AI Technical Summary
[0004]MMU硬件可能是复杂且昂贵的,且MMU的管理通常需要高度复杂的软件,由此会产生性能开销
[0008]综上所述,实施本发明实施例可具有低复杂性和低开销。
Smart Images

Figure CN114625476B_ABST
Abstract
Claims
1. A system supporting virtual machines, characterized in that, include: The memory is configured to be addressable within the physical address space; One or more processors are configured to perform operations on multiple virtual machines, which are allocated multiple extended physical address regions located outside the physical address space; the multiple extended physical address regions have the same size and do not overlap, and each extended physical address region is allocated to a different virtual machine; and A memory interface controller, coupled to the memory and the one or more processors, is configured to receive requests from a requesting virtual machine to access addresses in the plurality of extended physical address regions, the memory interface controller further comprising: The remapping circuit is configured to remap addresses in multiple extended physical address regions. The remapped address in this physical address space; and The memory protection unit is configured to base its actions on whether the address indicating the remapping is accessible. The request is made to the virtual machine to access information about the storage to allow or deny the request.
2. The system supporting virtual machines as described in claim 1, characterized in that, The remapping circuit is configured to map all extended physical address regions to a remapped physical address region containing contiguous addresses in that physical address space.
3. The system supporting virtual machines as described in claim 2, characterized in that, Each extended physical address region has a base address offset relative to the remapped physical address region in the physical address space.
4. The system supporting virtual machines as described in claim 2, characterized in that, The remapping circuit is configured to calculate the remapped address by removing a base address offset from the address in the request, wherein the base address offset is the offset between the extended physical address region containing the address in the request and the remapped physical address region in the physical address space.
5. The system supporting virtual machines as described in claim 1, characterized in that, The stored information is stored in a permission filter used by the memory protection unit to associate the domain identifier that identifies the requesting virtual machine with an address in the physical address space that the requesting virtual machine can access.
6. The system supporting virtual machines according to claim 5, characterized in that, The addresses in the multiple extended physical address regions or the physical address space are indicated by one or more address blocks of the same block size, one or more address segments of configurable size, or a combination of the one or more address blocks and the one or more address segments.
7. The system supporting virtual machines as described in claim 1, characterized in that, The passenger operating system that manages these multiple virtual machines uses a first page size for virtual memory management, while the host operating system that manages the system uses a second page size larger than the first page size for virtual memory management.
8. The system supporting virtual machines as described in claim 7, characterized in that, Each processor uses a memory management unit to perform the virtual memory management, and the first page size and the second page size are the page sizes for which the memory management unit performs address translation in the passenger operating system and the host operating system, respectively.
9. The system supporting virtual machines as described in claim 1, characterized in that, Also includes: One or more peripheral devices mapped to this memory; and A peripheral interface controller, coupled to the one or more processors and the one or more peripheral devices, configured to receive a second request from the requesting virtual machine to access a second address allocated to a peripheral device, the peripheral interface controller further comprising: The peripheral remapping circuit is configured to map the second address to the physical address space. The address of the second mapping in the space; and The peripheral memory protection unit is configured to use addresses and pointers based on this second mapping. This indicates the address information within the physical address space that can be accessed by the requesting virtual machine to determine whether it is... Whether to allow or deny the second request.
10. A method for controlling access to the physical address space in a system supporting multiple virtual machines, characterized in that, include: Receive requests from a given virtual machine to access addresses located outside the physical address space in multiple extended physical address regions allocated to the multiple virtual machines; These multiple extended physical address regions have the same size and do not overlap, and each extended physical address region is assigned to a different virtual machine; The address is mapped to a remapped address within the physical address space through a remapping circuit. The request is allowed or denied based on information indicating whether the remapped address is accessible to the given virtual machine.
11. The method for controlling access to the physical address space in a system supporting multiple virtual machines as described in claim 10, characterized in that, Also includes: This remapping circuit maps all extended physical address regions to remapped physical address regions containing contiguous addresses within that physical address space.
12. The method for controlling access to the physical address space in a system supporting multiple virtual machines as described in claim 11, characterized in that, Each extended physical address region has a base address offset relative to the remapped physical address region in the physical address space.
13. The method for controlling access to the physical address space in a system supporting multiple virtual machines as described in claim 11, characterized in that, The mapping also includes: The remapped address is calculated by removing a base address offset from the address in the request using the remapped circuit, wherein the base address offset is the offset between the extended physical address region containing the address in the request and the remapped physical address region in the physical address space.
14. The method for controlling access to the physical address space in a system supporting multiple virtual machines as described in claim 10, characterized in that, The stored information is stored in a permission filter used by the memory protection unit to associate the domain identifier that identifies the requesting virtual machine with an address in the physical address space that the requesting virtual machine can access.
15. The method for controlling access to the physical address space in a system supporting multiple virtual machines according to claim 14, characterized in that, The addresses in the multiple extended physical address regions or the addresses in the physical address space are indicated by one or more address blocks of the same block size, one or more address segments of configurable size, or a combination of the one or more address blocks and the one or more address segments.
16. The method for controlling access to the physical address space in a system supporting multiple virtual machines as described in claim 10, characterized in that, The passenger operating system that manages these multiple virtual machines uses a first page size for virtual memory management, while the host operating system that manages the system uses a second page size larger than the first page size for virtual memory management.
17. The method for controlling access to the physical address space in a system supporting multiple virtual machines as described in claim 16, characterized in that, Each processor uses a memory management unit to perform the virtual memory management, and the first page size and the second page size are the page sizes for which the memory management unit performs address translation in the passenger operating system and the host operating system, respectively.
18. The method for controlling access to the physical address space in a system supporting multiple virtual machines as described in claim 10, characterized in that, Also includes: Receive a second request from the given virtual machine to access a second address assigned to a peripheral device in the system; The external remapping circuit maps this second address to the second remapped address within this physical address space; and The second request is determined based on the address of the second remapping and the address information indicating which address in the physical address space can be accessed by the given virtual machine.
Citation Information
Patent Citations
Virtualization in a multi-host environment
US20150277763A1