Protocol conversion system and device and storage medium

By adding a protocol conversion module between the front-end driver of the virtual machine and the virtual memory, the problem of re-implementing and updating the driver in the prior art is solved, and the efficiency of data communication is achieved and the system development and maintenance costs are reduced.

CN120075307APending Publication Date: 2025-05-30RESIDE (SHANGHAI) INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411958014.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When using shared memory to implement virtualized I/O, the original driver needs to be re-implemented, which greatly increases the workload. When the VirtIO standard is updated or the type of equipment is added, the driver needs to be manually updated and written, which increases the workload and maintenance costs of virtual machine system development.

Method used

By adding a protocol conversion module between the front-end driver of the virtual machine and the virtual memory, protocol conversion of data communication is realized, so that there is no need to reset or write drivers.

Benefits of technology

It reduces the difficulty of system development and maintenance costs, and realizes the efficiency and flexibility of data communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075307A_ABST
    Figure CN120075307A_ABST
Patent Text Reader

Abstract

The invention discloses a protocol conversion system which comprises a first virtual machine, a second virtual machine and a virtual machine manager, a second virtual machine communication driver, a protocol conversion module and a front-end driver are arranged in the second virtual machine, and an application program is installed in the second virtual machine and sends data to the front-end driver during operation. The front-end driver communicates with the protocol conversion module, the protocol conversion module sends data to the second inter-virtual-machine communication driver, the second inter-virtual-machine communication driver transmits the processed data to the virtual machine manager, and the processed data is transmitted to the first virtual machine after being processed by the virtual machine manager. The first virtual machine processes the data and then sends the data to the physical peripheral in the virtual machine manager, and the protocol conversion module is added between the front-end driver and the virtual memory of the virtual machine, so that data communication can be realized without resetting or writing a driver program, and the system development difficulty and maintenance cost are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to communication technologies in the field of virtualization, and particularly to a protocol conversion system, device, and storage medium. Background Art

[0002] VirtIO is a standardized virtualized I / O interface widely used in virtualization platforms such as KVM and QEMU. Its core purpose is to reduce virtualization overhead and improve communication efficiency between virtual machines and the host by simplifying the virtual device model.

[0003] The VirtIO driver consists of two parts: (1) The VirtIO client driver: Runs inside the virtual machine and is responsible for communicating with the VirtIO device on the host through a standard interface. The client driver interacts with the virtual device and initiates I / O requests; (2) The VirtIO backend driver: Runs on the host, usually provided by QEMU, and is responsible for implementing the functions of the virtual device and responding to requests from the virtual machine; The VirtIO driver provides an efficient virtualized I / O mechanism through technologies such as ring buffers and shared memory. The virtual machine and the host communicate through I / O queues, reducing performance bottlenecks in traditional virtualization and providing a more efficient data transmission path. However, at the same time, during the implementation using shared memory, the original driver needs to be re-implemented, greatly increasing the workload. And when the open-source standard or open-source community updates the VirtIO standard or adds device types, all driver programs need to be manually updated and rewritten, increasing the workload and maintenance cost of virtual machine system development. Summary of the Invention

[0004] To solve the above technical problems, the present invention provides a protocol conversion system, device, and storage medium.

[0005] The present invention is achieved through the following technical solutions.

[0006] A protocol conversion system provided by the present invention includes a first virtual machine, a second virtual machine, and a virtual machine manager. The second virtual machine is provided with a second inter-virtual machine communication driver, a protocol conversion module, and a front-end driver. An application program is installed in the second virtual machine and sends data to the front-end driver when running. The front-end driver communicates with the protocol conversion module, and the protocol conversion module sends the data to the second inter-virtual machine communication driver. The second inter-virtual machine communication driver passes the processed data to the virtual machine manager, which is then passed to the first virtual machine after being processed by the virtual machine manager. The first virtual machine sends the processed data to the physical peripherals in the virtual machine manager.

[0007] Further, in the first virtual machine, there are a first inter-virtual machine communication driver, a first para-virtualized peripheral backend driver, a para-virtualized peripheral backend service program, a second para-virtualized peripheral backend driver, and a virtual peripheral. The first inter-virtual machine communication driver communicates with the shared memory and sequentially passes the received information to the second para-virtualized peripheral backend driver, the para-virtualized peripheral backend service program, the first para-virtualized peripheral backend driver, and the virtual peripheral. The virtual peripheral sends the processed information to the physical peripheral in the virtual machine manager.

[0008] Further, the front-end driver and the second inter-virtual machine communication driver in the second virtual machine adopt different forms of driver programs, and the front-end driver communicates with the second inter-virtual machine communication driver through a protocol conversion module.

[0009] Further, the protocol conversion module converts between the IO requests based on inter-virtual machine communication and the IO requests based on VirtIO.

[0010] Further, both the first inter-virtual machine communication driver and the second inter-virtual machine communication driver are virtual memories.

[0011] Further, the inter-virtual machine communication module in the virtual machine manager includes mailbox, shared memory, and hypercall communication methods.

[0012] The present invention also provides a protocol conversion device, including a processor and an interface circuit. The interface circuit is used to receive signals from other devices outside the device that executes the kernel state command and transmit them to the processor, or send signals from the processor to other devices outside the device that executes the kernel state command.

