Computing system, virtual instance protection method, unloading card, host and storage medium

By setting the target unit on the programmable hardware module of the uninstall card, intercepting the access request of the virtual instance to the pass-through device and handling exception responses, the problem that the virtual machine may consume wrong data is solved, and the secure exit and operation stability of the virtual machine is achieved.

CN119718730AActive Publication Date: 2025-03-28HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202311272280.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2025-03-28
Estimated Expiration
2043-09-27

AI Technical Summary

Technical Problem

In device pass-through technology, the virtual machine has no perception of the abnormality of the pass-through device, which causes the virtual machine to consume wrong data, which in turn causes internal logic errors.

Method used

Set the target unit on the programmable hardware module of the uninstall card, intercept the non-forwarding access request of the virtual instance to the target pass-through device, and generate a response packet with the invalid flag bit of the data when the pass-through device is abnormal, and return it to the virtual instance, thereby triggering the virtual instance exit operation.

Benefits of technology

By intercepting and processing exception response packets, preventing the virtual instance from consuming incorrect data, avoiding the occurrence of logical errors within the virtual machine, and stopping the virtual instance from running in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718730A_ABST
    Figure CN119718730A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a computing system, a virtual instance protection method, an unloading card, a host and a storage medium. In the embodiment of the invention, the target unit is arranged on the programmable hardware module of the unload card. According to the embodiment of the invention, the target unit can intercept the non-forwarding transactional access request of the virtual instance to the target direct connection equipment under the condition that the target direct connection equipment is abnormal, and return the response data packet for the access request, so that the abnormal isolation of the direct connection equipment is realized. Wherein a data valid flag bit of the response data packet is set as an invalid identifier, the virtual instance can identify that the response data packet is a polluted packet based on the invalid identifier so as to trigger a virtual instance exit operation, and the host can stop running of the virtual instance in time when detecting that the virtual instance exits, so that the virtual instance can be prevented from consuming wrong data, and the efficiency of the virtual instance is improved. And thus, internal logic errors of the virtual instances can be prevented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a computing system, a virtual instance protection method, an uninstall card, a host, and a storage medium. Background Art

[0002] In the computer field, device pass-through technology allows physical devices (such as network adapters, disk controllers, graphics cards, etc.) to be directly assigned to virtual machines, allowing virtual machines to directly access and control the devices without going through the virtualization layer. This pass-through method can provide lower latency and higher performance. Among them, the physical devices that can be directly accessed by the virtual machine are pass-through devices.

[0003] In the traditional solution, when an exception occurs in a pass-through device, the virtual machine is unaware of the exception. Therefore, when the virtual machine accesses the pass-through device, the virtual machine may obtain and consume erroneous data, which may lead to internal logic errors in the virtual machine. Summary of the invention

[0004] Multiple aspects of the present application provide a computing system, a virtual instance protection method, an offload card, a host, and a storage medium to prevent a virtual instance from consuming erroneous data, thereby helping to prevent internal logic errors in a virtual machine.

[0005] In a first aspect, an embodiment of the present application provides a computing system, comprising: a host and an offload card; the host and the offload card are communicatively connected; the offload card comprises: a communicatively connected programmable hardware module and at least one pass-through device; the programmable hardware module is provided with a target unit; the host is deployed with at least one virtual instance;

[0006] Any virtual instance of the at least one virtual instance is used to initiate a non-forwarding access request to a target pass-through device of the at least one pass-through device;

[0007] The target unit is configured to receive the access request; generate a first response data packet with a data valid flag bit as an invalid flag for the access request when the target pass-through device is abnormal; and return the first response data packet to any virtual instance;

[0008] Any of the virtual instances, when detecting that the data valid flag bit of the first response data packet is an invalid flag, executes a virtual instance exit operation;

[0009] The host is used to stop the operation of a target virtual instance in the at least one virtual instance when detecting that any one of the virtual instances has exited; the target virtual instance includes any one of the virtual instances.

[0010] In a second aspect, an embodiment of the present application further provides a virtual instance protection method, which is applicable to an offload card; the offload card comprises: a programmable hardware module and at least one pass-through device connected in communication; the offload card is in communication with a host; the host is deployed with at least one virtual instance; the method comprises:

[0011] receiving, by the programmable hardware module, an access request of a non-forwarded transaction type sent by any virtual instance of the at least one virtual instance; the access request is used to access a target pass-through device of the at least one pass-through device;

[0012] In the case where the target pass-through device is abnormal, generating a first response data packet with a data valid flag bit as an invalid flag for the access request;

[0013] Returning the first response data packet to any one of the virtual instances, so that any one of the virtual instances can execute a virtual instance exit operation when the valid flag bit of the first response data packet is an invalid flag;

[0014] The exit of any virtual instance triggers the host to stop the operation of a target virtual instance in the at least one virtual instance; the target virtual instance includes any virtual instance.

[0015] In a third aspect, an embodiment of the present application further provides a virtual instance protection method, which is applicable to a host; the host is communicatively connected to the offload card; the offload card comprises: a communicatively connected programmable hardware module and at least one pass-through device; the host is deployed with at least one virtual instance; the method comprises:

[0016] Initiate a non-forwarding transaction type access request to a target pass-through device in the at least one pass-through device through any one of the at least one virtual instance; wherein the programmable hardware module receives the access request; and in the case where the target pass-through device is abnormal, return a first response data packet with a data valid flag bit as an invalid flag for the access request;

[0017] Acquire the first response data packet returned by the programmable hardware module through any virtual instance;

[0018] When the valid flag bit of the first response data packet is an invalid flag, performing a virtual instance exit operation on any virtual instance through any virtual instance;

[0019] And, in the case that any of the virtual instances exits, the operation of a target virtual instance in the at least one virtual instance is stopped; the target virtual instance includes any of the virtual instances.

[0020] In a fourth aspect, an embodiment of the present application further provides an offload card, comprising: a communicatively connected programmable hardware module and at least one pass-through device; when the offload card is communicatively connected to a host, it is used to execute the steps in the virtual instance protection method provided in the above-mentioned second aspect; wherein, the host is deployed with at least one virtual instance.

[0021] In a fifth aspect, an embodiment of the present application further provides a host, comprising: a memory and a processor; wherein the memory is used to store a computer program; using the memory and the processor, at least one virtual instance is deployed on the host;

[0022] Wherein, when the host is connected to the offload card, the processor is coupled to the memory to execute the computer program to execute the steps in the virtual instance protection method provided in the third aspect above;

[0023] The offload card includes: a programmable hardware module in communication connection and at least one pass-through device.

[0024] In the fifth aspect, an embodiment of the present application also provides a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, causes the one or more processors to execute the steps in the virtual instance protection method provided in the second aspect and / or the third aspect above.

[0025] In an embodiment of the present application, a target unit is set on the programmable hardware module of the unloading card. The target unit can intercept the non-forwarded access request of the virtual instance to the target pass-through device when the target pass-through device is abnormal, and return a response data packet for the access request, thereby realizing abnormal isolation of the pass-through device. Among them, the data valid flag of the response data packet is set to an invalid flag, and the virtual instance can identify the response data packet as a polluted packet based on the invalid flag, thereby triggering the virtual instance exit operation. The host can stop the virtual instance operation in time when detecting the virtual instance exit, which can prevent the virtual instance from consuming erroneous data, thereby helping to prevent the virtual instance from internal logic errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0027] Figure 1 A schematic diagram of the structure of the computing system provided for the traditional solution;

[0028] Figure 2 and Figure 3 A schematic diagram of the structure of a computing system provided in an embodiment of the present application;

[0029] Figure 4-Figure 6 A flowchart of a virtual instance protection method provided in an embodiment of the present application;

[0030] Figure 7 A schematic diagram of the structure of an uninstall card provided in an embodiment of the present application;

[0031] Figure 8 A schematic diagram of the structure of the host provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0033] In a computer architecture where computing, control, and network functions are separated, such as Figure 1 As shown, the computing system generally includes: a host 10 and an offload card 20. The host 10 and the offload card 20 are connected to each other through a Peripheral Component Interconnect Express (PCIe) bus. A root complex (RC) 101 of the PCIe bus is provided on the host 10. The offload card 20 can be inserted into the host 10 through a PCIe interface.

[0034] In the separated computer system, the host 10 is mainly used to realize the computing function, and the offload card 20 is used to realize the management and network functions. The host 10 refers to any computer device with computing, storage and communication functions, such as a server, a computer, a workstation, etc. One or more virtual machines (VMs) 102 can be deployed on the host 10 to provide computing resources.

[0035] The offload card 20 includes: a processing module 201, a Field Programmable Gate Array (FPGA) 202, and a PCIe device 203 connected to the FPGA in communication. The PCIe device 203 may be a network card or a storage medium.

