A method for implementing an isolated virtual communication software bus based on hardware isolation

By running an isolated virtual communication soft bus on a virtualized hardware isolated system domain, and utilizing isolated shared memory and various communication event types, the efficiency and security issues of communication between isolated system domains are solved, achieving an efficient and flexible communication mechanism.

CN121478424BActive Publication Date: 2026-05-01KYLIN CORP
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KYLIN CORP
Filing Date
2026-01-08
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing isolated systems lack lightweight, flexible, efficient, and scalable communication methods between domains, communication resources are difficult to reuse, security is insufficient, and data transmission bottlenecks exist.

Method used

By running an isolated virtual communication soft bus on a system domain with virtualized hardware isolation, and managing communication events using isolated shared memory and different types of isolated communication event structures, it provides producer, observer, send, and receive function interfaces. Combined with communication event types such as interrupts, FIFO data transmission, zero copy, and copy-on-write, it achieves an efficient and secure communication mechanism.

Benefits of technology

It enables efficient, secure, flexible and scalable communication between hardware-isolated systems, decouples communication between isolated system domains, improves the flexibility and versatility of communication, and supports the combined use of various communication events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121478424B_ABST
    Figure CN121478424B_ABST
Patent Text Reader

Abstract

The application provides a kind of isolated virtual communication software bus implementation method based on hardware isolation, belongs to the field of virtualization technology, including isolated virtual communication software bus running on privilege layer jailhouse, isolated virtual communication software bus service module is run on the operating system corresponding to each system domain isolated by hardware, communication is realized between each system domain through isolated shared memory.The application improves the flexibility, security and versatility of communication between hardware isolated systems, and simultaneously realizes the decoupling and communication function reuse of communication between isolated systems.
Need to check novelty before this filing date? Find Prior Art

Description

A method for implementing a hardware-isolated virtual communication soft bus Technical Field

[0001] This invention relates to an isolated virtual communication soft bus, and more particularly to a method for implementing an isolated virtual communication soft bus based on hardware isolation, belonging to the field of virtualization technology. Background Technology

[0002] By running virtualization hardware isolation programs at the privileged layer, the physical hardware of a System-on-a-Chip (SoC) can be isolated into multiple system domains. Each system domain isolates different hardware resources and runs a corresponding operating system. Different system domains can communicate with each other through shared memory, ivshmem, virtual shared networks, and other methods. Distributed Soft Bus (DISB) is a software-implemented virtual communication architecture designed to solve the problems of efficient and flexible data transmission and collaboration among multiple devices. Its core lies in simulating the function of a hardware bus, eliminating the need for physical connections, and achieving self-discovery, self-organizing networking, and resource scheduling between devices through a unified protocol and interface.

[0003] Communication between isolated systems via methods such as shared memory, ivshmem, and virtual shared networks requires pre-configuration of corresponding communication parameters between the two isolated operating systems. Communication resources between the two isolated operating systems are difficult to reuse, and corresponding communication resources cannot be decoupled. There is no effective protection mechanism for communication resources, and corresponding communication resources lack security guarantees. There are bottlenecks for large-scale data transmission, and there are no optimization methods such as zero-copy and copy-on-write. As a result, communication between isolated system domains lacks a lightweight, flexible, efficient, and scalable communication method. Summary of the Invention

[0004] To address the aforementioned problems, this invention provides a hardware-isolated virtual communication soft bus implementation method to improve the flexibility and versatility of communication between hardware-isolated systems.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows: a method for implementing an isolated virtual communication soft bus based on hardware isolation, including an isolated virtual communication soft bus running on the privileged layer jailhouse, an isolated virtual communication soft bus service module running on the operating system corresponding to each system domain isolated by virtualization hardware, and communication between each system domain through isolated shared memory;

