An automatic renegotiation method and system based on VFIO-User protocol

By introducing an automatic renegotiation mechanism into the VFIO-User protocol, the lack of reliability and business continuity of the VFIO-User protocol is solved, and the high reliability and business continuity of cloud hosts are achieved, and continuous hot upgrades are supported.

CN117873778BActive Publication Date: 2024-12-10CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311729135.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-15
Publication Date
2024-12-10
Estimated Expiration
2043-12-15

AI Technical Summary

Technical Problem

The VFIO-User protocol has shortcomings in terms of reliability and business continuity, especially intermittent server failures cause unix socket connections to be disconnected, resulting in cloud host business interruption, and all connections to the client side need to be disconnected during server program upgrade affecting the business. Continuity.

Method used

A method and system for automatic renegotiation based on VFIO-User protocol is proposed. A new VFIO-User disk is mounted through a QEMU virtual machine to initialize the device, and renegotiation is initiated with the SPDK unix socket when the SPDK process is restarted abnormally and re-registered. Data and reset device status to realize timely reconstruction of unix socket connections and device status recovery.

Benefits of technology

It realizes timely reconstruction of unix socket connections, assists in the recovery of device status, improves the reliability and business continuity of cloud hosts, and supports cloud hosts to continuously upgrade VFIO-User server programs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117873778B_ABST
    Figure CN117873778B_ABST
Patent Text Reader

Abstract

The present invention relates to an automatic renegotiation method and system based on the VFIO-User protocol, belonging to the field of virtualization technology, the method comprising: responding to a user mounting a new VFIO-User disk to a QEMU virtual machine; initializing a device through the QEMU virtual machine; logging into the QEMU virtual machine, and continuously reading and writing the VFIO-User disk; abnormal restart of the SPDK process; initiating renegotiation to the SPDK unix socket through the QEMU virtual machine; SPDK VFIO-User disk status recovery, virtual machine IO recovery. Timely reconstruction of the unix socket connection can be achieved, device status recovery is assisted, reliability is improved, and business continuity is guaranteed, thereby solving the cloud host business interruption caused by intermittent failures of the VFIO-User server, improving the reliability of the cloud host, and supporting the cloud host to hot upgrade the VFIO-User server program without stopping business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of virtualization, and in particular relates to an automatic renegotiation method and system based on a VFIO-User protocol. Background Art

[0002] Cloud hosts usually use VFIO device passthrough to improve IO performance. VFIO uses VT-d / AMD-Vi hardware technology to implement DMA redirection and interrupt redirection, so that user-mode processes can access hardware safely and efficiently, achieving IO performance close to direct access to physical devices. The two ends of the VFIO protocol are user-mode programs and kernels, which interact through ioctl command words to achieve hardware PCI device passthrough to user-mode programs, such as QEMU or OVS. The VFIO-User protocol is an extension of the VFIO protocol. It continues the idea of ​​full user-mode virtual IO. Both ends are in user mode, namely VFIO-Userserver and VFIO-User client, and the two are separate processes. The server simulates PCIe devices in user mode, and the semantic logic of its simulated devices is similar to the implementation of the kernel VFIO-PCI module; the client and server are connected through unix sockets. After the connection is established, the PCIe device simulated by the server is passed directly to the client program through the VFIO-User protocol, and the client program then passes the device directly to the cloud host.

[0003] The VFIO-User protocol has stronger scalability and higher IO performance, but it has shortcomings in terms of reliability and business continuity, including: (1) intermittent failures on the server side cause the Unix socket connection to be disconnected, and the cloud host business will be reset to zero. Even if the server side quickly returns to normal, the connection is disconnected, which will eventually cause the cloud host business to be interrupted; (2) when the server program needs to be upgraded, it is necessary to disconnect all connections with the client side. After the upgrade is completed and the server process is restored, the VFIO-User device must be re-mounted to the client and the business can be restored, affecting the cloud host business continuity. Summary of the invention

[0004] In view of the above deficiencies in the prior art, an object of the present invention is to provide an automatic re-negotiation method and system based on the VFIO-User protocol.

[0005] In a first aspect of the present invention, an automatic renegotiation method based on the VFIO-User protocol is proposed, comprising:

[0006] S1, responds to the user mounting a new VFIO-User disk to the QEMU virtual machine;

[0007] S2, initializing the device through the QEMU virtual machine;