[0036] exist Figure 1In the computing system shown, the backend device of the computing system (i.e., PCIe device 203) is managed by a specific processing module 201. Data is forwarded between the processing module 201 and the host 10 through the FPGA 202. The host 10 is responsible for virtualization and is deployed with one or more virtual machines 102. The virtual machine 102 completes read and write access to the PCIe device 203 through the RC 101 of the host 10. Through the device pass-through technology, it refers to a use method in which the physical device (such as PCIe device 203) on the host 10 is directly presented to the virtual machine, and the virtual machine can directly access the resources of the PCIe device 203. Using the device pass-through method allows the virtual machine to obtain good input / output (IO) performance. When the system software of the processing module 201 is abnormal or the PCIe device 203 is abnormal, the virtual machine 102 accesses the PCIe device 203 that the virtual machine 102 passes through. Due to the abnormality of the system software of the processing module 201 or the abnormality of the PCIe device 203, the PCIe device 203 will be unable to respond to the access request. Therefore, the RC 101 in the host 10 will not be able to receive the completion message, causing the timer in the RC101 to time out, triggering the completion timeout (Completion timeout) abnormality. After waiting for the timeout, the main RC 101 returns a transport layer data packet (Transaction Layer Packet, TLP) of all 1s to the virtual machine. After waiting for the timeout, the virtual machine will consume the all-1 data and continue to execute the subsequent logic because it cannot determine whether the all-1 TLP is correct, which undoubtedly causes the virtual machine 102 to consume wrong data, and the correctness of the logic subsequently executed by the virtual machine cannot be guaranteed.

[0037] In view of the above technical problems, in some embodiments of the present application, a target unit is set on the programmable hardware module of the unloading card. When the target pass-through device is abnormal, the target unit can intercept the non-forwarded access request of the virtual instance to the target pass-through device, and return a response data packet for the access request, thereby realizing abnormal isolation of the pass-through device. Among them, the data valid flag bit of the response data packet is set to an invalid flag, and the virtual instance can identify the response data packet as a contaminated packet based on the invalid flag, thereby triggering the virtual instance exit operation. The host can stop the virtual instance operation in time when detecting the virtual instance exit, which can prevent the virtual instance from consuming erroneous data, thereby helping to prevent the virtual instance from internal logic errors.

[0038] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0039] It should be noted that the same reference numerals denote the same objects in the following drawings and embodiments, and therefore, once an object is defined in one drawing or embodiment, it does not need to be further discussed in the subsequent drawings and embodiments.

[0040] Figure 2 This is a schematic diagram of the structure of the computing system provided in the embodiment of the present application. Figure 2 As shown, the computing system may include: a host 21 and an offload card 22. Among them, the host 21 is mainly used to provide computing functions, and one or more virtual instances 211 can be deployed. Multiple refers to 2 or more. Virtual instance 211 refers to multiple virtual servers deployed on a host using virtual machine technology, which can provide different computing services. Virtual instance 211 can be a virtual machine (Virtual Machine, VM), a container or a container group (such as Pod, etc.). Virtual instance 211 can also be called a client (Guest). The host operating system is responsible for allocating hardware resources among multiple virtual instances 211, so that multiple virtual instances 211 are independent of each other.