[0006] The isolated virtual communication soft bus organizes each isolated shared memory into a shared memory pool and manages and maintains isolated communication events between different system domain operating systems through different types of isolated communication event structures. The isolated virtual communication soft bus provides a producer function interface for registering corresponding isolated communication events, an observer function interface for obtaining handles of the corresponding required isolated communication events, a send function interface for sending corresponding isolated communication events, and a receive function interface for receiving corresponding isolated communication events.

[0007] The isolated virtual communication soft bus service module calls the functional interfaces provided by the privileged layer isolated virtual communication soft bus at the operating system layer.

[0008] The isolated shared memory is isolated by jailhouse hardware, and the isolated virtual communication soft bus takes over and manages the memory resources.

[0009] Furthermore, different system domains are connected through isolated communication event channels corresponding to isolated communication events. One isolated communication event producer system domain is the sender, and another isolated communication event observer system domain is the receiver. The sender and receiver establish an isolated communication event channel through the same isolated communication event handle.

[0010] Furthermore, one sender corresponds to at least one receiver.

[0011] Furthermore, the types of corresponding isolated communication events include interrupt isolated communication events, FIFO data transmission isolated communication events, zero-copy isolated communication events, smart pointer communication events, and copy-on-write communication events.

[0012] Furthermore, when the type of the isolated communication event is a FIFO data transmission isolated communication event, the isolated virtual communication soft bus maintains an isolated shared memory FIFO queue for each isolated communication event channel. After the isolated communication event producer system domain writes data into the corresponding isolated shared memory FIFO queue, the isolated communication event observer system domain obtains the data write and obtains the corresponding isolated shared memory FIFO queue data through the receiving function interface provided by the isolated virtual communication soft bus.

[0013] When the type of the isolated communication event is an interrupted isolated communication event, the isolated virtual communication soft bus maintains an isolated shared memory Ringbuffer queue for each isolated communication event channel. After the isolated communication event producer system domain writes data into the corresponding isolated shared memory Ringbuffer queue, the isolated virtual communication soft bus notifies the corresponding isolated communication event observer system domain of the data write through an interrupt. The isolated communication event observer system domain obtains the corresponding isolated shared memory Ringbuffer queue data through the receive function interface provided by the isolated virtual communication soft bus.

[0014] When the type of the isolated communication event is a zero-copy isolated communication event, the isolated virtual communication soft bus allocates the same zero-copy isolated shared memory to the isolated communication event producer system domain and the isolated communication event observer system domain. The isolated communication event producer system domain dynamically requests a zero-copy isolated shared memory and writes data to it before notifying the isolated communication event observer system domain. The isolated communication event observer system domain then obtains the corresponding zero-copy isolated shared memory and the right to use it.

[0015] When the type of isolated communication event is a smart pointer communication event, the isolated virtual communication soft bus allocates an isolated shared memory smart pointer to the isolated communication event producer system domain and the isolated communication event observer system domain. When the data of the isolated communication event handle corresponding to the isolated shared memory smart pointer increases, the isolated virtual communication soft bus dynamically requests isolated shared memory; when the data decreases, the corresponding isolated shared memory is dynamically reclaimed.

[0016] When the type of the isolated communication event is a copy-on-write communication event, the isolated virtual communication soft bus provides the same zero-copy isolated shared memory to the isolated communication event producer system domain and the isolated communication event observer system domain during initialization. When different isolated communication event observer system domains write data to the corresponding isolated shared memory, the isolated virtual communication soft bus dynamically provides new isolated shared memory to the corresponding isolated communication event observer system domain for the isolated communication event observer system domain to write the corresponding data.

[0017] Furthermore, when the isolated communication event producer system domain or the isolated communication event observer system domain releases the corresponding isolated communication event handle, the corresponding isolated communication event channel is disconnected, and the corresponding isolated shared memory cannot transmit data; when all isolated communication event producer system domains and isolated communication event observer system domains release the corresponding isolated communication event handles, the isolated virtual communication soft bus reclaims the corresponding isolated shared memory resources.

[0018] Furthermore, various types of isolated communication events can be used in combination.

