A dds communication method under a static partition virtualization environment

CN122593907APending Publication Date: 2026-08-18KYLIN CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611089096.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

在RTOS环境中,受线程模型及库函数支持限制,难以直接部署或裁剪,导致DDS难以在轻量级虚拟机中使用

Benefits of technology

本发明通过在底层构建统一的跨虚拟机共享内存环形缓冲区与事件驱动模型;在Linux端(Root Cell)开发Fast-DDS自定义传输插件;在RTOS端(Inmate Cell)开发轻量级传输层库(libivshmdds)。在不改变DDS上层语义的前提下,实现了异构系统间零拷贝、低延迟、高可靠的数据分发。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122593907A_ABST
    Figure CN122593907A_ABST
Patent Text Reader

Abstract

The application provides a DDS communication method in a static partition virtualization environment, and belongs to the technical field of computers, and comprises the following steps: modifying a Jailhouse source code, and adding a DDS communication protocol identifier; creating a shared memory ring buffer data structure; in step S3, modifying a Root Cell configuration file, and implementing a SharedMemIvshmemTransport plug-in in a Root Cell of a party to which a subscriber belongs; modifying an Inmate Cell configuration file, so that an Inmate Cell of a party to which a publisher belongs implements a lightweight transport layer library libivshmdds, and memory mapping logic is realized; a publisher program of the Inmate Cell writes data into the shared memory through the transport layer library libivshmdds, and triggers an interrupt notification of the Root Cell; and a subscriber program of the Root Cell captures the interrupt notification and reads data from the shared memory. The application breaks the communication barrier between cross operating systems and cross virtual machines, and provides a cross virtual machine DDS communication scheme with real-time performance and reliability for a hybrid critical system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to DDS communication, and more particularly to a DDS communication method in a static partitioned virtualization environment, belonging to the field of computer technology. Background Technology

[0002] In mission-critical systems such as industrial control, aerospace, and automotive electronics, it is often necessary to construct highly secure and reliable mixed-critical systems. Static partitioning virtualization software (such as Jailhouse) can divide multi-core processor resources into multiple isolated virtual execution units (cells), allowing the root cell running Linux and the inmate cell running a lightweight RTOS or other embedded operating system to coexist on a single physical platform. However, in such heterogeneous and strictly isolated environments, there is a lack of a unified, efficient, and low-latency DDS (Data Distribution Service). This solution aims to break down communication barriers across operating systems and virtual machines, providing a cross-virtual machine DDS communication solution for mixed-critical systems that combines real-time performance and reliability.

[0003] DDS (Data Distribution Service) is a widely used data communication middleware standard for critical systems, employing a publish-subscribe model. Open-source implementations (such as Fast-DDS) support transport mechanisms such as UDP, TCP, and local shared memory, and are compatible with the RTPS (Real-Time Publish-Subscribe) protocol layer. Jailhouse virtualization is a statically partitioned virtualization architecture that ensures the independent operation of each operating system by isolating hardware resources. Internally, it provides a mechanism called IVSHMEM for communication between virtual machines.

[0004] Although DDS has been widely used in general-purpose systems, it faces three major contradictions and bottlenecks in static partition virtualization systems: Cross-operating system communication is limited: Each cell is isolated from the others and runs different operating systems, so the traditional inter-process shared memory mechanism of DDS cannot be used across cells; if network transmission is used, a complete network protocol stack is required, which increases latency and resource consumption, making it difficult to meet real-time requirements.

[0005] Protocol stack complexity and resource constraints: The complete DDS protocol stack relies on abundant system resources and a C++ runtime environment. In an RTOS environment, limitations imposed by the thread model and library function support make direct deployment or customization difficult, hindering the use of DDS in lightweight virtual machines.

[0006] Limitations of the IVSHMEM mechanism: Although Jailhouse provides the IVSHMEM mechanism, it only implements the underlying memory sharing and interrupt signal (doorbell), lacks the semantic abstraction of the DDS layer, and cannot be directly integrated into the DDS transport layer. Summary of the Invention