[0041] The host 21 may include: a general processing unit and a memory, etc. ( Figure 2 (not shown in the figure). In this embodiment, the number of general processing units is not limited. The general processing unit may be at least one, that is, one or more; each general processing unit may be a single-core processing unit or a multi-core processing unit.

[0042] In this embodiment, the general processing unit is generally a processing chip disposed on the mainboard of the host 21, such as the central processing unit (CPU) of the host 21. The general processing unit 101 can be any processing device with processing and computing capabilities. The general processing unit can be a serial processing unit or a parallel processing unit. For example, the general processing unit can be a general processor, such as a CPU. A parallel processing unit refers to a processing device that can perform parallel computing and processing, such as a graphics processing unit (GPU) or an FPGA.

[0043] The above-mentioned unloading card 22 refers to any hardware device or component with control, communication and storage functions. The unloading card 22 also has the ability to process the network protocol stack. Figure 2 and Figure 3As shown, the unloading card 22 may include: a programmable hardware module 221 and an IO device 222. The programmable hardware module 221 and the IO device 222 are communicatively connected. Specifically, the programmable hardware module 221 and the IO device 222 may be communicatively connected via a communication interface. The communication interface may be a PCIe interface, a PCI interface, or an UltraPath Interconnect (UPI) interface, etc. Preferably, the programmable hardware module 221 and the IO device 222 are connected via a PCIe interface, which may increase the data transmission rate between the programmable hardware module 221 and the IO device 222. When the programmable hardware module 221 and the IO device 222 are connected via a PCIe interface, the IO device 222 may also be referred to as a PCIe device.

[0044] The programmable hardware module 221 refers to a hardware processor that uses a hardware description language (HDL) for data processing. The hardware description language may be a very-high-speed integrated circuit hardware description language (VHDL), Verilog HDL, System Verilog or System C, etc. The programmable hardware module 221 may be an FPGA, a programmable array logic device (PAL), a general array logic device (GAL), a complex programmable logic device (CPLD), etc. Alternatively, the programmable hardware unit 221 may also be an application specific integrated circuit (ASIC) or a system on chip (SoC), etc.

[0045] The host 21 and the unloading card 22 are connected in communication. Specifically, the unloading card 22 and the host 21 can be connected in communication via a bus interface. The bus interface can be a serial bus interface, such as a PCIe bus interface, a PCI bus interface, a UPI bus interface, a Universal Serial Bus (USB) serial bus interface, an RS485 interface, or an RS232 interface. Preferably, the serial bus is a PCIe bus interface, which can increase the data transmission rate between the host 21 and the unloading card 22.

[0046] like Figure 2 and Figure 3As shown, the host 21 is generally provided with a root complex (RC) 212 of the serial bus. The RC 213 is an interface between the host's general processing unit and the topology bus, representing the general processing unit in communication with other parts of the computing system. The RC can be understood as a controller of the serial bus, which is not only responsible for managing data access to the device, but also includes a series of contents such as access control, error handling and virtualization technology.

[0047] The bus interface of the host 21 can be expanded according to the specifications of the host 21. Generally, the host 21 has multiple communication interfaces. In the embodiments of the present application, "multiple" means more than one, that is, two or more. When the uninstall card 22 is connected to the host 21 through the bus interface, the uninstall card 22 can be multiple to achieve the expansion of the uninstall card 22.

[0048] In the pass-through technology, the virtual instance 211 can directly access the IO device 222 mounted on the programmable hardware module 221 through the virtual manager. In the pass-through technology, the IO device 222 can also be called a pass-through device. The virtual manager refers to a computer program that manages the virtual instance 211, which can be implemented as a software function module or a plug-in. The operating system of the virtual instance 221 can communicate with the hardware through the virtual manager. The virtual instance 221 has different implementation forms and different virtual managers.

[0049] For example, in an embodiment where the virtual instance is a container or a container group, an operating system virtualization architecture can be used to divide a single operating system of a host into multiple containers, which are managed using a container manager. Multiple refers to 2 or more containers.

[0050] For another example, in an embodiment where the virtual instance is a virtual machine, the underlying hardware resources are no longer divided, but a virtual machine monitor (VMM) is installed on the operating system, and the virtual layer exists as application-level software and does not involve the operating system kernel. The virtual layer simulates a set of independent hardware devices for each virtual machine, including hardware resources such as processors, memory, motherboards, graphics cards, and network cards, and installs the client operating system on them. Accordingly, the virtual manager is implemented as a VMM.

[0051] In the pass-through technology, the virtual instance 211 can directly access the IO device 222 mounted on the programmable hardware module 221, so that the IO operation path of the virtual instance 211 is almost the same as the IO path in the non-virtualized environment. Among them, the IO device 222 is the pass-through device 222. The pass-through device 222 refers to the IO device mounted on the programmable hardware module 221, which may include: a network card, a storage medium, etc. Among them, the storage medium may be a persistent storage medium such as a disk or a hard disk. The number of pass-through devices 222 is one or more, which is flexibly configured according to actual needs.

[0052] In this embodiment, the programmable hardware module 221 is mainly used for data forwarding between the host 21 and the pass-through device 222. In this embodiment, each virtual instance deployed by the host 21 has the same access process to each pass-through device 222. The following takes any virtual instance deployed on the host 21 accessing any pass-through device as an example to illustrate the access process of the virtual instance provided by this embodiment to the pass-through device 222. For the convenience of description and illustration, the virtual instance used in the example is defined as the first virtual instance, and the pass-through device used in the example is defined as the target pass-through device. Figure 2 and Figure 3 The first virtual instance is illustrated by number 211a, and the target pass-through device is illustrated by number 222a. The first virtual instance 211a is any virtual instance deployed on the host 21. The target pass-through device 222a is any pass-through device.

[0053] When the first virtual instance 211a needs to access the target pass-through device 222a, it may initiate a non-posted access request to the target pass-through device 222a. For the embodiment in which the host 21 and the offload card 22 are connected via a PCIe bus, the access request may be a TLP request.

[0054] The access request initiated by the first virtual instance 211a to the target direct device 222a is a non-forwarding type, mainly because the non-forwarding type request is divided into two parts: first, the sending end sends an access request to the receiving end, and the receiving end receives the access request and returns a completion data packet to the sending end after completion, which includes three processes: sending, receiving and feedback. For the sending end (the first virtual instance 211a), it must wait for the completion data packet to be received before the current transaction can be ended. Therefore, in the case of an abnormal target direct device 222a, the non-forwarding type access request will cause a completion timeout due to the inability of the abnormal target direct device 222a to respond to the access request, and the first virtual instance 211a will not be able to end the current transaction because the first virtual instance 211a does not receive the completion data packet, and will consume the error data generated by the completion timeout in the above-mentioned traditional solution.

[0055] In this application, consuming error data refers to performing a logical operation based on the error data, such as performing data processing on the error data, or using the error data to process other data, but is not limited thereto.

[0056] For a forwarding (Posted) request, after the sending end sends a forwarding transaction-type request to the receiving end, the current transaction can be ended without waiting for the return completion data packet. In this way, even if the target direct-through device 222a is abnormal, the sending end (first virtual instance 211a) can end the current transaction without receiving the completion data packet, and will not consume the erroneous data generated by the completion timeout in the above-mentioned traditional solution. Therefore, the forwarding access request does not have the technical problem of consuming erroneous data, resulting in subsequent execution logic errors of the first virtual instance. Therefore, the embodiment of the present application relates to the processing of non-forwarding access requests.

[0057] Whether the access request is forwarding type or non-forwarding type is mainly determined by the transaction type of the access request of the first virtual instance 211a to the target pass-through device 222a. Generally, if the transaction type of the access request of the first virtual instance 211a to the target pass-through device 222a is memory read (Memory Read), IO read (IO Read), IO write (IO Write), configuration read (Configuration Read) or configuration write (Configuration Write), the access request is a non-forwarding type request. If the transaction type of the access request sent by the first virtual instance 211a to the target pass-through device 222a is memory write (MemoryWrite) or message (Message), the access request is a forwarding type request, etc.

[0058] Since the target direct-access device 222a cannot respond to the access request when the target direct-access device is abnormal, the access request completion timeout occurs, and the first virtual instance 211a receives the all-1 completion timeout message returned by RC 212. Since the first virtual instance 211a cannot determine whether the all-1 data in the completion timeout message is correct data, and continues to execute subsequent operations to consume the all-1 data, the first virtual instance 211a consumes wrong data, resulting in an execution logic error of the first virtual instance 211a.

[0059] In this embodiment, in order to solve this technical problem, a target unit 221a is set on the programmable hardware module 221. The target unit 221a can be a hardware language module written in a programmable hardware language, which is used to intercept and forward the access request sent by the virtual instance to the pass-through device.

[0060] Specifically, the target unit 221a can receive the access request sent by the first virtual instance 211a. In the embodiment of the present application, the target unit 221a has different processing logic for the access request depending on whether the target direct device to be accessed by the access request is abnormal. Therefore, the target unit 221a needs to determine whether the target direct device is abnormal.

[0061] In some embodiments, the target unit 221a may pre-store the identification of the abnormal pass-through device; and obtain the identification of the target pass-through device 222a from the access request; if the identification of the abnormal pass-through device includes the identification of the target pass-through device 222a, the target pass-through device 222a is determined to be abnormal; if the identification of the abnormal pass-through device does not include the identification of the target pass-through device 222a, the target pass-through device 222a is determined to be normal. In the embodiment of the present application, the identification of the pass-through device refers to the information that uniquely identifies a pass-through device, which may be the bus number, device number and function number (BDF) of the pass-through device.

[0062] In order to determine which abnormal pass-through devices are, such as Figure 3 As shown, the offload card 22 may also be provided with a processing module 223. The processing module 223 is used for the management and control of various components, modules or devices in the computing system. For example, the processing module 223 may control the operation of the programmable hardware module 221. In the separation architecture of the computing system shown in the present application, the processing module 223 may also manage the pass-through device 222. In some embodiments, the processing module 223 may also be provided with a virtual manager to manage virtual instances.

[0063] In this embodiment, the processing module 223 may include: a processor. The processor may be a CPU, FPGA, GPU, ASIC chip or other device with processing functions. Generally, the computing resources of the processing module 223 are less than the computing resources provided by the host 21. The processing module 223 may also include a memory and other peripheral circuits operated by the processor. The memory may store the computer program required for the processing module 223 to complete the control function. The processor may run the computer program to realize the control of each component, module or device in the computing system.

[0064] In this embodiment, the processing module 223 can also perform abnormality detection on the pass-through device 222 to determine the abnormal pass-through device. Figure 3 As shown, a detection unit 223a may be added to the processing module 223. The detection unit 223a refers to a software function module having a function of detecting abnormalities of the pass-through device 222.

[0065] It is worth noting that in the embodiment of the present application, the abnormality of the pass-through device mainly refers to the abnormal phenomenon that the pass-through device cannot respond to the access request of the virtual instance. The abnormality of the pass-through device may be that the pass-through device itself is abnormal, resulting in the inability to respond to the access request of the virtual instance; it may also be that other devices or modules are abnormal, resulting in the inability of the pass-through device to respond to the access request of the virtual instance. This situation also belongs to the abnormality of the pass-through device. For example, since the processing module 223 is used to manage the programmable hardware module 221 and the pass-through device 222; if the process of the above-mentioned processing module 223 is abnormal, the programmable hardware module 221 and the pass-through device 222 cannot run, and the pass-through device naturally cannot respond to the access request of the virtual instance. This situation also belongs to the abnormality of the pass-through device.

[0066] In the case that the processing module 223 is abnormal or there is an abnormal pass-through device in the pass-through devices 222 , the processing module 223 may enable the target unit 221 a ; and provide the identifier of the abnormal pass-through device to the target unit 221 a .

[0067] In some embodiments, the processing module 223 itself is abnormal. When the processing module 223 is abnormal, the processing module 223 (specifically, the detection unit 223a in the processing module 223) enters the function call link corresponding to the abnormal processing module; uses the hook function mounted on the function call link to start the target unit to enable the target unit. The processing module 223 also provides the identification of all pass-through devices on the uninstall card 22 as the identification of the abnormal pass-through device to the target unit 221a.

[0068] In other embodiments, the processing module 223 (specifically, the detection unit 223a in the processing module 223) may also perform abnormality detection on the pass-through device 222. Specifically, when the processing module 223 (specifically, the detection unit 223a in the processing module 223) performs abnormality detection on the pass-through device 222, it may send a detection data packet to the pass-through device 222. Optionally, the processing module 223 (specifically, the detection unit 223a in the processing module 223) may periodically send a detection data packet to the pass-through device 222 according to a set detection period.

[0069] If the response data packet of the detection data packet returned by the through device 222 is not received within the set time period, the through device that does not return the response data packet of the detection data packet within the set time period is determined to be an abnormal through device.

[0070] Accordingly, when there is an abnormal pass-through device in the pass-through device 222 on the uninstall card, the processing module 223 provides the identification of the abnormal pass-through device to the target unit 221a. The target unit 221a can start the proxy answering process when receiving the identification of the abnormal pass-through device, thereby enabling the target unit. The proxy answering process refers to the process in which the target unit intercepts the virtual machine's access request to the abnormal pass-through device and responds to the access request.

[0071] The target unit 221a can store the identifier of the abnormal pass-through device; and when receiving an access request, obtain the identifier of the target pass-through device 222a from the access request; if the identifier of the abnormal pass-through device includes the identifier of the target pass-through device 222a, it is determined that the target pass-through device 222a is abnormal; if the identifier of the abnormal pass-through device does not include the identifier of the target pass-through device 222a, it is determined that the target pass-through device 222a is not abnormal.

[0072] In summary, the target unit 221a adds a judgment logic of whether the target through-device to which the access request is requested is abnormal, which will undoubtedly reduce the forwarding efficiency of the access request and increase the response time of the through-device to the access request. If all through-devices on the unloading card are normal, the target unit 221a still judges whether the target through-device is abnormal for any access request, which is undoubtedly redundant. Based on this, in some embodiments, the target unit can be disabled by default and is in a silent state. The target unit 221a is in a silent state, and when receiving an access request, the access request is directly forwarded to the target through-device. When and only when the detection unit 223a identifies an abnormal through-device, the target unit is notified to open, and the target unit performs the operation of determining whether the target through-device is abnormal. Regarding the mode of enabling the target unit, the relevant contents of the above-mentioned embodiment can be referred to, and it will not be repeated here.

[0073] The target unit 221a starts working in the enabled state. That is, when the target unit 221a receives an access request in the enabled state, it can perform an operation of determining whether the identification of the abnormal pass-through device includes the identification of the target pass-through device; if the identification of the abnormal pass-through device includes the identification of the target pass-through device 222a, it is determined that the target pass-through device 222a is abnormal. If the identification of the abnormal pass-through device does not include the identification of the target pass-through device 222a, it is determined that the target pass-through device 222a is normal.

[0074] Further, if the target pass-through device 222a is normal, the target unit 221a may forward the access request to the target pass-through device 222a. The target pass-through device 222a responds to the access request and returns a response data packet. Afterwards, the response data packet may be returned to the first virtual instance 211a through the target unit 221a. The first virtual instance 211a receives the response data packet and performs subsequent logical operations based on the response data packet.

[0075] In this embodiment, when the target pass-through device 222a is abnormal, the target unit 221a can respond to the access request instead of the target pass-through device 222a. Specifically, the target unit 221a can generate a response data packet with a data valid flag as an invalid flag for the access request when the target pass-through device 222a is abnormal. For the convenience of description and distinction, the response data packet with a data valid flag as an invalid flag generated by the target unit 221a for the access request is defined as the first response data packet.

[0076] The data valid flag is a flag in the header of the data packet, which is used to support error transmission. When the data packet contains a data load (Playload), the data valid flag is used to identify whether the data load is valid, that is, whether the data load is contaminated. In some embodiments, the data valid flag is set to 1, indicating that the data load of the data packet is invalid, that is, it is contaminated. Correspondingly, the invalid flag is 1.

[0077] For the embodiment where the access request is a TLP request, the first response data packet is also a TLP, and the data valid flag bit can be the error / poisoned bit (EP bit) in the TLP message header. Setting the EP bit of the first response data packet to 1 indicates that the data load of the first response data packet is invalid data, that is, polluted data; setting the EP bit of the first response data packet to 0 indicates that the data of the first response data packet is valid data. Accordingly, for a non-forwarding TLP request, the target unit 221a can generate a response TLP with the EP bit set to 1 for the TLP request when the target pass-through device 222a is abnormal.

[0078] After the target unit 221a generates the first response data packet with the data valid flag as an invalid flag, the target unit 221a may return the first response data packet with the data valid flag as an invalid flag to the first virtual instance 211a. The host 21 and the offload card 22 are connected via a serial bus communication. In an embodiment of the RC 212 with a serial bus provided on the host 21, since the target unit 221a responds to the access request instead of the target pass-through device 222a, the RC 212 may receive the first response data packet before the completion timeout; and send the first response data packet to the first virtual instance 211a.

[0079] According to the completion timeout mechanism, the header of the completion message received by RC 212, that is, the header of the first response data packet, is also provided with a message status code field, and when the message status code field is set to a successful completion flag, RC212 can determine that the completion message has been received without triggering a completion timeout exception. Based on this, in some embodiments, when the target unit 221a, under the condition that the target direct-through device 222a is abnormal, replaces the target direct-through device 222a to reply to the access request, it can generate a first response data packet with a message status code of a successful completion flag and a data valid flag of an invalid flag for the access request.

[0080] For the embodiment in which the access request is a TLP request, the first response data packet is also a TLP, and the successful completion flag of the message status code may be Success Completion (SC).

[0081] Further, the target unit 221a may forward the first response data packet to the RC 212 via the serial bus. The RC 212 may detect the message status code of the first response data packet, and send the first response data packet to the first virtual instance 211a when the message status code of the first response data packet is a successful completion identifier (such as SC).

[0082] Correspondingly, for the first virtual instance 211a, the first response data packet can be received; and the information of the data valid flag of the first response data packet can be detected. If the information of the data valid flag of the first response data packet is an invalid mark, it means that the first response data packet is a poison packet. In order to prevent the poison packet from being consumed and the error from being passed to the internal logic of the virtual instance, in this embodiment, the first virtual instance 211a can perform a virtual instance exit operation when the information of the data valid flag of the first response data packet is an invalid mark.

[0083] The virtual instance exit operation refers to exiting the execution flow of the processor (such as CPU) by the virtual instance, and switching the execution flow of the processor from the virtual instance side to the host side. The execution flow of the processor is a logically independent instruction area. The execution flow is independent, and each execution flow has its own stack, a set of its own register image and memory resources, that is, the execution flow has an independent context environment. The execution flow of the processor may include: the instruction sequence currently running by the processor and the register status of the processor.

[0084] In the embodiment of the present application, the triggering condition for the virtual instance to execute the exit operation is not limited. In some embodiments, the first virtual instance 211a can trigger the first virtual instance 211a to execute the virtual instance exit operation when the data valid flag bit of the first response data packet is an invalid flag (such as the EP bit is 1).

[0085] In other embodiments, since uncorrectable errors can be divided into fatal errors and non-fatal errors. Non-fatal errors often only affect the failure of a single transaction, while fatal errors may cause the system to crash. In the embodiment of the present application, in order to prevent errors from being transmitted to the virtual instance content, the first virtual instance 211a can determine that the processing of the first response data packet is a fatal error when it detects that the data valid flag bit of the first response data packet is an invalid flag (such as 1), thereby preventing the virtual instance from consuming erroneous data.

[0086] The host is provided with a virtual instance control structure corresponding to the virtual instance 211. The virtual instance control structure includes information about the relevant registers of the processor of the virtual instance and relevant control information of the processor of the virtual instance. Each virtual instance control structure corresponds to a virtual processor. A virtual processor refers to multiple virtual processors obtained by virtualizing a processor, such as a virtual CPU. For an embodiment in which the virtual instance is a VM, the virtual instance control structure may be a virtual machine control structure (Virtual Machine Control Structure, VMCS).

[0087] The virtual instance control structure includes: version identification, termination indication and data domain. The VMCS data domain includes the following information: (1) The state domain of the virtual instance (Guest-state), which is used to save the state information of the processor when the client is running. When the virtual instance exits, the previous state of the processor is stored in the state domain of the virtual instance; when the virtual instance enters, the processor restores the state from the state domain of the virtual instance; (2) The host state domain (host-state): saves the processor state when the host is running. When the virtual instance exits, the processor restores the processor state from this domain; (3) The virtual instance entry control domain: controls the behavior of the processor when the virtual instance enters; (4) The virtual instance execution control domain: controls the processor when the virtual instance is running, controls which conditions trigger the virtual instance exit event, etc.; (5) The virtual instance exit control domain: controls the behavior of the processor when the virtual instance exits; (6) The virtual instance exit information domain: used to provide the cause and detailed information of the virtual instance exit event, and the virtual manager can use this information to decide how to manage and control the virtual instance.

[0088] Among them, the virtual instance execution control domain includes an exception bit table (Exception Bitmap) field. The ExceptionBitmap field can be a value of a set number of bits (such as 32 bits), and each bit corresponds to an exception vector. In the virtual instance, if an exception occurs, the processor checks the exception bit in the Exception Bitmap field that represents the exception. If the value of the exception bit is an identifier that triggers the virtual instance to exit, it is a valid identifier (such as 1), indicating that it is specified that the exception triggers the virtual instance to exit; if the value of the exception bit is an invalid identifier (such as 0), it indicates that it is not specified that the exception triggers the virtual instance to exit. In this embodiment, the Exception Bitmap field includes an exception bit that represents a machine check exception (Machine Check Exception, MCE). Correspondingly, if the value of the exception bit is an identifier that the MCE exception triggers the virtual instance to exit, such as 1, it indicates that the MCE occurs and triggers the virtual instance to exit. MCE is an exception triggered when a processor finds a hardware error.

[0089] Based on this, in some embodiments of the present application, the exception bit representing MCE in the virtual instance data structure can be pre-set as an identifier of MCE triggering virtual instance exit, such as setting the exception bit representing MCE in the Exception Bitmap field to 1.

[0090] Specifically, Figure 3As shown, the virtual manager 213 can be deployed on the host 21. The virtual manager 213 is used to manage the virtual instances deployed on the host 21. Accordingly, during the virtual instance creation process, the virtual manager 213 can set the exception bit representing MCE in the virtual instance data structure (such as VMCS) corresponding to the virtual instance to the flag that MCE triggers the virtual instance exit. For example, during the virtual instance creation process, the virtual manager 213 can set the exception bit representing MCE in the Exception Bitmap field of VMCS to 1. In this way, since it is pre-specified that a fatal error can trigger MCE, the virtual instance can trigger MCE when it is determined that a fatal error has occurred. And since it is pre-specified in the virtual instance control result that an exception such as MCE will trigger the virtual instance exit, the virtual instance triggers the virtual instance exit when it is determined that MCE has occurred.

[0091] Based on the above virtual instance control structure, the first virtual instance 211a can determine that the processing of the first response data packet is a fatal error when it is detected that the valid flag bit of the first response data packet is an invalid flag (such as the EP bit is 1). And trigger a machine check exception (MCE). And, further, the information of the abnormal bit representing the machine check exception can be obtained from the virtual instance control structure; and when the information of the abnormal bit representing the machine check exception is the flag corresponding to the fatal error triggering the machine check exception (such as the abnormal position 1 representing the MCE in the Exception Bitmap field of the VMCS), the first virtual instance is triggered to perform a virtual instance exit operation.

[0092] For the host 21, when the exit of the first virtual instance is detected, the operation of the target virtual instance in the virtual instance 211 on the host 21 can be stopped to prevent the error from being transmitted to the inside of the virtual instance. This operation is specifically performed by the CPU on the host 21 side. Stopping the operation of the target virtual instance mainly stops the process of the target virtual instance.

[0093] The target virtual instance includes the first virtual instance. Of course, in addition to the first virtual instance, other virtual instances deployed on the host 21 may also be included, which is specifically determined by the abnormal range of the virtual instance on the host 21.

[0094] Specifically, the processing module 223 may send the identifier of the abnormal pass-through device to the host 21. When the host 21 detects that the first virtual instance has exited, if the identifier of the abnormal pass-through device includes the identifiers of all pass-through devices on the uninstall card 22, all virtual instances deployed on the host 21 are determined to be target virtual instances. Accordingly, the host 21 may stop the operation of all virtual instances deployed on the host 21.

[0095] If the identification of the abnormal pass-through device includes the identification of some pass-through devices on the uninstall card 22, the target virtual instance is determined to be the first virtual instance 211a. Accordingly, the host 21 may stop the operation of the first virtual instance 211a.

[0096] The following is an exemplary description of the virtual instance protection method provided in the embodiment of the present application in combination with a specific implementation step.

[0097] like Figure 4 As shown, the virtual instance protection method provided in the embodiment of the present application may include:

[0098] 401. When the detection unit detects that an abnormal pass-through device exists in the pass-through device, the target unit in the programmable hardware module is enabled; the function of the target unit is turned on.

[0099] 402. The virtual instance initiates an access request to the target pass-through device.

[0100] 403. The target unit ignores the forwarding type access request that does not require a reply, and replies to the non-forwarding type access request that requires a reply with a first response data packet whose message status code is SC and whose data valid flag bit EP is 1.

[0101] The target unit can determine whether the access request is forwarding type or non-forwarding type according to the transaction type of the access request. For the corresponding relationship between the transaction type and the forwarding type or non-forwarding type, please refer to the relevant content of the above embodiment, which will not be repeated here.

[0102] 404. The RC on the host side receives the first response data packet and sends the first response data packet to the virtual instance.

[0103] 405. The virtual instance receives the first response data packet and detects that the EP bit of the first response data packet is 1, and determines that the processing of the first response data packet is a fatal error, thereby triggering MCE. The MCE further triggers the virtual instance to exit.

[0104] 406. The host detects that the virtual instance has exited, and stops the operation of the virtual instance.

[0105] In an embodiment of the present application, a target unit is set on the programmable hardware module of the unloading card. The target unit can intercept the access request of the virtual instance to the target pass-through device in the case of an abnormality of the target pass-through device, and return a response data packet for the access request, thereby realizing abnormal isolation of the pass-through device. Among them, the data valid flag of the response data packet is set to an invalid flag, and the virtual instance can identify the response data packet as a contaminated packet based on the invalid flag, thereby triggering the virtual instance exit operation. The host can stop the virtual instance operation in time when detecting the virtual instance exit, which can prevent the virtual instance from consuming erroneous data, thereby helping to prevent the virtual instance from internal logic errors.

[0106] The following is an exemplary description of the virtual instance protection method provided in the embodiment of the present application from the perspectives of the offload card and the host.

[0107] Figure 5 A flowchart of another virtual instance protection method provided in an embodiment of the present application. The virtual machine protection method is applicable to an uninstall card. The uninstall card includes: a programmable hardware module and at least one pass-through device connected in communication. The uninstall card is connected in communication with a host; the host is deployed with at least one virtual instance. Figure 5 As shown, the virtual instance protection method mainly includes:

[0108] 501. Receive, through a programmable hardware module, an access request of a non-forwarded transaction type sent by a first virtual instance; the access request is used to access a target pass-through device in the pass-through devices on the offload card; the first virtual instance is any virtual instance in the virtual instances deployed by the host.

[0109] 502. When the target pass-through device is abnormal, a first response data packet is generated with a data valid flag bit being an invalid flag for the access request;

[0110] 503. Return the first response data packet to the first virtual instance, so that the first virtual instance can execute a virtual instance exit operation when the valid flag bit of the first response data packet is an invalid flag; wherein the first virtual instance exit triggers the host to stop the target virtual instance; the target virtual instance includes the first virtual instance.

[0111] Figure 6 A flowchart of another virtual instance protection method provided in an embodiment of the present application. The virtual machine protection method is applicable to a host. The host is connected to an offload card for communication. The offload card includes: a programmable hardware module connected for communication and at least one pass-through device; the host is deployed with at least one virtual instance. Figure 6 As shown, the virtual instance protection method mainly includes:

[0112] 601. Initiate a non-forwarding transaction type access request to a target pass-through device through a first virtual instance; wherein a programmable hardware module receives the access request; and in the event of an abnormality in the target pass-through device, return a first response data packet with a data valid flag bit as an invalid flag for the access request.

[0113] The first virtual instance is any virtual instance among the virtual instances deployed by the host, and the target pass-through device is any pass-through device on the offload card.

[0114] 602. Obtain, through the first virtual machine, a first response data packet returned by the programmable hardware module.

[0115] 603. When the valid flag bit of the first response data packet is an invalid flag, perform a virtual instance exit operation on the first virtual instance through the first virtual instance.

[0116] 604. When the first virtual instance exits, stop the operation of a target virtual instance among the virtual instances deployed on the host; the target virtual instance includes the first virtual instance.

[0117] In this embodiment, the first virtual instance is any virtual instance deployed on the host. The target pass-through device is any pass-through device on the offload card.

[0118] When the first virtual instance needs to access the target pass-through device, in step 601, a non-posted access request may be initiated to the target pass-through device. For an embodiment in which the host and the offload card are connected via a PCIe bus communication connection, the access request may be a TLP request. For a description of the reasons for the non-posted access request, please refer to the relevant contents of the above embodiments, which will not be repeated here.

[0119] In the case of a non-forwarded access request where the target pass-through device is abnormal, the abnormal target pass-through device cannot respond to the access request, resulting in a completion timeout. Since the first virtual instance does not receive the completion data packet and cannot end the current transaction, the erroneous data generated by the completion timeout in the above-mentioned traditional solution will be consumed.

[0120] In this embodiment, in order to solve this technical problem, for the uninstall card, in step 501, the access request sent by the first virtual instance can be received by the programmable hardware module. Specifically, a target unit can be set on the programmable hardware module, and the target unit receives the access request sent by the first virtual instance. In the embodiment of the present application, whether the target pass-through device requested to be accessed by the access request is abnormal, the target unit has different processing logic for the access request. Therefore, the target unit needs to determine whether the target pass-through device is abnormal.

[0121] In some embodiments, the identification of abnormal pass-through devices can be pre-stored; and the identification of the target pass-through device can be obtained from the access request through the target unit; if the identification of the target pass-through device exists in the identification of the abnormal pass-through device, it is determined that the target pass-through device is abnormal; if the identification of the target pass-through device does not exist in the identification of the abnormal pass-through device, it is determined that the target pass-through device is normal.

[0122] In order to determine which are the abnormal pass-through devices, the offload card may also be provided with a processing module, wherein the processing module is used for the management and control of each component, module or device in the computing system.

[0123] In this embodiment, when the processing module is abnormal or an abnormal pass-through device exists in the pass-through devices, the target unit may be enabled by the processing module; and an identifier of the abnormal pass-through device may be provided to the target unit.

[0124] In some embodiments, the processing module itself is abnormal. In the case of an abnormal processing module, the function call link corresponding to the abnormal processing module can be entered through the processing module; the target unit is started by using the hook function mounted on the function call link to enable the target unit. Further, the identification of all pass-through devices on the uninstall card can be provided to the target unit as the identification of the abnormal pass-through device.

[0125] In other embodiments, the processing module may further perform abnormality detection on the pass-through devices to determine abnormal pass-through devices in the pass-through devices. Optionally, the abnormality detection on the pass-through devices may be implemented by: sending a detection data packet to the pass-through devices through the processing module. Optionally, the detection data packet may be periodically sent to the pass-through devices according to a set detection cycle.

[0126] If a response data packet to the detection data packet returned by the through-device is not received within the set time period, the through-device that does not return a response data packet to the detection data packet within the set time period is determined to be an abnormal through-device.

[0127] After determining the abnormal direct-through device, the identification of the abnormal direct-through device can be sent to the target unit through the processing module to trigger the target unit to start the proxy answering process, thereby enabling the target unit. The target unit can store the identification of the abnormal direct-through device. Accordingly, when the target unit receives an access request, the identification of the target direct-through device can be obtained from the access request through the target unit; if the identification of the target direct-through device exists in the identification of the abnormal direct-through device, it is determined that the target direct-through device is abnormal; if the identification of the target direct-through device does not exist in the identification of the abnormal direct-through device, it is determined that the target direct-through device is normal.

[0128] In summary, the target unit adds a judgment logic for whether the target pass-through device to which the access request requests a request is abnormal, which will undoubtedly reduce the forwarding efficiency of the access request and increase the response time of the pass-through device to the access request. If all pass-through devices on the unloading card are normal, the target unit still judges whether the target pass-through device is abnormal for any access request, which is undoubtedly redundant. Based on this, in some embodiments, the target unit may be disabled by default and be in a silent state. The target unit is in a silent state, and when receiving an access request, the access request is directly forwarded to the target pass-through device. When and only when the detection unit identifies an abnormal pass-through device, the target unit is notified to turn on, and the target unit performs the operation of determining whether the target pass-through device is abnormal.

[0129] The target unit starts working in the enabled state. That is, when the target unit is in the enabled state, upon receiving an access request, it can perform an operation of determining whether the identification of the abnormal pass-through device includes the identification of the target pass-through device; if the identification of the abnormal pass-through device includes the identification of the target pass-through device, it is determined that the target pass-through device is abnormal. If the identification of the abnormal pass-through device does not include the identification of the target pass-through device, it is determined that the target pass-through device is normal.

[0130] Further, if the target pass-through device is normal, the target unit may forward the access request to the target pass-through device. The target pass-through device responds to the access request and returns a response data packet. Afterwards, the response data packet may be returned to the first virtual instance through the target unit. The first virtual instance receives the response data packet and performs subsequent logical operations based on the response data packet.

[0131] In this embodiment, when the target pass-through device is abnormal, the target unit can respond to the access request instead of the target pass-through device. Specifically, as shown in step 502, when the target pass-through device is abnormal, a response data packet with a data valid flag bit as an invalid flag can be generated for the access request through the programmable hardware module (specifically, the target unit in the programmable hardware module). For the convenience of description and distinction, the response data packet with a data valid flag bit as an invalid flag generated for the access request is defined as the first response data packet.

[0132] Further, in step 503, the first response data packet with the data valid flag as an invalid flag can be returned to the first virtual instance through the programmable hardware module (specifically, the target unit in the programmable hardware module). The host unload card is connected via a serial bus communication. In an embodiment of the RC in which a serial bus is provided on the host, since the target unit responds to the access request instead of the target pass-through device, the RC can receive the first response data packet before the completion timeout; and send the first response data packet to the first virtual instance.

[0133] According to the completion timeout mechanism, the header of the completion message received by the RC, that is, the header of the first response data packet, is also provided with a message status code field, and when the message status code field is set to a successful completion flag, the RC can determine that the completion message has been received without triggering a completion timeout exception. Based on this, in some embodiments, when the target unit responds to the access request on behalf of the target direct-through device under the condition that the target direct-through device is abnormal, it can generate a first response data packet with a message status code of a successful completion flag and a data valid flag of an invalid flag for the access request.

[0134] For the embodiment in which the access request is a TLP request, the first response data packet is also a TLP, and the successful completion identifier of the message status code may be SC.

[0135] Further, the first response data packet can be forwarded to the RC on the host through the serial bus. For the host side, the message status code of the first response data packet can be detected by the RC, and when the message status code of the first response data packet is a successful completion identifier (such as SC), the first response data packet is sent to the first virtual instance.

[0136] Accordingly, in step 602, the first response data packet may be received through the first virtual instance; and the information of the data valid flag of the first response data packet may be detected. If the information of the data valid flag of the first response data packet is an invalid flag, it means that the first response data packet is a poison packet. In order to prevent the poison packet from being consumed and the error from being passed to the internal logic of the virtual instance, in this embodiment, when the information of the data valid flag of the first response data packet is an invalid flag, in step 603, the first virtual instance may be used to perform a virtual instance exit operation on the first virtual instance, so that the processor execution flow of the host enters the host side.

[0137] In the embodiments of the present application, the specific implementation form of the triggering condition for the virtual instance to execute the exit operation is not limited. In some embodiments, the first virtual instance can be triggered to execute the virtual instance exit operation when the data valid flag bit of the first response data packet is an invalid flag (such as the EP bit is 1).

[0138] In other embodiments, since uncorrectable errors can be divided into fatal errors and non-fatal errors. Non-fatal errors often only affect the failure of a single transaction, while fatal errors may cause the system to crash. In an embodiment of the present application, in order to prevent errors from being transmitted to the virtual instance content, when it is detected that the data valid flag bit of the above-mentioned first response data packet is an invalid flag (such as 1), the first virtual instance can determine that the processing of the first response data packet is a fatal error, thereby preventing the virtual instance from consuming erroneous data.

[0139] The host is provided with a virtual instance control structure corresponding to the virtual instance. For the description of the virtual instance control structure, please refer to the relevant content of the above-mentioned system embodiment, which will not be repeated here. Among them, the virtual instance control structure includes an exception bit table (Exception Bitmap) field. In this embodiment, the Exception Bitmap field includes an exception bit representing a machine check exception (Machine Check Exception, MCE). Correspondingly, if the value of the exception bit is an MCE exception triggering the exit of the virtual instance, it is a valid flag. If it is 1, it indicates that MCE occurs, triggering the exit of the virtual instance. MCE is an exception triggered when a processor discovers a hardware error.

[0140] Accordingly, the exception bit representing the MCE in the virtual instance data structure may be pre-set as an identifier of the MCE triggering the virtual instance exit, such as setting the exception bit representing the MCE in the Exception Bitmap field to 1.

[0141] Specifically, the virtual manager can be deployed on the host side. The virtual manager is used to manage virtual instances deployed on the host. Accordingly, during the virtual instance creation process, the virtual manager can set the exception bit representing the MCE in the virtual instance data structure (such as VMCS) corresponding to the virtual instance as an identifier for the MCE to trigger the virtual instance exit. In this way, since it is pre-specified that a fatal error can trigger the MCE, the virtual instance can trigger the MCE when it is determined that a fatal error has occurred. And since it is pre-specified in the virtual instance control result that an exception such as MCE will trigger the virtual instance exit, the virtual instance will trigger the virtual instance exit when it is determined that the MCE has occurred.

[0142] Based on the above virtual instance control structure, when it is detected that the valid flag bit of the first response data packet is an invalid flag (such as the EP bit is 1), it can be determined that the processing of the first response data packet is a fatal error and a machine check exception (MCE) is triggered. Further, the information of the abnormal bit representing the machine check exception can be obtained from the virtual instance control structure; when the information of the abnormal bit representing the machine check exception is the flag that the machine check exception triggers the virtual instance exit (the abnormal bit representing MCE in the Exception Bitmap field of VMCS is 1), the first virtual instance is triggered to perform a virtual instance exit operation.

[0143] For the host, in step 604, when the exit of the first virtual instance is detected, the operation of the target virtual instance in the virtual instance on the host can be stopped to prevent the error from being transmitted to the inside of the virtual instance. The target virtual instance includes the first virtual instance. Of course, in addition to the first virtual instance, other virtual instances deployed on the host may also be included, which is specifically determined by the abnormal range of the virtual instance on the host.

[0144] Specifically, the processing module may send the identifier of the abnormal pass-through device to the host. When the host detects that the first virtual instance has exited, if the identifier of the abnormal pass-through device includes the identifiers of all pass-through devices on the uninstall card, all virtual instances deployed on the host are determined to be target virtual instances. Accordingly, the operation of all virtual instances deployed on the host may be stopped.

[0145] If the identification of the abnormal pass-through device includes the identification of some pass-through devices on the uninstall card, the target virtual instance is determined to be the first virtual instance. Accordingly, the operation of the first virtual instance can be stopped.

[0146] In this embodiment, the offload card can intercept the non-forwarded access request of the virtual instance to the target pass-through device when the target pass-through device is abnormal, and return a response data packet for the access request, thereby realizing abnormal isolation of the pass-through device. The data valid flag of the response data packet is set to an invalid flag, and the virtual instance can identify the response data packet as a polluted packet based on the invalid flag, thereby triggering the virtual instance exit operation. The host can stop the virtual instance operation in time when detecting the virtual instance exit, thereby preventing the virtual instance from consuming erroneous data, thereby helping to prevent the virtual instance from internal logic errors.

[0147] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 401 and 402 can be device A; for another example, the execution subject of step 401 can be device A, and the execution subject of step 402 can be device B; and so on.

[0148] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel, and the sequence numbers of the operations, such as 401, 402, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel.

[0149] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the virtual instance protection method provided in the above embodiments.

[0150] Figure 7 This is a schematic diagram of the structure of the uninstall card provided in the embodiment of the present application. Figure 7 As shown, the offload card includes: a programmable hardware module 71 and at least one pass-through device 72 in communication connection. The offload card can be in communication connection with the host. The host is deployed with at least one virtual instance.

[0151] In this embodiment, a target unit 71a is provided on the programmable hardware module 71. Among them, any virtual instance A in at least one virtual instance is used to initiate a non-forwarded access request to a target pass-through device in at least one pass-through device. The target unit 71a is used to receive an access request; in the case of an abnormality in the target pass-through device, a first response data packet with a data valid flag as an invalid mark is generated for the access request; and the first response data packet is returned to the virtual instance A, so that the virtual instance A can perform a virtual instance exit operation when the data valid flag of the first response data packet is detected as an invalid mark. Among them. The host is used to stop the operation of the target virtual instance in at least one virtual instance when the virtual instance A exits; the target virtual instance includes virtual instance A.

[0152] In some embodiments, the uninstall card further includes: a processing module 73. The processing module 73 is used to control the operation of the programmable hardware module 71.

[0153] The processing module 73 is used to enable the target unit when at least one of the pass-through devices has an abnormal pass-through device or the processing module is abnormal; and provide the target unit 71a with an identifier of the abnormal pass-through device.

[0154] The target unit 71a is in an enabled state, obtains the identification of the target pass-through device from the access request, and performs an operation of determining whether the identification of the abnormal pass-through device includes the identification of the target pass-through device; and, if the identification of the abnormal pass-through device includes the identification of the target pass-through device, determines that the target pass-through device is abnormal.

[0155] Optionally, when the processing module 73 is abnormal, the processing module enables the target unit through the processing module and provides the target unit with the identifier of the abnormal pass-through device in at least one pass-through device, and is specifically used to: when the processing module 73 is abnormal, enter the function call link corresponding to the processing module exception; use the hook function mounted on the function call link to start the target unit to enable the target unit; and provide the identifiers of all pass-through devices on the unload card as the identifiers of the abnormal pass-through devices to the target unit 71a.

[0156] In some other embodiments, the processing module 73 is also used to: perform abnormality detection on the at least one pass-through device to determine the abnormal pass-through device. Accordingly, when the processing module 73 enables the target unit through the processing module and provides the target unit with the identification of the abnormal pass-through device in at least one pass-through device, it is specifically used to: when there is an abnormal pass-through device on the unloaded card, provide the identification of the abnormal pass-through device to the target unit through the processing module to trigger the target unit to start the proxy answering process to enable the target unit.

[0157] Optionally, when performing anomaly detection on at least one pass-through device, the processing module 73 is specifically used to: send a probe data packet to at least one pass-through device; if no second response data packet of the probe data packet returned by at least one pass-through device is received within a set time length, then determine that the pass-through device that has not returned the second response data packet of the probe data packet within the set time length is an abnormal pass-through device.

[0158] In the embodiment of the present application, the host and the offload card can be connected via a serial bus communication; the host is provided with a root complex of the serial bus;

[0159] When the target unit 71a generates a first response data packet with a data valid flag bit set to an invalid flag for an access request, it is specifically used to: generate a first response data packet with a message status code of a successful completion flag and a data valid flag bit of an invalid flag for the access request. Accordingly, when the target unit returns the first response data packet to the virtual instance A, it is specifically used to: forward the first response data packet to the root complex through the serial bus, so that the root complex sends the first response data packet to the virtual instance A when detecting that the message status code of the first response data packet is a successful completion flag.

[0160] Optionally, the processing module 73 is further configured to send the identifier of the abnormal pass-through device to the host, so that the host can determine the target virtual instance according to the identifier of the abnormal pass-through device.

[0161] The unloading card provided in this embodiment can intercept the non-forwarding access request of the virtual instance to the target pass-through device when the target pass-through device is abnormal, and return a response data packet for the access request, thereby realizing abnormal isolation of the pass-through device. Among them, the data valid flag bit of the response data packet is set to an invalid flag. In this way, the virtual instance can identify the response data packet as a polluted packet based on the invalid flag, thereby triggering the virtual instance exit operation. The host can stop the virtual instance operation in time when detecting the virtual instance exit, thereby preventing the virtual instance from consuming erroneous data, thereby helping to prevent the virtual instance from internal logic errors.

[0162] Figure 8 This is a schematic diagram of the structure of the host provided in the embodiment of the present application. Figure 8 As shown, the host may include a memory 80a and a processor 80b. The memory is used to store computer programs; using the memory and the processor, at least one virtual instance is deployed on the host. The host may be communicatively connected to the offload card. The offload card may include: a communicatively connected programmable hardware module and at least one pass-through device.

[0163] Wherein, when the host is connected to the offload card, the processor 80b is coupled to the memory 80a, and is used to execute a computer program, so as to: initiate a non-forwarding transaction type access request to a target pass-through device in at least one pass-through device through any virtual instance A in at least one virtual instance; wherein the programmable hardware module receives the access request; in the case of an abnormality in the target pass-through device, returns a first response data packet with a data valid flag as an invalid flag for the access request; obtains a first response data packet returned by the programmable hardware module through virtual instance A; in the case where the valid flag of the first response data packet is an invalid flag, performs a virtual instance exit operation on virtual instance A through virtual instance A; and, in the case where virtual instance A exits, stops the operation of a target virtual instance in at least one virtual instance; the target virtual instance includes virtual instance A.

[0164] In some embodiments, the host and the offload card are connected via a serial bus communication; a root complex of the serial bus is provided on the host; wherein the programmable hardware module generates a first response data packet with a message status code of successful completion and a data valid flag bit set to an invalid flag for an access request. Accordingly, when the processor 80b obtains the first response data packet of the programmable hardware unit module through any virtual machine, it is specifically used to: detect the message status code of the first response data packet through the root complex, and send the first response data packet to the virtual instance A when detecting that the message status code of the first response data packet is successful completion; and obtain the first response data packet through any virtual machine.

[0165] In some embodiments, the host's memory stores a virtual instance control structure corresponding to virtual instance A; the abnormal bit representing the machine check exception (MCE) in the virtual instance data structure is pre-set to the flag that the machine check exception (MCE) triggers the virtual instance exit. Accordingly, when the processor 80b performs a virtual instance exit operation through any virtual machine, it is specifically used to: detect the valid flag bit of the first response data packet through virtual instance A; when it is detected that the valid flag bit of the first response data packet is an invalid flag, determine that the processing of the first response data packet is a fatal error and trigger MCE; obtain information about the abnormal bit representing the machine check exception from the virtual instance control structure; when the information about the abnormal bit representing the MCE is the flag that the MCE triggers the virtual instance exit, trigger virtual instance A to perform the virtual instance exit operation.

[0166] In some embodiments of the present application, the host is deployed with a virtual manager ( Figure 8 The virtual manager is used to manage at least one virtual instance. The processor 80b is also used to: during the creation of the virtual instance A, set the exception bit representing the machine check exception in the virtual instance data structure corresponding to the virtual instance A to the flag that the machine check exception triggers the virtual instance to exit through the virtual manager.

[0167] In some embodiments, the processor 80b is further configured to: obtain an identifier of an abnormal pass-through device provided by the offload card; and determine a target virtual instance from at least one virtual instance according to the identifier of the abnormal pass-through device.

[0168] Optionally, the processor 80b is also used to: when the identification of the abnormal pass-through device includes the identification of all pass-through devices on the unload card, determine all virtual instances in at least one virtual instance as target virtual instances; and when the identification of the abnormal pass-through device includes the identification of some pass-through devices on the unload card, determine virtual instance A as the target virtual instance.

[0169] In some optional embodiments, such as Figure 8As shown, the host may also include: a communication component 80c and a power component 80d and other components. In some embodiments, the host may be implemented as a terminal device such as a computer or a workstation, and may also include: a display component 80e and an audio component 80f and other optional components. Figure 8 Some components are shown in the figure only, which does not mean that the host must include Figure 8 The components shown do not mean that the host can only include Figure 8 Components shown.

[0170] The host provided in this embodiment is deployed with a virtual instance. When communicating with the offload card, the programmable hardware module of the offload card can be obtained to return a response data packet to the access request when the target pass-through device is abnormal. Further, based on the invalid flag of the data valid flag of the response data packet, the response data packet can be identified as a polluted packet, thereby triggering the virtual instance exit operation. When the host detects the virtual instance exit, it can stop the virtual instance operation in time, which can prevent the virtual instance from consuming erroneous data, thereby helping to prevent the virtual instance from internal logic errors.

[0171] In an embodiment of the present application, the memory is used to store a computer program and can be configured to store various other data to support operations on the device where it is located. Among them, the processor can execute the computer program stored in the memory to implement the corresponding control logic. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random-Access Memory, SRAM), electrically erasable programmable read only memory (Electrically Erasable Programmable Read Only Memory, EEPROM), erasable programmable read only memory (Electrical Programmable Read Only Memory, EPROM), programmable read only memory (Programmable Read Only Memory, PROM), read only memory (Read Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0172] In the embodiment of the present application, the processor can be any hardware processing device that can execute the logic of the above method. Optionally, the processor can be a central processing unit (CPU), a graphics processing unit (GPU) or a microcontroller unit (MCU); it can also be a field programmable gate array (FPGA), a programmable array logic device (PAL), a general array logic device (GAL), a complex programmable logic device (CPLD) and other programmable devices; or an advanced reduced instruction set (RISC) processor (Advanced RISC Machines, ARM) or a system on chip (SoC), etc., but not limited to this.

[0173] In an embodiment of the present application, the communication component is configured to facilitate wired or wireless communication between the device in which it is located and other devices. The device in which the communication component is located can access a wireless network based on a communication standard, such as Wireless Fidelity (WiFi), 2G or 3G, 4G, 5G or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can also be based on Near Field Communication (NFC) technology, Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology or other technologies.

[0174] In an embodiment of the present application, the display component may include a liquid crystal display (LCD) and a touch panel (TP). If the display component includes a touch panel, the display component may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0175] In an embodiment of the present application, a power supply component is configured to provide power to various components of the device in which it is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component is located.