[0019] Furthermore, the isolated virtual communication soft bus also provides data security verification functionality. When the isolated communication event producer system domain sends the corresponding isolated communication event through the send function interface provided by the isolated virtual communication soft bus, the isolated virtual communication soft bus verifies the data format and permissions, and prohibits writing non-compliant data to the isolated shared memory. At the same time, the isolated virtual communication soft bus verifies the permissions of the isolated communication event observer system domain for the corresponding isolated communication event handle, and refuses to read the corresponding isolated shared memory data content for unauthorized isolated communication event handles.

[0020] Furthermore, the isolated virtual communication soft bus service module provides the function of encapsulating isolated communication events and making them available for call by the operating system of the corresponding system domain.

[0021] Furthermore, the isolated virtual communication soft bus service module also provides operating system call functions for various types of isolated communication events to call the basic function functions provided by the privileged layer isolated virtual communication soft bus.

[0022] The beneficial effects of the hardware-isolated virtual communication soft bus implementation method of the present invention are as follows:

[0023] This invention organizes isolated shared memory into an isolated shared memory pool by running an isolated virtual communication soft bus in the jailhouse. It meets different soft bus data and message transmission needs through different isolated communication event types, and provides interfaces for isolated communication event registration, writing, reading, authorization and verification functions to different hardware isolation system domains.

[0024] This invention provides an isolated virtual communication soft bus service module that runs on operating systems in different system domains, and encapsulates interface function calls to the privileged layer isolated virtual communication soft bus for different operating systems, thereby satisfying the complex communication functions of the corresponding operating systems for isolated communication events.

[0025] This invention allows only the operating system of the system domain corresponding to the authorized isolated communication event to obtain the corresponding isolated communication event handle and establish a communication channel, and to promptly reclaim the corresponding resources after the isolated communication channel has been used.

[0026] This invention provides a high-efficiency, secure, dynamically connected, and lightweight soft bus communication method for different isolated system domains; it greatly improves the flexibility and versatility of communication between hardware isolated systems; and at the same time realizes communication decoupling and communication function reuse between isolated systems. Attached Figure Description

[0027] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0028] Figure 1 is a schematic diagram of the principle structure of the hardware-isolated isolated virtual communication soft bus implementation method of the present invention. Detailed Implementation

[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0030] Example 1

[0031] Referring to Figure 1, a detailed description of the hardware-isolated isolated virtual communication soft bus implementation method of the present invention will be provided, specifically:

[0032] In a virtualized hardware isolation configuration consisting of several system domains (i.e., isolated system domains), an isolated virtual communication soft bus runs on the privileged layer (e.g., e12 on arm64) jailhouse. Each system domain's corresponding operating system runs an isolated virtual communication soft bus service module. Communication between system domains is achieved through isolated shared memory. As shown in Figure 1, hardware isolation is implemented with one master system domain and two slave system domains. The master system domain deploys a Linux operating system, while the two slave system domains deploy a Linux operating system and an RTOS operating system, respectively. Each system domain deploys an isolated virtual communication soft bus service module. The isolated virtual communication soft bus runs on the jailhouse and is communicatively connected to each system domain.

[0033] (a) Isolated Virtual Communication Software Bus

[0034] The isolated virtual communication soft bus organizes isolated shared memory into shared memory pools and manages and maintains isolated communication events between different system domain operating systems through different types of isolated communication event structures. Each isolated communication event structure contains the isolated shared memory, functional interfaces, permissions, etc., for the corresponding isolated communication event. The contents of different types of isolated communication event structures are flexibly combined according to different functions. The isolated virtual communication soft bus also provides producer functional interfaces for registering corresponding isolated communication events, observer functional interfaces for obtaining handles of the required isolated communication events, send functional interfaces for sending corresponding isolated communication events, and receive functional interfaces for receiving corresponding isolated communication events. Isolated shared memory is isolated by the jailhouse hardware, and the isolated virtual communication soft bus takes over and organizes its management. Further details are as follows:

[0035] 1. The isolated virtual communication soft bus runs at the privileged level and manages and maintains isolated communication events between different system domain operating systems through different types of isolated communication event structures. It organizes the corresponding isolated shared memory regions into isolated shared memory pools. When the operating system of the corresponding system domain uses the corresponding isolated communication event, the corresponding isolated shared memory is dynamically allocated from the isolated shared memory pool. When the corresponding isolated communication event is finished, the corresponding isolated shared memory is reclaimed to the isolated shared memory pool.

[0036] 2. The isolated virtual communication soft bus provides producer function interfaces to different isolated system domains for registering corresponding isolated communication events. When the corresponding isolated communication event producer system domain registers the corresponding isolated communication event through the producer function interface, the isolated virtual communication soft bus will dynamically allocate the corresponding communication event handle and apply for the isolated shared memory used by the corresponding isolated communication event from the isolated shared memory pool as needed. At the same time, the isolated communication event producer system domain can specify which system domains can obtain the corresponding isolated communication event handle.

[0037] 3. The isolated virtual communication soft bus provides observer function interfaces to different isolated system domains to obtain handles of the corresponding isolated communication events. When the observer system domain of the corresponding isolated communication event obtains the corresponding isolated communication event through the observer function interface, the isolated virtual communication soft bus will connect the corresponding isolated communication events of the producer system domain and the observer system domain of the isolated communication event into an isolated communication event channel. The observer system domain of the isolated communication event can only obtain the handles of the authorized isolated communication events.

[0038] 4. The isolated virtual communication soft bus provides a sending function interface to the isolated communication event producer system domain for sending the corresponding isolated communication event. After the corresponding isolated communication event is sent, the isolated virtual communication soft bus will transmit the corresponding isolated communication event according to the type of the corresponding isolated communication event and pass the corresponding isolated communication event to the corresponding isolated communication event observer system domain through the isolated communication event channel.

[0039] 5. The isolated virtual communication soft bus provides a receiving interface to the isolated communication event observer system domain to receive corresponding isolated communication events. When a corresponding isolated communication event is detected through the isolated communication event channel, the isolated communication event observer system domain obtains the data corresponding to the isolated communication event.

[0040] In actual operation, different system domains are connected through isolated communication event channels corresponding to isolated communication events. One isolated communication event producer system domain acts as the sender, and another isolated communication event observer system domain acts as the receiver. The sender and receiver establish an isolated communication event channel using the same isolated communication event handle. One sender can correspond to multiple receivers. The corresponding isolated communication event types include interrupt isolated communication events, FIFO data transfer isolated communication events, zero-copy isolated communication events, smart pointer communication events, and copy-on-write communication events.

[0041] Furthermore, the isolated virtual communication soft bus decouples communication between isolated operating systems by maintaining and managing communication between isolated systems at the privileged layer, and allows isolated communication event producers and observers to flexibly register to different system domains.

[0042] The isolated virtual communication soft bus also provides data security verification functionality. When the isolated communication event producer system domain sends the corresponding isolated communication event through the send function interface provided by the isolated virtual communication soft bus, it will verify the data format and permissions. Data that does not conform to the requirements will be prohibited from being written to the isolated shared memory. At the same time, the isolated virtual communication soft bus will verify the permissions of the isolated communication event observer system domain for the corresponding isolated communication event handle. For unauthorized isolated communication event handles, it will refuse to read the corresponding isolated shared memory data content.

[0043] The isolated virtual communication soft bus provides a lightweight communication method between hardware-isolated systems, allowing for the registration of a large number of isolated communication event channels. Each channel operates independently, can communicate concurrently, and can be acquired and used by multiple applications. When a corresponding isolated communication event channel remains inactive for an extended period, the isolated virtual communication soft bus detects the corresponding isolated communication event producer system domain and isolated communication event observer system domain. If neither the producer nor observer system domain responds, the corresponding isolated communication event channel resource is reclaimed.