[0013] The present invention also provides a computer-readable storage medium, on which a computer program is stored. The computer program, when executed by a processor, implements the system used in the present invention.

[0014] The beneficial effects of the present invention are as follows: By adding a protocol conversion module between the front-end driver of the virtual machine and the virtual memory, data communication can be achieved without re-setting or writing driver programs, reducing the system development difficulty and maintenance cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 is a schematic diagram of the module connection relationship of the present invention;

[0016] Figure 2 is a schematic diagram of the module connection relationship of an embodiment of the present invention;

[0017] Figure 3 is a schematic diagram of the protocol conversion module connection relationship of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0018] The technical solution of the present invention will be further described below, but the scope of protection claimed is not limited thereto.

[0019] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0020] Embodiment

[0021] This embodiment includes the following technical solutions. The protocol conversion system includes a first virtual machine 100, a second virtual machine 200, and a virtual machine manager 300. The first virtual machine 100 serves as a privileged virtual machine, and the second virtual machine 200 serves as a normal virtual machine. The first virtual machine 100 includes a first virtual memory 101, a second para-virtualized peripheral backend driver 102, a para-virtualized peripheral backend service program 103, a first para-virtualized peripheral backend driver 104, and a virtual peripheral 105. The second virtual machine 200 includes a second virtual memory 201, a VirtIO protocol conversion module 202, a front-end driver 203, and an application program 204. The virtual machine manager 300 includes a shared memory 301 and a physical peripheral 302.

[0022] In the second virtual machine 200, the application program 204 is custom-installed by the user in the second virtual machine 200 and is driven by a matching front-end driver 203 after installation. The front-end driver 203 has been set up when the application program 204 is installed. The VirtIO protocol conversion module 202 converts the communication protocol used by the front-end driver in this embodiment and the communication protocol used by the shared memory 301 (retrieves the IO request from the module for communication between lower-layer virtual machines, then organizes it into a VirtIO-formatted request and sends it to the upper-layer driver framework; retrieves the VirtIO-formatted IO request from the upper-layer driver framework, then organizes it into a format supported by the module for communication between lower-layer virtual machines and sends it to the module for communication between virtual machines). The shared memory 301 sends the received information to the first virtual memory 101. After the message is processed by the first virtual memory 101, the second para-virtualized peripheral backend driver 102, the para-virtualized peripheral backend service program 103, the first para-virtualized peripheral backend driver 104, and the virtual peripheral 105, it is sent to the physical peripheral 302 to complete this para-virtualized data transfer.

[0023] The above embodiment is a preferred solution for implementing the present invention. It should be noted that without departing from the concept of the present invention, any obvious replacement and minor changes are within the protection scope of the present invention.

Claims

1. A protocol conversion system, comprising a first virtual machine, a second virtual machine, and a virtual machine manager, characterized in that: The second virtual machine is provided with a second inter-virtual machine communication driver, a protocol conversion module, and a front-end driver. The application is installed in the second virtual machine and sends data to the front-end driver during operation. The front-end driver communicates with the protocol conversion module, and the protocol conversion module sends data to the second inter-virtual machine communication driver. The second inter-virtual machine communication driver passes the processed data to the virtual machine manager, which is then processed by the virtual machine manager and passed to the first virtual machine. The first virtual machine processes the data and then sends it to the physical peripheral in the virtual machine manager.

2. The protocol conversion system as claimed in claim 1, characterized in that: The first virtual machine is provided with a first inter-virtual machine communication driver, a first semi-virtualized peripheral back-end driver, a semi-virtualized peripheral back-end service program, a second semi-virtualized peripheral back-end driver, and a virtual peripheral. The first inter-virtual machine communication driver communicates with the shared memory and transmits the received information to the second semi-virtualized peripheral back-end driver, the semi-virtualized peripheral back-end service program, the first semi-virtualized peripheral back-end driver, and the virtual peripheral in sequence. The virtual peripheral sends the processed information to the physical peripheral in the virtual machine manager.

3. The protocol conversion system as claimed in claim 1, characterized in that: The front-end driver in the second virtual machine and the second inter-virtual machine communication driver respectively use driver programs in different forms, and the front-end driver and the second inter-virtual machine communication driver communicate with each other through a protocol conversion module.

4. The protocol conversion system as claimed in claim 1, characterized in that: The protocol conversion module converts between IO requests based on inter-virtual machine communication and IO requests based on VirtIO.

5. The protocol conversion system as claimed in claim 1, characterized in that: The first inter-virtual machine communication driver and the second inter-virtual machine communication driver are both virtual memories.

6. The protocol conversion system as claimed in claim 1, characterized in that: The inter-VM communication module in the virtual machine manager includes mailbox, shared memory and hypercall communication methods.

7. A protocol conversion device, characterized in that: It includes a processor and an interface circuit, wherein the interface circuit is used to receive signals from other devices other than the device that executes kernel mode commands and transmit them to the processor or send signals from the processor to other devices other than the device that executes kernel mode commands.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the system according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • VirtIO device driving architecture and IO processing method and device

    CN121349599A