[0176] In an embodiment of the present application, the audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (Microphone, MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal. For example, for a device with a language interaction function, voice interaction with a user can be achieved through an audio component.

[0177] It should be noted that the descriptions such as “first” and “second” in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit “first” and “second” to different types.

[0178] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0179] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage, etc.) that contain computer-usable program code.

[0180] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0181] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0182] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0183] In a typical configuration, a computing device includes one or more processors (CPU, etc.), input / output interfaces, network interfaces, and memory.

[0184] Memory may include non-permanent storage in a computer-readable medium, random-access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0185] The storage medium of a computer is a readable storage medium, which may also be referred to as a readable medium. The readable storage medium includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be a computer-readable instruction, a data structure, a module of a program, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0186] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the above elements.

[0187] The above contents are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A computing system, characterized in that: include: A host and an offload card; the host and the offload card are in communication connection; the offload card comprises: a programmable hardware module and at least one pass-through device in communication connection; the programmable hardware module is provided with a target unit; the host is deployed with at least one virtual instance; Any virtual instance of the at least one virtual instance is used to initiate a non-forwarding access request to a target pass-through device of the at least one pass-through device; The target unit is configured to receive the access request; generate a first response data packet with a data valid flag bit as an invalid flag for the access request when the target pass-through device is abnormal; and return the first response data packet to any virtual instance; Any of the virtual instances, when detecting that the data valid flag bit of the first response data packet is an invalid flag, executes a virtual instance exit operation; The host is used to stop the operation of a target virtual instance in the at least one virtual instance when detecting that any one of the virtual instances has exited; the target virtual instance includes any one of the virtual instances.