[0008] S3, log in to the QEMU virtual machine, and continuously read and write the VFIO-User disk;

[0009] S4, the SPDK process restarts abnormally;

[0010] S5, initiating re-negotiation to the SPDK unix socket through the QEMU virtual machine;

[0011] S6, SPDK VFIO-User disk status is restored, and virtual machine IO is restored.

[0012] Furthermore, S1 responds to the user mounting a new VFIO-User disk to the QEMU virtual machine. Specifically, the user uses the SPDK unix socket to mount the new VFIO-User disk to the QEMU virtual machine.

[0013] Furthermore, in S2, the device is initialized through the QEMU virtual machine, and for the new connection, the connection status is monitored through the event fd, and the registration data to the SPDK is saved, the SPDK is informed that the connection is a new connection, and the SPDK is notified to reset the device status.

[0014] Furthermore, for the new connection, monitoring the connection status through event fd, saving the registration data to SPDK, informing SPDK that the connection is a new connection, and notifying SPDK to reset the device status specifically include the following steps:

[0015] S201, establish a connection with the SPDK unix socket;

[0016] S202, create an event fd listening connection;

[0017] S203, register the virtual machine memory with SPDK;

[0018] S204, saving memory registration data;

[0019] S205, create irq and register with SPDK;

[0020] S206, save irq registration data;

[0021] S207, send VFIO_USER_DEVICE_NEW to SPDK;

[0022] S208, send VFIO_USER_DEVICE_RESET to SPDK.

[0023] Furthermore, in S3, logging into the QEMU virtual machine and continuously reading and writing the VFIO-User disk specifically includes the following steps:

[0024] S301, log in to the QEMU virtual machine;

[0025] S302, continuously reading and writing the NVMe disk corresponding to the VFIO-User disk.

[0026] Furthermore, in S5, the QEMU virtual machine initiates re-negotiation to the SPDK unix socket. After the QEMU virtual machine successfully reconnects within the timeout period, it re-registers the saved data with the SPDK, informs the SPDK that the connection is a multiplexed connection, and notifies the SPDK to reset the device status.

[0027] Further, after the QEMU virtual machine successfully reconnects within the timeout period, it re-registers the saved data with SPDK, notifies SPDK that the connection is a multiplexed connection, and notifies SPDK to reset the device state. Specifically, the following steps are included:

[0028] S501, reconnect the SPDK unix socket and determine whether it is successful;

[0029] S502, if unsuccessful, determine whether the timeout period has been reached, and if the timeout period has not been reached, reconnect the SPDK unix socket at an interval of 2 seconds;

[0030] S503, upon success, re-registering the saved memory data with SPDK;

[0031] S504, re-register the saved interrupt data with SPDK;

[0032] S505, send VFIO_USER_DEVICE_REUSE to SPDK;

[0033] S506, send VFIO_USER_DEVICE_RESET to SPDK.

[0034] In a second aspect of the present invention, an automatic renegotiation system based on the VFIO-User protocol is proposed, the system comprising a disk mounting module, a device initialization module, a disk continuous reading and writing module, a process abnormal restart module, a renegotiation initiation module and a recovery processing module, wherein:

[0035] The disk mounting module is used to respond to the user mounting a new VFIO-User disk to the QEMU virtual machine;

[0036] A device initialization module, used to perform device initialization through the QEMU virtual machine;

[0037] A disk continuous read and write module, used to log into the QEMU virtual machine and continuously read and write the VFIO-User disk;

[0038] The process abnormal restart module is used to restart the SPDK process abnormally;

[0039] A renegotiation initiation module, used to initiate renegotiation to the SPDK unix socket through the QEMU virtual machine;

[0040] The recovery processing module is used for SPDK VFIO-User disk status recovery and virtual machine IO recovery.

[0041] Furthermore, the device initialization module specifically includes:

[0042] Connection establishment unit, used to establish a connection with the SPDK unix socket;

[0043] The monitor creation unit is used to create an event fd monitor connection;

[0044] The virtual machine memory registration unit is used to register the virtual machine memory with SPDK;

[0045] A first data storage unit, used for storing memory registration data;

[0046] Create an irq unit to create irq and register it with SPDK;

[0047] A second data storage unit, used for storing irq registration data;

[0048] A first sending unit, configured to send VFIO_USER_DEVICE_NEW to SPDK;

[0049] The second sending unit is used to send VFIO_USER_DEVICE_RESET to SPDK.