[0007] To address the aforementioned issues, this invention provides a DDS communication method in a static partitioned virtualization environment, breaking down communication barriers across operating systems and virtual machines, and offering a cross-virtual machine DDS communication solution that combines real-time performance and reliability for hybrid critical systems.

[0008] To achieve the above objectives, the technical solution of the present invention is: a DDS communication method in a static partition virtualization environment, comprising the following steps: Step S1: Modify the Jailhouse source code to add a DDS communication protocol identifier to distinguish between DDS publishers and subscribers. Step S2: Create a shared memory circular buffer data structure; Step S3: Modify the Root Cell configuration file of the subscriber's side, implement the SharedMemIvshmemTransport plugin in the Root Cell of the subscriber's side, and use the uio_ivshmem driver provided by Jailhouse to map the shared memory created in step S2. Step S4: Modify the Inmate Cell configuration file of the publisher's side to enable the Inmate Cell of the publisher's side to implement the lightweight transport layer library libivshmdds and implement memory mapping logic; thereby enabling the Root Cell of the subscriber's side and the Inmate Cell of the publisher's side to have consistent mapping and access permissions to the shared memory created in step S2. Step S5: The Inmate Cell publisher writes data to shared memory through the transport layer library libivshmdds, triggering an interrupt notification from the Root Cell; the Root Cell subscriber captures the interrupt notification and reads data from shared memory.

[0009] Furthermore, in step S1, the DDS publisher / subscriber roles are distinguished by assigning a dedicated protocol number to the DDS protocol in Jailhouse's cell-config.h.

[0010] Furthermore, in step S2, the created shared memory ring buffer data structure stores the sequence number, timestamp, and Topic metadata in the message header, and maintains the read / write index, slot size, and status in the ring channel control area, thereby achieving efficient collaboration between publishers and subscribers.

[0011] Furthermore, in step S3, when modifying the Root Cell configuration file of the subscriber's party, the SharedMemIvshmemTransport plugin implemented in the Root Cell of the subscriber's party also needs to be fully integrated with the Fast-DDS semantic implementation mechanism.

[0012] Furthermore, in step S4, when modifying the Inmate Cell configuration file of the publisher's party, the lightweight transport layer library libivshmdds implemented by the Inmate Cell of the publisher's party is implemented by encapsulating the cross-cell publishing library, which also implements doorbell interruption notification and simplified RTPS data frame construction functions.

[0013] Furthermore, in step S5, the Inmate Cell publisher program writing data to shared memory via the transport layer library libivshmdds includes: Step S51: The publisher program calls the libivshmdds interface to construct RTPS data frames; Step S52: Write the data frame to the next available slot in the shared memory circular buffer; Step S53: Update the status of the slot containing the written data to "ready", marking the data as ready for consumption.

[0014] Furthermore, in step S5, the Root Cell's subscriber program capturing the interruption notification and reading data from shared memory includes: Step S54: The uio_ivshmem driver captures the doorbell interrupt and sends a notification to the user-space plugin; Step S55: The SharedMemIvshmemTransport plugin checks and reads all “ready” slots based on the read index (r_index) of the shared memory circular buffer; Step S56: Unpack the read shared memory data into a Fast-DDS serialization cache and pass it to the reader program interface; Step S57: The Fast-DDS layer calls back the Linux user-space DDS subscription application running in the Root Cell. The DDS subscription application receives and processes messages, realizing a complete data link from shared memory to the application.

[0015] Furthermore, each slot stores the complete DDS message, supporting zero-copy reading and avoiding additional data copying.

[0016] Furthermore, the transport layer library libivshmdds encapsulates IVSHMEM's shared memory ring buffer operations, doorbell interrupt triggering, and RTPS data frame construction logic to achieve cross-cell, low-latency data publishing.

[0017] The beneficial effects of the DDS communication method in the static partitioning virtualization environment of the present invention are as follows: This invention achieves zero-copy, low-latency, and highly reliable data distribution between heterogeneous systems without altering the upper-layer semantics of DDS. It involves building a unified cross-virtual machine shared memory ring buffer and an event-driven model at the underlying level; developing a custom Fast-DDS transport plugin on the Linux side (Root Cell); and developing a lightweight transport layer library (libivshmdds) on the RTOS side (Inmate Cell).