[0044] The system domains for isolated communication event producers and observers can be in different system domains; alternatively, they can be in the same system domain. These domains can establish channels within the same system domain, isolating the soft buses from each other using hardware isolation. Specifically, permissions are set at the privilege level for the isolated virtual communication soft bus corresponding to the isolated communication event channel. Authorized processes can access the corresponding isolated virtual communication soft bus and its corresponding isolated communication event channel, while unauthorized processes cannot obtain or access it. This hardware privilege level management significantly improves the security of data communication between the soft bus and the corresponding system domain.

[0045] (II) Isolated Virtual Communication Soft Bus Service Module

[0046] Each corresponding operating system runs an isolated virtual communication soft bus service module, which calls the functional interfaces provided by the privileged layer isolated virtual communication soft bus at the operating system layer (EL1 on arm64). The isolated virtual communication soft bus service module encapsulates isolated communication event functions and provides them to the corresponding system domain's operating system for invocation. It also provides operating system call functions for various types of isolated communication events to invoke the basic functional functions provided by the privileged layer isolated virtual communication soft bus. Specifically...

[0047] The isolated virtual communication soft bus service module encapsulates the corresponding isolated communication event functions based on the producer function interface, observer function interface, send function interface, and receive function interface provided by the isolated virtual communication soft bus, and provides them to the operating system of the corresponding system domain for invocation. When the operating system invokes the corresponding isolated communication event function, the isolated virtual communication soft bus responds to the corresponding isolated communication event function invocation and completes the corresponding isolated communication event communication based on the corresponding isolated communication event function.

[0048] For interrupt-isolated communication events, FIFO data transfer isolation communication events, zero-copy isolation communication events, smart pointer communication events, and copy-on-write communication events, the corresponding isolated virtual communication soft bus service module provides the corresponding operating system call function to call the basic function provided by the privileged layer isolated virtual communication soft bus.

[0049] (III) Isolating communication event handles

[0050] The isolated communication event handle is obtained by the corresponding isolated communication event producer system domain through calling the corresponding operating system's isolated virtual communication soft bus service module to request the corresponding isolated communication event through the isolated virtual communication soft bus. It is an encapsulation of a specific isolated communication event channel. The isolated virtual communication soft bus authorizes the corresponding isolated communication event handle to different isolated communication event observer system domains. The isolated communication event observer system domain establishes an isolated communication event channel with the isolated communication event producer system domain through the isolated communication event handle.

[0051] The isolated communication event producer system domain registers the corresponding isolated communication event and obtains the shared memory address through the privileged layer's isolated virtual communication soft bus. After successful registration, it obtains the corresponding "isolated communication event handle" to manage the corresponding isolated communication event channel and write data. At the same time, it authorizes the corresponding "isolated communication event handle" to different system domains.

[0052] The isolated communication event observer system domain obtains the corresponding authorized "isolated communication event handle" through the isolated virtual communication soft bus, and uses the obtained "isolated communication event handle" to establish an isolated communication event channel and read data.

[0053] The isolated virtual communication soft bus uses isolated communication event handles to obtain operations related to the isolated communication event producer system domain and the isolated communication event observer system domain, and manages the corresponding isolated shared memory.

[0054] Example 2

[0055] Based on Example 1, the processing logic of the isolated virtual communication soft bus for handling the corresponding isolated communication events according to the corresponding isolated communication event type is further introduced.

[0056] 1. FIFO data transmission isolates communication events. The isolated virtual communication soft bus maintains an isolated shared memory FIFO queue for each isolated communication event channel. After the isolated communication event producer system domain writes data into the corresponding isolated shared memory FIFO queue, the isolated communication event observer system domain receives the data write and obtains the corresponding isolated shared memory FIFO queue data through the receive function interface provided by the isolated virtual communication soft bus. For system domains that have not obtained the corresponding isolated communication event handle, the corresponding isolated shared memory FIFO queue data is not visible, which can meet the transmission of large data streams.