2. The system according to claim 1, characterized in that The unloading card further comprises: a processing module; the processing module is used to control the operation of the programmable hardware module; The processing module is used for enabling the target unit when there is an abnormal pass-through device among the at least one pass-through device; and sending the identifier of the abnormal pass-through device to the target unit; The target unit is in an enabled state, obtains the identifier of the target pass-through device from the access request; and performs an operation of determining whether the identifier of the abnormal pass-through device includes the identifier of the target pass-through device; and, when the identifier of the abnormal pass-through device includes the identifier of the target pass-through device, determines that the target pass-through device is abnormal.

3. A virtual instance protection method, applicable to uninstalling a card; characterized in that: The offload card comprises: a programmable hardware module and at least one pass-through device in communication connection; the offload card is in communication connection with a host; the host is deployed with at least one virtual instance; the method comprises: receiving, by the programmable hardware module, an access request of a non-forwarded transaction type sent by any virtual instance of the at least one virtual instance; the access request is used to access a target pass-through device of the at least one pass-through device; In the case where the target pass-through device is abnormal, generating a first response data packet with a data valid flag bit as an invalid flag for the access request; Returning the first response data packet to any one of the virtual instances, so that any one of the virtual instances can execute a virtual instance exit operation when the valid flag bit of the first response data packet is an invalid flag; The exit of any virtual instance triggers the host to stop the operation of a target virtual instance in the at least one virtual instance; the target virtual instance includes any virtual instance.