[0050] Furthermore, the renegotiation initiating module specifically includes:

[0051] The reconnection unit is used to reconnect the SPDK unix socket and determine whether it is successful;

[0052] The unsuccessful processing unit is used to determine whether the timeout period has been reached when the connection fails, and to reconnect the SPDK unix socket at an interval of 2 seconds if the timeout period has not been reached.

[0053] A third data storage unit is used to re-register the saved memory data with the SPDK upon success;

[0054] A fourth data storage unit, used for re-registering the saved interrupt data with the SPDK;

[0055] The third sending unit is used to send VFIO_USER_DEVICE_REUSE to SPDK;

[0056] The fourth sending unit is configured to send VFIO_USER_DEVICE_RESET to the SPDK.

[0057] The beneficial effects of the present invention are as follows:

[0058] The present invention mounts a new VFIO-User disk to a QEMU virtual machine in response to a user; initializes the device through the QEMU virtual machine; logs into the QEMU virtual machine, and continuously reads and writes the VFIO-User disk; abnormally restarts the SPDK process; initiates renegotiation to the SPDK unix socket through the QEMU virtual machine; the SPDK VFIO-User disk status is restored, and the virtual machine IO is restored. It can achieve timely reconstruction of the unix socket connection, assist in the recovery of the device status, improve reliability and ensure business continuity, thereby solving the cloud host business interruption caused by intermittent failures of the VFIO-User server, improving the reliability of the cloud host, and supporting the cloud host to hot-upgrade the VFIO-User server program without stopping business. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.

[0060] Figure 1 A schematic diagram of a flow chart of an automatic renegotiation method based on the VFIO-User protocol according to an embodiment of the present invention;

[0061] Figure 2 A schematic diagram of a process of a QEMU virtual machine accessing an SPDK unix socket to perform device initialization according to an embodiment of the present invention;

[0062] Figure 3 A schematic diagram of a process in which a QEMU virtual machine initiates re-negotiation to an SPDK unix socket to perform device recovery according to an embodiment of the present invention;

[0063] Figure 4 The figure is a flowchart of VFIO-User client processing according to an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.

[0065] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.

[0066] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0067] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.

[0068] The present invention proposes an automatic renegotiation method and system based on the VFIO-User protocol to solve the following problems in the prior art: (1) intermittent failures on the server side cause the disconnection of the Unix socket connection, and the cloud host service is reset to zero. Even if the server side quickly recovers to normal, the cloud host service will eventually be interrupted because the connection has been disconnected; (2) when the server program needs to upgrade its version, it is necessary to disconnect all connections with the client side. After the upgrade is completed and the server process is restored, the VFIO-User device is remounted to the client and the service is restored, which affects the continuity of the cloud host service.

[0069] Method Embodiment

[0070] Figure 1 The present invention is a flowchart of an automatic renegotiation method based on the VFIO-User protocol according to an embodiment of the present invention.

[0071] Specifically, the present invention provides an automatic renegotiation method based on the VFIO-User protocol, comprising:

[0072] S1, responds to the user mounting a new VFIO-User disk to the QEMU virtual machine.

[0073] In the embodiment of the present invention, in response to the user using the SPDK unix socket, a new VFIO-User disk is mounted to the QEMU virtual machine.

[0074] S2, initializing the device through the QEMU virtual machine.

[0075] In the embodiment of the present invention, the device is initialized through the QEMU virtual machine, and for the new connection, the connection status is monitored through the event fd, and the registration data to the SPDK is saved, the SPDK is informed that the connection is a new connection, and the SPDK is notified to reset the device status. Figure 2 The present invention is a flowchart of a QEMU virtual machine accessing an SPDK unix socket to initialize a device according to an embodiment of the present invention, specifically: establishing a connection with an SPDK unix socket; creating an event fd listening connection; registering the virtual machine memory with SPDK; saving the memory registration data; creating an irq and registering it with SPDK; saving the irq registration data; sending VFIO_USER_DEVICE_NEW to SPDK; and sending VFIO_USER_DEVICE_RESET to SPDK.

[0076] S3, log in to the QEMU virtual machine, and continue to read and write the VFIO-User disk.

[0077] In the embodiment of the present invention, by logging into the QEMU virtual machine, the NVMe disk corresponding to the VFIO-User disk is continuously read and written.

[0078] S4, the SPDK process restarts abnormally.