[0018] The method of this invention allows Linux developers to continue using standard Fast-DDS interfaces (such as DataReader / DataWriter) without modifying existing business code. The system automatically handles zero-copy data transmission and reception across virtual machines via plugins. On the RTOS side, a minimalist, lightweight C language API (libivshmdds) is provided, shielding the complexity of the underlying protocol stack. Developers only need to call simple interfaces to publish data to the entire DDS network, significantly reducing the development threshold and resource consumption of hybrid critical systems.

[0019] This invention constructs a cross-virtual machine and cross-operating system shared memory DDS communication mechanism, realizing efficient data exchange between Linux and RTOS; it designs a unified shared memory structure and a ring buffer communication model, realizing interrupt-driven, zero-copy, and high real-time data transmission; it implements a Fast-DDS custom transmission plugin on the Linux side, enabling seamless connection of the shared memory channel IVSHMEM to the protocol layer; and it implements a lightweight compatibility library on the RTOS side, encapsulating low-level operations and simplifying RTPS frame processing; thus forming a scalable, low-latency, deterministic data distribution capability for heterogeneous systems. Attached Figure Description

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

[0021] Figure 1 This is a schematic diagram of the system structure of the DDS communication method in a static partitioning virtualization environment according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the DDS communication process between the Root Cell and the Inmate Cell based on IVSHMEM in an embodiment of the present invention. Detailed Implementation

[0022] 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.

[0023] Definitions of abbreviations and key terms Hypervisor: A virtual machine monitor is a virtualization control layer software that runs between the hardware and the operating system. It is responsible for creating, scheduling, and isolating multiple virtual execution environments, and provides resource management capabilities such as interrupt forwarding, exception handling, memory mapping, and device access control.

[0024] Mixed-Criticism System: A mixed-critical system refers to a system that runs multiple software systems or operating system instances with different real-time, security, and deterministic requirements on the same hardware platform. At least one of these is a real-time operating system with strict time constraints, while the remaining systems are used to carry general-purpose or high-throughput non-real-time tasks.

[0025] RTOS: Real-time Operating System, is a software system that can complete task scheduling and event response within a defined time limit. It supports high-priority preemptive scheduling, deterministic interrupt response, and time-constrained guarantees, and is suitable for industrial control, automotive electronics, and safety-critical systems.

[0026] DDS: Data Distribution Service, a data communication middleware standard widely used in mission-critical systems such as industry, aviation, and automotive. It adopts a publish-subscribe model and features strong real-time performance and flexible QoS configuration.

[0027] Cell (Root / Inmate): An independent execution unit within the Jailhouse virtualization architecture. The Root Cell typically runs a Linux operating system with full control privileges; the Inmate Cell runs a lightweight RTOS or bare-metal program in a restricted, isolated environment.

[0028] IVSHMEM: Inter-VM Shared Memory, a low-level communication mechanism that enables high-throughput, zero-copy data exchange across multiple virtual execution environments (Cells) by mapping the same physical memory region.

[0029] Doorbell: The doorbell notification mechanism is a cross-domain notification method that triggers interrupts or event handling processes on the other end by writing to registers or using shared memory signals. It is used to implement asynchronous signal transmission for sending completion, receiving scheduling, or state changes in virtual devices.

[0030] RTPS: Real-Time Publish-Subscribe, the standard line protocol at the bottom layer of the DDS protocol stack, which specifies the discovery mechanism, state negotiation, and message serialization and encapsulation format between data nodes.

[0031] Zero-copy: Zero copy refers to the fact that data is read and written directly in the same shared physical memory address throughout its entire lifecycle from the sender (publisher) to the receiver (subscriber), avoiding the additional data movement and copying overhead between user mode and kernel mode or between heterogeneous systems.