[0057] 2. Interrupted data transmission isolation communication events, also known as interrupted isolated communication events, are handled by the isolated virtual communication soft bus, which maintains an isolated shared memory Ringbuffer queue for each isolated communication event channel. After the isolated communication event producer system domain writes data into the corresponding isolated shared memory Ringbuffer queue, the isolated virtual communication soft bus notifies the corresponding isolated communication event observer system domain of the data write via an interrupt. The isolated communication event observer system domain obtains the data from the corresponding isolated shared memory Ringbuffer queue through the receive function interface provided by the isolated virtual communication soft bus. For system domains that have not obtained the corresponding interrupted isolated communication event handle, the corresponding interrupt and the corresponding isolated shared memory Ringbuffer queue are not visible, which can meet the requirements of batch real-time message transmission.

[0058] 3. Zero-copy isolated communication events: The isolated virtual communication soft bus allocates the same zero-copy isolated shared memory to both the isolated communication event producer system domain and the isolated communication event observer system domain. The isolated communication event producer system domain dynamically requests a zero-copy isolated shared memory and writes data to it before notifying the isolated communication event observer system domain. The isolated communication event observer system domain acquires the corresponding zero-copy isolated shared memory and the right to use it. When the isolated communication event observer system domain has finished using the corresponding zero-copy isolated shared memory, the isolated virtual communication soft bus reclaims the corresponding shared memory address.

[0059] 4. Smart pointer communication events: The isolated virtual communication soft bus allocates an isolated shared memory smart pointer to the isolated communication event producer system domain and the isolated communication event observer system domain. When the data of the isolated communication event handle corresponding to the isolated shared memory smart pointer increases, the isolated virtual communication soft bus dynamically requests isolated shared memory; when the data decreases, the corresponding isolated shared memory is dynamically reclaimed to avoid isolated shared memory data fragmentation and improve security.

[0060] 5. Copy-on-write communication events: The isolated virtual communication soft bus provides the same zero-copy isolated shared memory to the isolated communication event producer system domain and the isolated communication event observer system domain during initialization. When different isolated communication event observer system domains write data to the corresponding isolated shared memory, the isolated virtual communication soft bus dynamically provides new isolated shared memory to the corresponding isolated communication event observer system domain for writing the corresponding data, reducing unnecessary isolated shared memory consumption.

[0061] In actual operation, when the isolated communication event producer system domain or the isolated communication event observer system domain releases the corresponding isolated communication event handle, the corresponding isolated communication event channel is disconnected, and the corresponding shared memory cannot transmit data. When all isolated communication event producer system domains and isolated communication event observer system domains release the corresponding isolated communication event handles, the isolated virtual communication soft bus reclaims the corresponding isolated shared memory resources. Various types of isolated communication events can be used in combination; for example, interrupt data transmission isolated communication events and smart pointer communication events can be used together.

[0062] Example 3

[0063] Based on Example 2, the method of the present invention will be further described in detail in conjunction with specific applications.

[0064] A hybrid deployment application case, using hardware isolation to create three system domains: one is the Galaxy Kylin Advanced Server Operating System, one is the Ubuntu desktop, and one is the Nuttx real-time operating system.

[0065] 1. The Galaxy Kylin Advanced Server Operating System is an isolated communication event producer system domain. The Galaxy Kylin Advanced Server Operating System calls the corresponding interface of the isolated virtual communication soft bus service module to register the corresponding isolated communication events, such as FIFO data transmission isolated communication events, for data communication between isolated systems, such as GPU driver computing data transmission, and authorizes the corresponding isolated communication events to the Nuttx real-time operating system.

[0066] 2. The Nuttx real-time operating system acts as the system domain for the isolated communication event observer. The Nuttx real-time operating system calls the corresponding interface of the isolated virtual communication soft bus service module to obtain the handle of the corresponding isolated communication event, which is used to establish an isolated communication event channel. The Galaxy Kylin Advanced Server Operating System and the Nuttx real-time operating system establish an isolated communication event channel.