4. The method according to claim 3, characterized in that The uninstall card further includes: a processing module; the programmable hardware module is provided with a target unit; the method further includes: In the case that there is an abnormal pass-through device among the at least one pass-through device or the processing module is abnormal, enabling the target unit through the processing module and providing the target unit with an identifier of the abnormal pass-through device among the at least one pass-through device; When the target unit is in an enabled state, the target unit obtains an identifier of the target pass-through device from the access request; and when the identifiers of the abnormal pass-through devices include the identifier of the target pass-through device, it is determined that the target pass-through device is abnormal.

5. The method according to claim 4, characterized in that The determining of an abnormal through device by the processing module includes: In the case where the processing module is abnormal, enabling the target unit through the processing module and providing the target unit with an identifier of the abnormal pass-through device in the at least one pass-through device, including: In the case of an exception in the processing module, entering a function call link corresponding to the processing module exception; using a hook function mounted on the function call link, starting a target unit to enable the target unit; The identifiers of all the at least one through-device are provided to the target unit as the identifier of the abnormal through-device.

6. The method according to claim 4, characterized in that Also includes: The method of performing abnormality detection on the at least one pass-through device by the processing module to determine the abnormal pass-through device; and enabling the target unit by the processing module when there is an abnormal pass-through device in the at least one pass-through device, and providing the target unit with an identification of the abnormal pass-through device in the at least one pass-through device, comprises: In the case that there is an abnormal through-device among the at least one through-device, the processing module provides an identifier of the abnormal through-device to the target unit to trigger the target unit to start a proxy answering process to enable the target unit.