[0032] Cache line alignment: a memory optimization design. Modern CPUs read memory through cache lines (typically 64 bytes). This approach avoids "false sharing" when different CPU cores concurrently read and write shared memory by aligning data structures to 64-byte boundaries, ensuring absolute determinism of memory access latency.

[0033] Fast-DDS: An industry-leading open-source C++ implementation framework for the DDS protocol. This invention achieves seamless integration with it on the Linux side by developing a custom transport plugin, enabling it to directly recognize and manipulate the underlying IVSHMEM shared memory.

[0034] Ring Buffer: The underlying communication data structure of this invention. By pre-allocating contiguous memory slots and using independently maintained read / write index pointers, it enables efficient queue flow between publishers and subscribers based on event-driven mechanisms.

[0035] The DDS communication method in the static partition virtualization environment of this invention addresses the challenge of DDS communication across virtual machines and operating systems in the Jailhouse static partition virtualization system. The core ideas include the following: 1. Construct a cross-virtual machine shared memory structure and event-driven model The Read / Write Section based on the IVSHMEM protocol implements a unified shared memory layout and a circular buffer queue communication model. It utilizes the doorbell interrupt mechanism to achieve event-driven notification, avoids CPU polling, significantly improves communication performance and system response speed, and enables efficient, low-latency DDS data exchange between virtual machines.

[0036] 2. Fast-DDS Custom Transfer Plugin in Linux Environment The SharedMemIvshmemTransport plugin is implemented in the Root Cell. It uses the uio_ivshmem driver provided by Jailhouse to map IVSHMEM shared memory, and directly operates the circular queue in user space. It fully supports Fast-DDS Topic management, QoS configuration and serialization process, and achieves seamless integration with the Fast-DDS ecosystem.

[0037] 3. Lightweight transport library for RTOS environment (libivshmdds) For resource-constrained RTOS in Inmate Cell, a lightweight transport layer library libivshmdds was designed and implemented. The underlying layer relies on IVSHMEM to implement the reading and writing of the circular buffer and doorbell interrupt notification, while the upper layer provides a simplified Fast-DDS compatible interface, shielding complex protocol details, simplifying DDS communication integration on the RTOS side, and ensuring real-time performance and reliability.

[0038] Example 1 This embodiment, based on the above description and in conjunction with the accompanying drawings, provides a detailed description of the DDS communication method in a static partitioning virtualization environment according to the present invention, such as... Figure 1 As shown, the method of this invention implements the Fast-DDS custom transport plugin SharedMemIvshmemTransport on the Linux side and the lightweight transport library libivshmdds on the RTOS side. It uniformly adopts the shared memory ring buffer proposed in this invention as the underlying message pool and event-driven channel. InmateCell (RTOS), as the publisher, writes serialized RTPS data to the shared ring buffer, and Root Cell (Linux), as the subscriber, reads RTPS data from the ring buffer. The specific implementation process includes the following: 1. Jailhouse source code modification and Cell configuration file writing 1.1 Add DDS communication protocol identifier In accordance with the Protocol Type requirements in the IVSHMEM device specification, a dedicated protocol number is assigned to the DDS protocol in Jailhouse's cell-config.h to distinguish between DDS publisher / subscriber roles.

[0039] #define JAILHOUSE_SHMEM_PROTO_DDS_PUBLISHER 0x4001 / / DDS publisher #define JAILHOUSE_SHMEM_PROTO_DDS_SUBSCRIBER 0x4002 / / DDS subscriber 1.2 Configure the Root Cell configuration file IVSHMEM's Read / Write Section will be used to lay out the circular queue.

[0040] { .phys_start = 0xb1000000, .virt_start = 0xb1000000, .size = 0x1000, .flags = JAILHOUSE_MEM_READ, }, / / Read / Write Section { .phys_start = 0xb1001000, .virt_start = 0xb1001000, .size = 0xdf000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE, }, { 0}, { 0}, Declare the PCI device protocol type as JAILHOUSE_SHMEM_PROTO_DDS_SUBSCRIBER.