[0067] 3. The Galaxy Kylin Advanced Server Operating System writes data to the corresponding isolated communication event channel of the isolated shared memory through the corresponding isolated communication event handle. The isolated virtual communication soft bus judges the validity of the written data. If the judgment is successful, the corresponding GPU driver calculation result data is shared with the Nuttx real-time operating system through the isolated communication event channel.

[0068] 4. The Nuttx real-time operating system, based on the isolated communication event handle, calls the corresponding isolated communication event monitoring function of the isolated virtual communication soft bus service module to obtain the data write notification from the Galaxy Kylin Advanced Server Operating System. It then calls the data acquisition function to obtain the data written by the Galaxy Kylin Advanced Server Operating System to the corresponding isolated communication event channel. The isolated virtual communication soft bus checks whether the read is valid. If valid, it allows the Nuttx real-time operating system to read the data of the corresponding isolated communication event channel.

[0069] 5. Because the Kylin Advanced Server operating system (i.e., the isolated communication event producer system domain) did not authorize the corresponding isolated communication event to the Ubuntu desktop system, the Ubuntu desktop system cannot obtain the handle of the corresponding isolated communication event and cannot read the corresponding isolated shared memory data. Furthermore, the corresponding isolated communication event can be used by other legitimate processes of the Kylin Advanced Server operating system to transmit data to the Nuttx real-time operating system, thus achieving communication decoupling.

[0070] 6. Furthermore, the Galaxy Kylin Advanced Server Operating System can register multiple isolated communication events and selectively authorize either the Ubuntu desktop system or the Nuttx real-time operating system. The Ubuntu desktop system or the Nuttx real-time operating system can obtain handles to the required isolated communication events for the corresponding authorization to establish corresponding isolated communication event channels. Simultaneously, the Ubuntu desktop system or the Nuttx real-time operating system can register multiple isolated communication events for the producer system domain, authorize them to other isolated system domains, and establish corresponding isolated communication event channels with other system domains; the Ubuntu desktop system or the Nuttx real-time operating system can also act as an observer system domain for isolated communication events, obtaining handles to the corresponding isolated communication events and establishing isolated communication event channels to transmit data or messages.

[0071] 7. After the corresponding isolated communication event channel is established and used, the isolated virtual communication soft bus reclaims the corresponding isolated shared memory resources.

[0072] The virtualization hardware isolation technology includes, but is not limited to, jailhouse.

[0073] Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

Claims

1. A method for implementing an isolated virtual communication soft bus based on hardware isolation, characterized in that, This includes an isolated virtual communication soft bus running on the privileged jailhouse, and isolated virtual communication soft bus service modules running on the corresponding operating systems of each system domain isolated by virtualization hardware. Communication between system domains is achieved through isolated shared memory. The isolated virtual communication soft bus organizes each isolated shared memory into a shared memory pool and manages and maintains isolated communication events between different system domain operating systems through different types of isolated communication event structures. The isolated virtual communication soft bus provides a producer function interface for registering corresponding isolated communication events, an observer function interface for obtaining handles of the required isolated communication events, a send function interface for sending corresponding isolated communication events, and a receive function interface for receiving corresponding isolated communication events. The isolated virtual communication soft bus service module calls the functional interfaces provided by the privileged layer isolated virtual communication soft bus at the operating system layer. The isolated shared memory is isolated by jailhouse hardware, and the isolated virtual communication soft bus takes over and manages the memory resources. Different system domains are connected through isolated communication event channels corresponding to isolated communication events. One isolated communication event producer system domain is the sender, and another isolated communication event observer system domain is the receiver. The sender and receiver establish an isolated communication event channel through the same isolated communication event handle. The types of corresponding isolated communication events include interrupt isolated communication events, FIFO data transfer isolated communication events, zero-copy isolated communication events, smart pointer communication events, and copy-on-write communication events; When the isolated communication event producer system domain or the isolated communication event observer system domain releases the corresponding isolated communication event handle, the corresponding isolated communication event channel is disconnected, and the corresponding isolated shared memory cannot transmit data. When all isolated communication event producer system domains and isolated communication event observer system domains release the corresponding isolated communication event handles, the isolated virtual communication soft bus reclaims the corresponding isolated shared memory resources.