[0079] S5, initiating re-negotiation to the SPDK unix socket through the QEMU virtual machine.

[0080] In the embodiment of the present invention, a re-negotiation is initiated to the SPDK unix socket through the QEMU virtual machine. After the QEMU virtual machine successfully reconnects within the timeout period, it re-registers the saved data with the SPDK, informs the SPDK that the connection is a multiplexed connection, and notifies the SPDK to reset the device status. Figure 3 The present invention is a flowchart of a QEMU virtual machine initiating re-negotiation to an SPDK unix socket for device recovery according to an embodiment of the present invention, specifically: reconnecting the SPDK unix socket and determining whether it is successful; if unsuccessful, determining whether a timeout period has been reached, and if the timeout period has not been reached, reconnecting the SPDK unix socket at an interval of 2 seconds; if successful, re-registering the saved memory data with the SPDK; re-registering the saved interrupt data with the SPDK; sending VFIO_USER_DEVICE_REUSE to the SPDK; and sending VFIO_USER_DEVICE_RESET to the SPDK.

[0081] It can be understood that for each new VFIO-User unix socket connection, when the client registers the interrupt fd and memory with the server, it backs up the registered data to the data structure corresponding to the connection. At the same time, the client creates a separate event fd to monitor the connection status. When the connection is disconnected, the client creates a separate reconnection thread for each disconnected connection, periodically initiates a connection request, performs version negotiation after the reconnection is successful, and registers the backed-up interrupt fd and memory data with the server again. After registration, execute the VFIO_USER_DEVICE_REUSE command to notify the server to reuse the backup data to restore the original running state. Finally, the client executes VFIO_USER_DEVICE_RESET to notify the server to reset the device status. From then on, the reconnection is successful and IO can continue to be issued, such as Figure 4 The figure is a flowchart of the VFIO-User client processing of an embodiment of the present invention, specifically: (1) saving the memory and interrupt data registered for the new connection to data; (2) starting eventfd to monitor the connection status; (3) reestablishing the connection; (4) the client re-registering the data saved in data.

[0082] S6, SPDK VFIO-User disk status is restored, and virtual machine IO is restored.

[0083] System Example

[0084] Another specific embodiment of the present invention discloses an automatic renegotiation system based on the VFIO-User protocol, comprising:

[0085] The disk mounting module is used to respond to the user to mount a new VFIO-User disk to the QEMU virtual machine.

[0086] In the embodiment of the present invention, the disk mounting module mounts a new VFIO-User disk to the QEMU virtual machine in response to the user using the SPDK unix socket.

[0087] The device initialization module is used to perform device initialization through the QEMU virtual machine.

[0088] In the embodiment of the present invention, the device initialization module performs device initialization through the QEMU virtual machine, monitors the connection status through the event fd for the new connection, saves the registration data to the SPDK, informs the SPDK that the connection is a new connection, and notifies the SPDK to reset the device status. Figure 2 The present invention is a flowchart of a QEMU virtual machine accessing an SPDK unix socket to initialize a device according to an embodiment of the present invention, specifically: establishing a connection with an SPDK unix socket; creating an event fd listening connection; registering the virtual machine memory with SPDK; saving the memory registration data; creating an irq and registering it with SPDK; saving the irq registration data; sending VFIO_USER_DEVICE_NEW to SPDK; and sending VFIO_USER_DEVICE_RESET to SPDK.

[0089] The disk continuous reading and writing module is used to log in to the QEMU virtual machine and continuously read and write the VFIO-User disk.

[0090] In the embodiment of the present invention, the disk continuous reading and writing module logs into the QEMU virtual machine, and then continuously reads and writes the NVMe disk corresponding to the VFIO-User disk.

[0091] The process abnormal restart module is used to restart the SPDK process abnormally.

[0092] The renegotiation initiation module is used to initiate renegotiation to the SPDK unix socket through the QEMU virtual machine.

[0093] In the embodiment of the present invention, the renegotiation initiation module initiates renegotiation to the SPDK unix socket through the QEMU virtual machine. After the QEMU virtual machine successfully reconnects within the timeout period, it re-registers the saved data with the SPDK, informs the SPDK that the connection is a multiplexed connection, and notifies the SPDK to reset the device status. Figure 3 The present invention is a flowchart of a QEMU virtual machine initiating re-negotiation to the SPDK unix socket for device recovery according to an embodiment of the present invention, specifically: reconnecting the SPDK unix socket and determining whether it is successful; if unsuccessful, determining whether the timeout period has been reached, and if the timeout period has not been reached, reconnecting the SPDK unix socket at an interval of 2 seconds; if successful, re-registering the saved memory data with the SPDK; re-registering the saved interrupt data with the SPDK; sending VFIO_USER_DEVICE_REUSE to the SPDK; and sending VFIO_USER_DEVICE_RESET to the SPDK.