7. The method according to claim 6, characterized in that Performing abnormality detection on the at least one pass-through device to determine the abnormal pass-through device includes: Sending a detection data packet to the at least one pass-through device through the processing module; If the second response data packet of the detection data packet returned by the at least one direct-through device is not received within the set time period, the direct-through device that does not return the second response data packet of the detection data packet within the set time period is determined to be an abnormal direct-through device.

8. The method according to any one of claims 3 to 7, characterized in that: The host and the offload card are connected via a serial bus communication; the host is provided with a root complex of the serial bus; The step of generating a first response data packet with a data valid flag bit set to an invalid flag for the access request includes: Generate, by the programmable hardware module, a first response data packet with a message status code indicating successful completion and a data valid flag bit set to an invalid flag for the access request; The returning the first response data packet to any one of the virtual instances includes: The programmable hardware module forwards the first response data packet to the root complex through the serial bus, so that the root complex sends the first response data packet to any one of the virtual instances when a message status code of the first response data packet indicates successful completion.

9. A virtual instance protection method, applicable to a host; characterized in that: The host is communicatively connected to the offload card; the offload card comprises: a communicatively connected programmable hardware module and at least one pass-through device; the host is deployed with at least one virtual instance; the method comprises: Initiate a non-forwarding transaction type access request to a target pass-through device in the at least one pass-through device through any one of the at least one virtual instance; wherein the programmable hardware module receives the access request; and in the case where the target pass-through device is abnormal, return a first response data packet with a data valid flag bit as an invalid flag for the access request; Acquire the first response data packet returned by the programmable hardware module through any virtual instance; When the valid flag bit of the first response data packet is an invalid flag, performing a virtual instance exit operation on any virtual instance through any virtual instance; And, in the case that any of the virtual instances exits, the operation of a target virtual instance in the at least one virtual instance is stopped; the target virtual instance includes any of the virtual instances.