2. The method according to claim 1, characterized in that, One sender corresponds to at least one receiver.

3. The method according to claim 1, characterized in that, When the type of the isolated communication event is a FIFO data transmission isolated communication event, the isolated virtual communication soft bus maintains an isolated shared memory FIFO queue for each isolated communication event channel. After the isolated communication event producer system domain writes the data into the corresponding isolated shared memory FIFO queue, the isolated communication event observer system domain obtains the data written and obtains the corresponding isolated shared memory FIFO queue data through the receiving function interface provided by the isolated virtual communication soft bus. When the type of the isolated communication event is an interrupt-type isolated communication event, the isolated virtual communication soft bus maintains an isolated shared memory Ringbuffer queue for each isolated communication event channel. After the isolated communication event producer system domain writes data into the corresponding isolated shared memory Ringbuffer queue, the isolated virtual communication soft bus notifies the corresponding isolated communication event observer system domain of the data write via an interrupt. The isolated communication event observer system domain obtains the data from the corresponding isolated shared memory Ringbuffer queue through the receive function interface provided by the isolated virtual communication soft bus. When the type of the isolated communication event is a zero-copy isolated communication event, the isolated virtual communication soft bus allocates the same zero-copy isolated shared memory to both the isolated communication event producer system domain and the isolated communication event observer system domain. The isolated communication event producer system domain dynamically requests a zero-copy isolated shared memory and writes data into it before notifying the isolated communication event observer system domain. The isolated communication event observer system domain then obtains the data from the corresponding isolated shared memory Ringbuffer queue. Zero-copy isolated shared memory should be used, and the corresponding zero-copy isolated shared memory usage rights should be acquired. When the type of isolated communication event is a smart pointer communication event, the isolated virtual communication soft bus allocates an isolated shared memory smart pointer to the isolated communication event producer system domain and the isolated communication event observer system domain. When the data of the isolated communication event handle corresponding to the isolated shared memory smart pointer increases, the isolated virtual communication soft bus dynamically requests isolated shared memory; when the data decreases, the corresponding isolated shared memory is dynamically reclaimed. When the type of isolated communication event is a copy-on-write communication event, the isolated virtual communication soft bus provides the same zero-copy isolated shared memory to the isolated communication event producer system domain and the isolated communication event observer system domain during initialization. When different isolated communication event observer system domains write data to the corresponding isolated shared memory, the isolated virtual communication soft bus dynamically provides new isolated shared memory to the corresponding isolated communication event observer system domain for the isolated communication event observer system domain to write the corresponding data.

4. The method according to claim 3, characterized in that, Various types of isolated communication events can be used in combination.

5. The method according to claim 1, characterized in that, The isolated virtual communication soft bus also provides a data security verification function. When the isolated communication event producer system domain sends the corresponding isolated communication event through the sending function interface provided by the isolated virtual communication soft bus, the isolated virtual communication soft bus verifies the data format and permissions. Data that does not conform to the requirements is prohibited from being written to the isolated shared memory. Simultaneously, the isolated virtual communication soft bus verifies the system domain's permissions for the corresponding isolated communication event handles of the isolated communication event observers. For unauthorized isolated communication event handles, reading the corresponding isolated shared memory data content is refused.

6. The method according to claim 1, characterized in that, The isolated virtual communication soft bus service module provides functions for encapsulating and isolating communication events and making them available for call by the operating system of the corresponding system domain.

7. The method according to claim 1, characterized in that, The isolated virtual communication soft bus service module also provides operating system call functions for various types of isolated communication events to call the basic function functions provided by the privileged layer isolated virtual communication soft bus.

Citation Information

Patent Citations

  • Cross-system data sharing method based on hardware isolation, electronic equipment and medium

    CN116737413A