[0094] The recovery processing module is used for SPDK VFIO-User disk status recovery and virtual machine IO recovery.

[0095] Specifically, the device initialization module includes:

[0096] Connection establishment unit, used to establish a connection with the SPDK unix socket;

[0097] The monitor creation unit is used to create an event fd monitor connection;

[0098] The virtual machine memory registration unit is used to register the virtual machine memory with SPDK;

[0099] A first data storage unit, used for storing memory registration data;

[0100] Create an irq unit to create irq and register it with SPDK;

[0101] A second data storage unit, used for storing irq registration data;

[0102] A first sending unit, configured to send VFIO_USER_DEVICE_NEW to SPDK;

[0103] The second sending unit is used to send VFIO_USER_DEVICE_RESET to SPDK.

[0104] Specifically, the renegotiation initiation module includes:

[0105] The reconnection unit is used to reconnect the SPDK unix socket and determine whether it is successful;

[0106] The unsuccessful processing unit is used to determine whether the timeout period has been reached when the connection fails, and to reconnect the SPDK unix socket at an interval of 2 seconds if the timeout period has not been reached.

[0107] A third data storage unit is used to re-register the saved memory data with the SPDK upon success;

[0108] A fourth data storage unit, used for re-registering the saved interrupt data with the SPDK;

[0109] The third sending unit is used to send VFIO_USER_DEVICE_REUSE to SPDK;

[0110] The fourth sending unit is configured to send VFIO_USER_DEVICE_RESET to the SPDK.