10. The method according to claim 9, characterized in that The host and the offload card are connected via a serial bus communication; the host is provided with a root complex of the serial bus; wherein the programmable hardware module generates a first response data packet with a message status code indicating successful completion and a data valid flag bit set to an invalid flag for the access request; The obtaining the first response data packet of the programmable hardware unit module through any virtual instance includes: detecting a message status code of the first response data packet through the root complex, and sending the first response data packet to any one of the virtual instances when detecting that the message status code of the first response data packet is successfully completed; The first response data packet is obtained through any one of the virtual instances.

11. The method according to claim 9 or 10, characterized in that: The host's memory stores a virtual instance control structure corresponding to any one of the virtual instances; the exception bit in the virtual instance data structure representing a machine check exception is pre-set as an indicator of a machine check exception triggering a virtual instance exit; When the valid flag bit of the first response data packet is an invalid flag, performing a virtual instance exit operation through any virtual instance includes: Detecting a valid flag bit of the first response data packet through any one of the virtual instances; In the case where it is detected that the valid flag bit of the first response data packet is an invalid flag, determining that the processing of the first response data packet is a fatal error, and triggering a machine check exception; Obtaining, from the virtual instance control structure, information of an exception bit representing a machine check exception; Furthermore, in a case where the information of the abnormal bit characterizing the machine check abnormality is an identification that the machine check abnormality triggers the virtual instance exit, any virtual instance is triggered to perform the virtual instance exit operation.

12. An uninstall card, characterized in that: include: A communicatively connected programmable hardware module and at least one pass-through device; when the offload card is communicatively connected to a host, it is used to execute the steps in the method described in any one of claims 3 to 8; wherein the host is deployed with at least one virtual instance.

13. A host, characterized in that: include: A memory and a processor; wherein the memory is used to store a computer program; using the memory and the processor, at least one virtual instance is deployed on the host; Wherein, when the host is connected to the offload card, the processor is coupled to the memory for executing the computer program for executing the steps in the method according to any one of claims 9 to 11; The offload card includes: a programmable hardware module in communication connection and at least one pass-through device.

14. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the method according to any one of claims 3 to 11.

Citation Information

Patent Citations

  • High availability method and system of virtual machine and related device

    CN113590262A

  • Fault recovery method and device for virtualization equipment

    CN114416293A

  • Server system and data processing method

    CN114528032A

  • Computing system, memory missing page processing method and storage medium

    CN114661414A

  • Link cloning method, system and equipment based on hardware unloading and storage medium

    CN115794296A