[0041] .pci_devices = { { .type = JAILHOUSE_PCI_TYPE_IVSHMEM, .domain = 1, .bdf = 0 << 3, .bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_INTX, .shmem_regions_start = 0, .shmem_dev_id = 0, .shmem_peers = 2, .shmem_protocol = JAILHOUSE_SHMEM_PROTO_DDS_SUBSCRIBER, }, }, 1.3 Writing Inmate Cell Configuration Files Map the same physical address range in the Inmate Cell to ensure that the Root Cell and the Inmate Cell have consistent mapping and access permissions to the same IVSHMEM region.

[0042] { .phys_start = 0xb1000000, .virt_start = 0xb1000000, .size = 0x1000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED, }, / / Read / Write Section { .phys_start = 0xb1001000, .virt_start = 0xb1001000, .size = 0xdf000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_ROOTSHARED, }, { 0}, { 0}, Declare the PCI device protocol type as JAILHOUSE_SHMEM_PROTO_DDS_PUBLISHER.

[0043] pci_devices = { { .type = JAILHOUSE_PCI_TYPE_IVSHMEM, .domain = 1, .bdf = 0 << 3, .bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_INTX, .shmem_regions_start = 0, .shmem_dev_id = 1, .shmem_peers = 2, .shmem_protocol = JAILHOUSE_SHMEM_PROTO_DDS_PUBLISHER, }, }, 2. Shared memory ring buffer data structure The shared memory ring buffer proposed in this invention adopts a unified data structure layout. It stores metadata such as sequence number, timestamp, and topic in the message header, and maintains read / write indexes, slot size, and status in the ring channel control area, enabling efficient collaboration between publishers and subscribers. Each slot stores a complete DDS message, supporting zero-copy reading to avoid additional data copying. It also employs a 2^n size ring queue and a 64-byte cache line alignment design to ensure deterministic access latency and improve the performance and reliability of cross-cell communication. The shared memory region (Read / Write Section) is laid out consecutively in the following order: [ShmRingChannel (including pad)] [slot0 (slot_size)] [slot1] ... [slotN-1] The key C structure is as follows: / / DDS message metadata typedef struct _ShmBufferHeader { uint64_t sequence_number; / / DDS sequence number uint64_t timestamp; / / Timestamp at the time of publication uint32_t topic_id; / / Topic distinction uint32_t instance_handle; / / Instance handle uint32_t length; / / Payload length uint32_t flags; / / Status flags (0=idle, 1=writing, 2=ready, 3=consumed) } __attribute__((packed)) ShmBufferHeader; / / Single DDS message buffer unit (slot) typedef struct _ShmBuffer { ShmBufferHeader header; uint8_t payload[]; / / Variable-length serialized data (RTPS serialization output) }__attribute__((packed)) ShmBuffer; / / Ring channel control structure typedef struct _ShmRingChannel { uint32_t w_index; / / Write index uint32_t r_index; / / Read index uint32_t mask; / / Circular index mask, mask = num_slots - 1 uint32_t slot_size; / / Maximum number of bytes per slot uint32_t num_slots; / / Number of slots, must be 2^n uint32_t max_payload_size; / / slot maximum payload uint32_t status; / / Global status uint32_t pad[9]; / / Align 64-byte cache line uint8_t data[1]; / / The starting point of the actual slot area (placeholder at the end, to be expanded during allocation) ShmRingChannel; 3. Subscriber and Publisher Program Setup 3.1 Building the Fast-DDS Subscriber Program in the Root Cell The SharedMemIvshmemTransport plugin in the Root Cell accesses the IVSHMEM device through the UIO interface provided by the uio_ivshmem driver, realizing shared memory communication and interrupt response in DDS. Its project directory structure is as follows: Linux_fastdds_subscriber / ├── src / │ ├── main.cpp / / Fast-DDS Subscriber main program │ ├── SharedMemIvshmemTransport.cpp / / Implements the Fast-DDS transport plugin logic │ ├── SharedMemIvshmemTransport.h │ ├── ShmAdapter.cpp / / C / C++ bridging wrapper │ ├── ShmAdapter.hpp │ └── shm_core / / / UIO and shared memory calls │ ├── shm_core.c │ ├── shm_core.h ├── include / │ └── ring_layout.h / / Shared memory structure definition (ShmRingChannel, etc.) ├── CMakeLists.txt SharedMemIvshmemTransport functionality implementation: (1) IVSHMEM shared memory mapping The shared memory segment exported by the uio_ivshmem driver is mapped to user space using mmap(), and the accessible address of the ring buffer control structure (ShmRingChannel) is obtained, thus realizing a shared data channel across cells.

[0044] (2) Data transmission and reception in the circular buffer The plugin directly manipulates the shared memory's ShmRingChannel control header and message slot in user space, enabling zero-copy reading and writing of DDS messages and avoiding kernel-mode switching overhead.

[0045] (3) Fast-DDS semantic docking Seamless integration with the Fast-DDS framework is achieved at the upper layer: Topic management, QoS policies and RTPS serialization mechanisms are supported, enabling the DDS layer to access data streams from shared memory via a regular DataReader interface.

[0046] 3.2 Building a libivshmdds-based publisher program in Inmate Cell (RTOS) In Inmate Cell, due to limited RTOS resources, the complete Fast-DDS protocol stack cannot be used directly. Therefore, the lightweight DDS transport library libivshmdds proposed in this invention is used to implement DDS publishing functionality. This library encapsulates IVSHMEM shared memory ring buffer operations, doorbell interrupt triggering, and RTPS data frame construction logic, enabling cross-cell, low-latency data publishing. The project directory structure and the functions of each module are as follows: rtos_ivshmdds_publisher / ├── src / │ ├── main.c / / Main program, initializes shared memory and sends messages periodically │ ├── ivshmdds.c / / Lightweight transport library implementation, encapsulating sending logic │ ├── ivshm_hal.c / / Hardware abstraction layer, completes ivshmem address mapping and interrupt triggering. │ ├── rtps_frame.c / / Data frame construction module, packaged into a simplified RTPS format ├── include / │ ├── ivshmdds.h / / External interface declaration of the library │ ├── ivshm_hal.h / / Hardware interface declaration │ ├── rtps_frame.h / / RTPS frame structure definition ├── Makefile / / Build script, adapted for RTOS cross-compilation environment 4. DDS Communication Process To clearly demonstrate the DDS communication process between the Root Cell and Inmate Cell based on IVSHMEM, this invention abstracts the message interaction process into three stages: publish, subscribe, and recycle, as shown in the appendix. Figure 2 The details are as follows: a. Release Phase—Inmate Cell (RTOS Publisher) a.1 The application calls the libivshmdds interface to construct RTPS data frames and prepare messages to be sent.

[0047] a.2 Write the data frame to the next available slot in the shared memory ring buffer (ShmRingChannel).

[0048] a.3 Update the slot status to "Ready" to mark the data as ready for consumption.

[0049] a.4 By writing to the IVSHMEM doorbell register, an interrupt notification of the Root Cell is triggered, thus achieving event-driven communication instead of polling.

[0050] b. Subscription Phase — Root Cell (Linux Subscriber) The b.1uio_ivshmem driver captures the doorbell interrupt and notifies the user-space plugin.

[0051] b.2 The SharedMemIvshmemTransport plugin checks and reads all “ready” slots based on the read index (r_index) of the circular buffer.

[0052] b.3 Unpack the read shared memory data into a Fast-DDS serialization buffer and pass it to the DataReader interface.

[0053] b.4 Fast-DDS layer callback application, the application receives and processes messages, realizing a complete data link from shared memory to the application.

[0054] c. Message Consumption and Recycling Phase c.1 After the Root Cell consumes slot data, it updates the slot status to "consumed" and releases buffer space.

[0055] c.2 The read and write pointers of the circular buffer advance in a circular manner to maintain the continuity of the queue and achieve efficient communication with zero copy and low latency.

[0056] c.3 Continuously respond to new data from the Inmate Cell through an event-driven mechanism to ensure the determinism and real-time nature of message transmission.

[0057] 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 DDS communication method in a static partitioned virtualization environment, characterized in that, Includes the following steps: Step S1: Modify the Jailhouse source code to add a DDS communication protocol identifier to distinguish between DDS publishers and subscribers. Step S2: Create a shared memory circular buffer data structure; Step S3: Modify the Root Cell configuration file of the subscriber's side, implement the SharedMemIvshmemTransport plugin in the Root Cell of the subscriber's side, and use the uio_ivshmem driver provided by Jailhouse to map the shared memory created in step S2. Step S4: Modify the Inmate Cell configuration file of the publisher's side to enable the Inmate Cell of the publisher's side to implement the lightweight transport layer library libivshmdds and implement memory mapping logic; thereby enabling the Root Cell of the subscriber's side and the Inmate Cell of the publisher's side to have consistent mapping and access permissions to the shared memory created in step S2. Step S5: The Inmate Cell publisher writes data to shared memory through the transport layer library libivshmdds, triggering an interrupt notification from the Root Cell; the Root Cell subscriber captures the interrupt notification and reads data from shared memory.

2. The DDS communication method in a static partitioned virtualization environment as described in claim 1, characterized in that, In step S1, the DDS publisher / subscriber roles are distinguished by assigning a dedicated protocol number to the DDS protocol in Jailhouse's cell-config.h.

3. The DDS communication method in a static partitioned virtualization environment as described in claim 1, characterized in that, In step S2, the created shared memory ring buffer data structure stores the sequence number, timestamp, and Topic metadata in the message header, and maintains the read / write index, slot size, and status in the ring channel control area to achieve efficient collaboration between publishers and subscribers.

4. The DDS communication method in a static partitioned virtualization environment as described in claim 1, characterized in that, In step S3, when modifying the Root Cell configuration file of the subscriber's party, the SharedMemIvshmemTransport plugin implemented in the Root Cell of the subscriber's party also needs to be fully integrated with the Fast-DDS semantic implementation mechanism.

5. The DDS communication method in a static partitioned virtualization environment as described in claim 1, characterized in that, In step S4, when modifying the Inmate Cell configuration file of the publisher's party, the lightweight transport layer library libivshmdds implemented by the Inmate Cell of the publisher's party is implemented by encapsulating the cross-cell publishing library, which also implements doorbell interruption notification and simplified RTPS data frame construction functions.

6. The DDS communication method in a static partitioned virtualization environment as described in claim 2, characterized in that, In step S5, the Inmate Cell publisher program writes data to shared memory through the transport layer library libivshmdds, including: Step S51: The publisher program calls the libivshmdds interface to construct RTPS data frames; Step S52: Write the data frame to the next available slot in the shared memory circular buffer; Step S53: Update the status of the slot containing the written data to "ready", marking the data as ready for consumption.

7. The DDS communication method in a static partitioned virtualization environment as described in claim 6, characterized in that, In step S5, the Root Cell's subscriber program capturing the interruption notification and reading data from shared memory includes: Step S54: The uio_ivshmem driver captures the doorbell interrupt and sends a notification to the user-space plugin; Step S55: The SharedMemIvshmemTransport plugin checks and reads all "ready" slots based on the read index (r_index) of the shared memory circular buffer; Step S56: Unpack the read shared memory data into a Fast-DDS serialization cache and pass it to the reader program interface; Step S57: The Fast-DDS layer calls back the Linux user-space DDS subscription application running in the Root Cell. The DDS subscription application receives and processes messages, realizing a complete data link from shared memory to the application.

8. The DDS communication method in a static partitioned virtualization environment according to claim 3, characterized in that, Each slot stores the complete DDS message, supporting zero-copy reading and avoiding additional data copying.

9. The DDS communication method in a static partitioned virtualization environment according to claim 1, characterized in that, The transport layer library libivshmdds encapsulates IVSHMEM's shared memory ring buffer operations, doorbell interrupt triggering, and RTPS data frame construction logic, enabling low-latency data publishing across cells.