[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.

Claims

1. An automatic renegotiation method based on the VFIO-User protocol, characterized in that: include: S1, responds to the user to mount a new VFIO-User disk to the QEMU virtual machine; responds to the user to use the SPDK unix socket to mount a new VFIO-User disk to the QEMU virtual machine; S2, initialize the device through the QEMU virtual machine; initialize the device through the QEMU virtual machine, monitor the connection status through event fd for the new connection, save the registration data to SPDK, inform SPDK that the connection is a new connection, and notify SPDK to reset the device status, specifically: establish a connection with the SPDK unix socket; create an event fd to monitor the connection; register the virtual machine memory with SPDK; save the memory registration data; create irq and register it with SPDK; save the irq registration data; send VFIO_USER_DEVICE_NEW to SPDK; send VFIO_USER_DEVICE_RESET to SPDK; S3, log in to the QEMU virtual machine, and then continue to read and write the NVMe disk corresponding to the VFIO-User disk; S4, the SPDK process restarts abnormally; S5, initiating re-negotiation to the SPDK unix socket through the QEMU virtual machine; S6, SPDK VFIO-User disk status is restored, and virtual machine IO is restored.

2. The automatic renegotiation method based on the VFIO-User protocol according to claim 1, characterized in that: In S1, the user is responded to mount a new VFIO-User disk to the QEMU virtual machine. Specifically, the user uses the SPDK unix socket to mount a new VFIO-User disk to the QEMU virtual machine.

3. The automatic renegotiation method based on the VFIO-User protocol according to claim 1, characterized in that: In S2, the device is initialized through the QEMU virtual machine, and for the new connection, the connection status is monitored through the event fd, and the registration data to the SPDK is saved, the SPDK is informed that the connection is a new connection, and the SPDK is notified to reset the device status.

4. The automatic renegotiation method based on the VFIO-User protocol according to claim 3, characterized in that: For the new connection, the connection status is monitored through the event fd, and the registration data to the SPDK is saved, the SPDK is informed that the connection is a new connection, and the SPDK is notified to reset the device status. Specifically, the following steps are included: S201, establish a connection with the SPDK unix socket; S202, create an event fd listening connection; S203, register the virtual machine memory with SPDK; S204, saving memory registration data; S205, create irq and register with SPDK; S206, save irq registration data; S207, send VFIO_USER_DEVICE_NEW to SPDK; S208, send VFIO_USER_DEVICE_RESET to SPDK.

5. The automatic renegotiation method based on the VFIO-User protocol according to claim 1, characterized in that: In S3, the QEMU virtual machine is logged in, and the continuous reading and writing of the VFIO-User disk specifically includes the following steps: S301, log in to the QEMU virtual machine; S302, continuously reading and writing the NVMe disk corresponding to the VFIO-User disk.

6. The automatic renegotiation method based on the VFIO-User protocol according to claim 1, characterized in that: In S5, the QEMU virtual machine initiates re-negotiation to the SPDK unix socket. After the QEMU virtual machine successfully reconnects within the timeout period, it re-registers the saved data with the SPDK, informs the SPDK that the connection is a multiplexed connection, and notifies the SPDK to reset the device status.

7. The automatic renegotiation method based on the VFIO-User protocol according to claim 6, characterized in that: After the QEMU virtual machine successfully reconnects within the timeout period, it re-registers the saved data with SPDK, informs SPDK that the connection is a multiplexed connection, and notifies SPDK to reset the device state. Specifically, the following steps are included: S501, reconnect the SPDK unix socket and determine whether it is successful; S502, if unsuccessful, determine whether the timeout period has been reached, and if the timeout period has not been reached, reconnect the SPDK unix socket at an interval of 2 seconds; S503, upon success, re-registering the saved memory data with SPDK; S504, re-register the saved interrupt data with SPDK; S505, send VFIO_USER_DEVICE_REUSE to SPDK; S506, send VFIO_USER_DEVICE_RESET to SPDK.

8. An automatic renegotiation system based on the VFIO-User protocol, characterized in that: The system includes a disk mounting module, a device initialization module, a disk continuous reading and writing module, a process abnormal restart module, a renegotiation initiation module and a recovery processing module, wherein: The disk mounting module is used to respond to the user to mount a new VFIO-User disk to the QEMU virtual machine; the disk mounting module responds to the user to use the SPDK unix socket to mount the new VFIO-User disk to the QEMU virtual machine; The device initialization module is used to initialize the device through the QEMU virtual machine; the device initialization module initializes the device through the QEMU virtual machine, monitors the connection status through event fd for the new connection, saves the registration data to SPDK, informs SPDK that the connection is a new connection, and notifies SPDK to reset the device status, specifically: establishes a connection with the SPDK unix socket; creates an event fd to monitor the connection; registers the virtual machine memory with SPDK; saves the memory registration data; creates irq and registers it with SPDK; saves the irq registration data; sends VFIO_USER_DEVICE_NEW to SPDK; sends VFIO_USER_DEVICE_RESET to SPDK; The disk continuous read and write module logs in to the QEMU virtual machine and then continuously reads and writes the NVMe disk corresponding to the VFIO-User disk; The process abnormal restart module is used to restart the SPDK process abnormally; A renegotiation initiation module, used to initiate renegotiation to the SPDK unix socket through the QEMU virtual machine; The recovery processing module is used for SPDK VFIO-User disk status recovery and virtual machine IO recovery.

9. The automatic renegotiation system based on the VFIO-User protocol according to claim 8, characterized in that: The device initialization module specifically includes: Connection establishment unit, used to establish a connection with the SPDK unix socket; The monitor creation unit is used to create an event fd monitor connection; The virtual machine memory registration unit is used to register the virtual machine memory with SPDK; A first data storage unit, used for storing memory registration data; Create an irq unit to create irq and register it with SPDK; A second data storage unit, used for storing irq registration data; A first sending unit, configured to send VFIO_USER_DEVICE_NEW to SPDK; The second sending unit is used to send VFIO_USER_DEVICE_RESET to SPDK.

10. The automatic renegotiation system based on the VFIO-User protocol according to claim 8, characterized in that: The re-negotiation initiating module specifically includes: The reconnection unit is used to reconnect the SPDK unix socket and determine whether it is successful; The unsuccessful processing unit is used to determine whether the timeout period has been reached when the connection fails, and to reconnect the SPDK unix socket at an interval of 2 seconds if the timeout period has not been reached. A third data storage unit is used to re-register the saved memory data with the SPDK upon success; A fourth data storage unit, used for re-registering the saved interrupt data with the SPDK; The third sending unit is used to send VFIO_USER_DEVICE_REUSE to SPDK; The fourth sending unit is configured to send VFIO_USER_DEVICE_RESET to the SPDK.