Computing system, virtual instance protection method, offload 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 returning the response packet of the invalid flag bit when the pass-through device is abnormal, the problem of the virtual machine consumption of wrong data is solved and the internal logical error protection of the virtual machine is realized.

WO2025066467A1PCT designated stage expired Publication Date: 2025-04-03HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/106519
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-27
Filing Date
2024-07-19
Publication Date
2025-04-03

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 may cause the virtual machine to consume incorrect data, thereby causing internal logic errors.

Method used

Set the target unit on the programmable hardware module of the uninstall card to intercept the non-forward 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, return it to the virtual instance, and trigger the virtual instance exit operation.

Benefits of technology

Through the exception isolation mechanism, the virtual instances are prevented from consuming incorrect data and avoid the occurrence of logical errors within the virtual machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024106519_03042025_PF_FP_ABST
    Figure CN2024106519_03042025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a computing system, a virtual instance protection method, an offload card, a host, and a storage medium. In the embodiments of the present disclosure, a target unit is provided on a programmable hardware module of the offload card. When a target pass-through device is abnormal, the target unit can intercept a non-forwarding transaction-type access request from a virtual instance to the target pass-through device, and return a response data packet for the access request, so that isolation of the abnormal pass-through device is achieved. A data valid flag bit of the response data packet is set as an invalid identifier. The virtual instance can identify the response data packet as a polluted packet on the basis of the invalid identifier, thereby triggering an exit operation of the virtual instance. The host can promptly stop running the virtual instance when it is detected that the virtual instance has exited. In this way, the virtual instance can be prevented from consuming erroneous data, which in turn helps prevent internal logic errors in the virtual instance.
Need to check novelty before this filing date? Find Prior Art

Description

Computing system, virtual instance protection method, offload card, host and storage medium Technical Field

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

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

[0003] In traditional solutions, 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, it may obtain and consume incorrect data, which may lead to internal logical errors in the virtual machine.

[0004] Summary of the Invention

[0005] Various aspects of the present disclosure 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.

[0006] In a first aspect, an embodiment of the present disclosure 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 programmable hardware module and at least one pass-through device in communicatively connected connection; the programmable hardware module is provided with a target unit; the host is deployed with at least one virtual instance;

[0007] 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 in the at least one pass-through device;

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

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

[0010] The host is configured 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.

[0011] In a second aspect, an embodiment of the present disclosure further provides a virtual instance protection method applicable to an offload card; 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:

[0012] 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;

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

[0014] 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;

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

[0016] In a third aspect, an embodiment of the present disclosure further provides a virtual instance protection method, applicable to a host; 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 host is deployed with at least one virtual instance; the method comprises:

[0017] Initiating, through any one of the at least one virtual instance, an access request of a non-forwarding transaction type to a target pass-through device in the at least one pass-through device; wherein the programmable hardware module receives the access request; and in the event of an abnormality in the target pass-through device, returning a first response data packet with a data valid flag bit indicating an invalid flag in response to the access request;

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

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

[0020] And, in the case that any one of the virtual instances exits, the target virtual instance in the at least one virtual instance is stopped from running; the target virtual instance includes any one of the virtual instances.

[0021] In a fourth aspect, an embodiment of the present disclosure 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 the 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.

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

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

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

[0025] In the fifth aspect, an embodiment of the present disclosure 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.

[0026] In an embodiment of the present disclosure, a target unit is set on a programmable hardware module of an offload card. The target unit can intercept a non-forwarded access request of a virtual instance to a target pass-through device when the target pass-through device is abnormal, and return a response data packet for the access request, thereby achieving 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 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, thereby preventing the virtual instance from consuming erroneous data, thereby helping to prevent internal logical errors in the virtual instance. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0028] FIG1 is a schematic diagram of the structure of a computing system provided by a conventional solution;

[0029] 2 and 3 are schematic diagrams of the structure of a computing system provided by an embodiment of the present disclosure;

[0030] 4-6 are flowcharts of a virtual instance protection method according to an embodiment of the present disclosure;

[0031] FIG7 is a schematic structural diagram of an uninstall card provided in an embodiment of the present disclosure;

[0032] FIG8 is a schematic diagram of the structure of a host provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] To make the objectives, technical solutions, and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below in conjunction with the specific embodiments of the present disclosure and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present disclosure.

[0034] In a computer architecture that separates computing from control, management, and networking functions, as shown in Figure 1, a computing system generally includes a host computer 10 and an offload card 20. The host computer 10 and the offload card 20 are connected via a Peripheral Component Interconnect Express (PCIe) bus. The host computer 10 is provided with a PCIe bus root complex (RC) 101. The offload card 20 can be plugged into the host computer 10 via a PCIe interface.

[0035] In the separate computer system, host 10 primarily performs computing functions, while offload card 20 performs management and network functions. Host 10 refers to any computer device with computing, storage, and communication capabilities, such as a server, PC, or workstation. One or more virtual machines (VMs) 102 can be deployed on host 10 to provide computing resources.

[0036] 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. The PCIe device 203 may be a network card or a storage medium.

[0037] In the computing system shown in Figure 1, the system's backend devices (i.e., PCIe devices 203) are managed by a specific processing module 201. Data is forwarded between the processing module 201 and the host 10 via an FPGA 202. The host 10 is responsible for virtualization and is deployed with one or more virtual machines 102. Virtual machines 102 access the PCIe devices 203 through the host 10's RC 101. Device pass-through technology allows physical devices on the host 10 (such as PCIe devices 203) to be directly presented to the virtual machine, allowing the virtual machine to directly access the resources of the PCIe devices 203. Device pass-through allows the virtual machine to achieve excellent input / output (IO) performance. When the system software of the processing module 201 or the PCIe device 203 experiences an abnormality, the virtual machine 102 accesses the PCIe device 203 to which it is directly passed. Due to an abnormality in the system software of processing module 201 or an abnormality in PCIe device 203, PCIe device 203 will be unable to respond to this access request. Therefore, RC 101 in host 10 will not be able to receive the completion message, causing the timer in RC 101 to time out, triggering a completion timeout exception. After waiting for the timeout, the main RC 101 returns a transport layer packet (Transaction Layer Packet, TLP) containing all 1s to the virtual machine. After waiting for the timeout, the virtual machine will consume the all-1 data and continue to execute subsequent logic because it cannot determine whether the all-1 TLP is correct. This will undoubtedly cause virtual machine 102 to consume incorrect data, making it impossible to ensure the correctness of the logic subsequently executed by the virtual machine.

[0038] In response to the above technical problems, in some embodiments of the present disclosure, 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 in the event of an abnormality of the target pass-through device, and return a response data packet for the access request, thereby achieving abnormal isolation of the pass-through device. Among them, the data valid flag of the response data packet is set to an invalid flag. Based on the invalid flag, the virtual instance can identify the response data packet as a contaminated packet, 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 logical errors.

[0039] The technical solutions provided by various embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

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

[0041] Figure 2 is a structural diagram of a computing system provided by an embodiment of the present disclosure. As shown in Figure 2, 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 can deploy one or more virtual instances 211. 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 (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.

[0042] Host 21 may include a general-purpose processing unit (GPU) and memory (not shown in FIG2 ). In this embodiment, the number of GPUs is not limited. There may be at least one GPU, i.e., one or more GPUs; each GPU may be a single-core processing unit or a multi-core processing unit.

[0043] 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-purpose processor, such as a CPU. A parallel processing unit refers to a processing device capable of parallel computing, such as a graphics processing unit (GPU) or an FPGA.

[0044] The above-mentioned offload card 22 refers to any hardware device or component with management, communication and storage functions. The offload card 22 also has the ability to process the network protocol stack. As shown in Figures 2 and 3, the offload 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 can be communicatively connected through a communication interface. The communication interface may be a PCIe interface, a PCI interface or an Ultra Path Interconnect (UPI) interface, etc. Preferably, the programmable hardware module 221 and the IO device 222 are connected through a PCIe interface, which can 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 through a PCIe interface, the IO device 222 may also be referred to as a PCIe device.

[0045] The programmable hardware module 221 refers to a hardware processor that uses a hardware description language (HDL) for data processing. The hardware description language can be Very-High-Speed ​​Integrated Circuit Hardware Description Language (VHDL), Verilog HDL, System Verilog, or System C. The programmable hardware module 221 can be an FPGA, a programmable array logic device (PAL), a general array logic device (GAL), a complex programmable logic device (CPLD), or the like. Alternatively, the programmable hardware unit 221 can also be an application-specific integrated circuit (ASIC) or a system on chip (SoC).

[0046] The host 21 and the offload card 22 are communicatively connected. Specifically, the offload card 22 and the host 21 can be communicatively connected 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 offload card 22.

[0047] As shown in Figures 2 and 3, a host 21 typically includes a root complex (RC) 212 for the serial bus. RC 213 serves as the interface between the host's general-purpose processing unit (GPU) and the topology bus, representing the GPU in communication with the rest of the computing system. The RC, which can be understood as the serial bus controller, manages not only data access to devices but also controls access, error handling, and virtualization.

[0048] The bus interface of host 21 can be expanded based on the specifications of host 21. Typically, host 21 has multiple communication interfaces. In the disclosed embodiments, "multiple" refers to more than one, i.e., two or more. When offload card 22 is communicatively connected to host 21 via the bus interface, multiple offload cards 22 can be provided, enabling expansion of offload card 22.

[0049] In pass-through technology, virtual instance 211 can directly access I / O devices 222 mounted on programmable hardware module 221 through a virtual manager. In pass-through technology, I / O devices 222 are also referred to as pass-through devices. A virtual manager is a computer program that manages virtual instance 211 and can be implemented as a software functional module or plug-in. The operating system of virtual instance 221 can communicate with the hardware through the virtual manager. Different virtual managers are used depending on the implementation of virtual instance 221.

[0050] 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 two or more containers.

[0051] For another example, in an embodiment where the virtual instances are virtual machines, the underlying hardware resources are no longer partitioned. Instead, a virtual machine monitor (VMM) is added to the operating system. The virtualization layer exists as application-level software and does not involve the operating system kernel. The virtualization layer simulates an independent set of hardware devices for each virtual machine, including hardware resources such as the processor, memory, motherboard, graphics card, and network card, upon which the client operating system is installed. Accordingly, the virtualization monitor is implemented as a VMM.

[0052] In the pass-through technology, virtual instance 211 can directly access I / O device 222 mounted on programmable hardware module 221. This allows the I / O operation path of virtual instance 211 to be virtually identical to that in a non-virtualized environment. I / O device 222 is a pass-through device 222. Pass-through devices 222 refer to I / O devices mounted on programmable hardware module 221 and can include network cards, storage media, and other such devices. Storage media can be persistent storage media such as disks and hard drives. The number of pass-through devices 222 can be one or more, and can be flexibly configured based on actual needs.

[0053] 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, the access process of each virtual instance deployed by the host 21 to each pass-through device 222 is the same. 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. In Figures 2 and 3, the first virtual instance is illustrated with number 211a, and the target pass-through device is illustrated with 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.

[0054] 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 an 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.

[0055] 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. The sending end (the first virtual instance 211a) must wait for the completion data packet to be received before the current transaction is ended. Therefore, when the target direct device 222a is abnormal, the non-forwarding type access request will be completed timed out 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 has not received the completion data packet, and will consume the error data generated by the completion timeout in the above-mentioned traditional solution.

[0056] In this disclosure, 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.

[0057] 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 pass-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 of the above-mentioned traditional solution. Therefore, the forwarding access request does not have the technical problem of consuming erroneous data, which leads to subsequent execution logic errors of the first virtual instance. Therefore, the embodiments of the present disclosure relate to the processing of non-forwarding access requests.

[0058] Whether an access request is forwarding or non-forwarding is primarily determined by the transaction type of the access request from the first virtual instance 211a to the target pass-through device 222a. Generally, if the transaction type of the access request from the first virtual instance 211a to the target pass-through device 222a is Memory Read, IO Read, IO Write, Configuration Read, or Configuration Write, then the access request is a non-forwarding request. If the transaction type of the access request from the first virtual instance 211a to the target pass-through device 222a is Memory Write or Message, then the access request is a forwarding request, etc.

[0059] Because the target direct-access device 222a is unable to respond to the access request due to an abnormality in the target direct-access device, the access request will time out, and the first virtual instance 211a will receive a completion timeout message containing all 1s returned by RC 212. Since the first virtual instance 211a cannot determine whether the all-1 data in the completion timeout message is correct, it continues to execute subsequent operations to consume the all-1 data, causing the first virtual instance 211a to consume incorrect data, resulting in an execution logic error in the first virtual instance 211a.

[0060] In this embodiment, to solve this technical problem, a target unit 221a is provided on the programmable hardware module 221. The target unit 221a may be a hardware language module written in a programmable hardware language, and is used to intercept and forward access requests sent by the virtual instance to the pass-through device.

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

[0062] In some embodiments, the target unit 221a may pre-store the identifier of the abnormal pass-through device; and obtain the identifier of the target pass-through device 222a from the access request; if the identifier of the target pass-through device 222a is included in the identifiers of the abnormal pass-through device, the target pass-through device 222a is determined to be abnormal; if the identifier of the target pass-through device 222a is not included in the identifiers of the abnormal pass-through device, the target pass-through device 222a is determined to be normal. In the disclosed embodiments, the identifier of the pass-through device refers to 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.

[0063] To determine which pass-through devices are abnormal, as shown in Figure 3, the offload card 22 may also be provided with a processing module 223. The processing module 223 is used to manage and control 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 this disclosure, the processing module 223 may also manage the pass-through devices 222. In some embodiments, the processing module 223 may also provide a virtual manager to manage virtual instances.

[0064] 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 capabilities. Generally, the computing resources of the processing module 223 are smaller than those provided by the host 21. The processing module 223 may also include memory and other peripheral circuits operated by the processor. The memory may store the computer programs required by the processing module 223 to perform management and control functions. The processor may execute the computer programs to implement management and control of various components, modules, or devices in the computing system.

[0065] In this embodiment, the processing module 223 can also perform anomaly detection on the pass-through device 222 to identify abnormal pass-through devices. As shown in FIG3 , a detection unit 223 a can be added to the processing module 223. The detection unit 223 a is a software function module that has the function of detecting anomalies on the pass-through device 222.

[0066] It is worth noting that in the embodiment of the present disclosure, 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 an abnormality of the pass-through device itself, which makes it impossible to respond to the access request of the virtual instance; it may also be an abnormality of other devices or modules, which makes the pass-through device unable 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.

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

[0068] In some embodiments, processing module 223 itself is abnormal. When processing module 223 is abnormal, processing module 223 (specifically, detection unit 223a within 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. Processing module 223 also provides the identifiers of all pass-through devices on uninstall card 22 as identifiers of the abnormal pass-through devices to target unit 221a.

[0069] In other embodiments, the processing module 223 (specifically, the detection unit 223a in the processing module 223) may further perform anomaly detection on the pass-through device 222. Specifically, when detecting anomalies on the pass-through device 222, the processing module 223 (specifically, the detection unit 223a in the processing module 223) may send a detection 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 packet to the pass-through device 222 according to a set detection period.

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

[0071] Accordingly, if an abnormal pass-through device is present among the pass-through devices 222 on the offload card, the processing module 223 provides the identifier of the abnormal pass-through device to the target unit 221a. Upon receiving the identifier of the abnormal pass-through device, the target unit 221a may initiate a proxy answering process, thereby enabling the target unit. The proxy answering process is the process by which the target unit intercepts a virtual machine's access request to the abnormal pass-through device and responds to the access request.

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

[0073] In summary, the target unit 221a adds a judgment logic for determining whether the target direct-through device to which the access request is directed is abnormal, which undoubtedly reduces the forwarding efficiency of the access request and increases the response time of the direct-through device to the access request. If all direct-through devices on the uninstall card are normal, it is undoubtedly redundant for the target unit 221a to still determine whether the target direct-through device is abnormal for any access request. Based on this, in some embodiments, the target unit can be disabled by default and be in a silent state. The target unit 221a is in a silent state and, upon receiving an access request, directly forwards the access request to the target direct-through device. If and only if the detection unit 223a identifies an abnormal direct-through device, it notifies the target unit to open, and the target unit then performs the operation of determining whether the target direct-through device is abnormal. Regarding the method for enabling the target unit, reference can be made to the relevant content of the above embodiment, which will not be repeated here.

[0074] The target unit 221a starts working in the enabled state. That is, when the target unit 221a receives an access request, it can determine whether the identifier of the abnormal pass-through device includes the identifier of the target pass-through device. If the identifier of the abnormal pass-through device includes the identifier of the target pass-through device 222a, the target pass-through device 222a is determined to be abnormal. If the identifier of the abnormal pass-through device does not include the identifier of the target pass-through device 222a, the target pass-through device 222a is determined to be normal.

[0075] Furthermore, if target pass-through device 222a is normal, target unit 221a may forward the access request to target pass-through device 222a. Target pass-through device 222a responds to the access request and returns a response packet. Target unit 221a then returns the response packet to first virtual instance 211a. First virtual instance 211a receives the response packet and performs subsequent logical operations based on the response packet.

[0076] In this embodiment, if the target pass-through device 222a is abnormal, the target unit 221a can respond to the access request on behalf of the target pass-through device 222a. Specifically, if the target pass-through device 222a is abnormal, the target unit 221a can generate a response data packet in which the data valid flag is set to an invalid flag in response to the access request. For ease of description and distinction, the response data packet generated by the target unit 221a in response to the access request in which the data valid flag is set to an invalid flag is defined as the first response data packet.

[0077] The data valid flag is a flag in the packet header that supports error transmission. When a packet contains a data payload, the data valid flag is used to identify whether the data payload is valid, that is, whether the data payload is contaminated. In some embodiments, the data valid flag is set to 1, indicating that the data payload of the packet is invalid, that is, contaminated. Accordingly, the invalid flag is 1.

[0078] For embodiments in which the access request is a TLP request, and the first response packet is also a TLP, the data validity flag can be the Error / Poisoned bit (EP) in the TLP header. Setting the EP bit of the first response packet to 1 indicates that the data payload of the first response packet is invalid data, i.e., polluted data; setting the EP bit of the first response packet to 0 indicates that the data in the first response packet is valid data. Accordingly, for non-forwarded TLP requests, the target unit 221a can generate a response TLP with the EP bit set to 1 in response to the TLP request if the target pass-through device 222a is abnormal.

[0079] After generating the first response data packet with the data valid flag set to an invalid flag, the target unit 221a may return the first response data packet with the data valid flag set to an invalid flag to the first virtual instance 211a. Regarding the embodiment in which the host 21 and the offload card 22 are connected via a serial bus communication, in which the host 21 is provided with an RC 212 having a serial bus, since the target unit 221a responds to the access request on behalf 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.

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

[0081] For an 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 Success Completion (SC).

[0082] Furthermore, 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, if the message status code of the first response data packet is a successful completion identifier (e.g., SC), send the first response data packet to the first virtual instance 211a.

[0083] Accordingly, the first virtual instance 211a can receive the first response data packet and detect the data valid flag of the first response data packet. If the data valid flag of the first response data packet indicates an invalid flag, the first response data packet is a poison packet. 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 execute a virtual instance exit operation if the data valid flag of the first response data packet indicates an invalid flag.

[0084] A virtual instance exit operation exits the execution flow of a processor (such as a CPU), switching the execution flow from the virtual instance to the host. A processor's execution flow is a logically independent region of instructions. Each execution flow is independent, with its own stack, register image, and memory resources, creating an independent context. The execution flow of a processor can include the currently executing instruction sequence and the status of its registers.

[0085] In the embodiments of the present disclosure, the triggering conditions for the virtual instance to execute the exit operation are not limited. In some embodiments, the first virtual instance 211a may 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 invalid (e.g., the EP bit is 1).

[0086] In other embodiments, uncorrectable errors can be divided into fatal errors and non-fatal errors. Non-fatal errors often only cause the failure of a single transaction, while fatal errors may cause the system to crash. In the disclosed embodiment, to prevent errors from being transmitted to the virtual instance content, the first virtual instance 211a may determine that the processing of the first response packet is a fatal error when detecting that the data valid flag bit of the first response packet is an invalid flag (e.g., 1), thereby preventing the virtual instance from consuming the erroneous data.

[0087] 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 virtual instance's processor and control information related to the virtual instance's processor. Each virtual instance control structure corresponds to a virtual processor. A virtual processor refers to multiple virtual processors, such as virtual CPUs, obtained by virtualizing a single processor. For embodiments in which the virtual instance is a VM, the virtual instance control structure may be a virtual machine control structure (VMCS).

[0088] The virtual instance control structure includes: version identifier, termination indicator and data domain. The VMCS data domain includes the following information: (1) The virtual instance state domain (Guest-state), which is used to save the processor state information when the client is running. When the virtual instance exits, the previous state of the processor is stored in the virtual instance state domain; when the virtual instance enters, the processor restores the state from the virtual instance state domain; (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 which conditions trigger the virtual instance exit event when the processor is in the virtual instance running state; (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: provides the cause and detailed information of the virtual instance exit event. The virtual manager can use this information to decide how to manage and control the virtual instance.

[0089] Among them, the virtual instance execution control domain includes an exception bitmap field. The Exception Bitmap 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 this exception triggers the virtual instance exit, it is a valid identifier (such as 1), indicating that this type of exception is specified to trigger the virtual instance exit; if the value of the exception bit is an invalid identifier (such as 0), it indicates that this type of exception is not specified to trigger the virtual instance exit. In this embodiment, the Exception Bitmap field includes an exception bit that represents a machine check exception (MCE). Correspondingly, if the value of the exception bit is an identifier that the MCE exception triggers the virtual instance exit, such as 1, it indicates that the MCE occurs, triggering the virtual instance exit. MCE is an exception triggered when the processor discovers a hardware error.

[0090] Based on this, in some embodiments of the present disclosure, the exception bit representing the MCE in the virtual instance data structure can 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.

[0091] Specifically, as shown in FIG3 , 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 the MCE in the virtual instance data structure (e.g., VMCS) corresponding to the virtual instance to an indicator that the MCE triggers the virtual instance exit. For example, during the virtual instance creation process, the virtual manager 213 can set the exception bit representing the MCE in the Exception Bitmap field of the VMCS to 1. 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 determines that a fatal error has occurred. Furthermore, since the virtual instance control result pre-specifies that the MCE exception will trigger the virtual instance exit, the virtual instance triggers the virtual instance exit when it determines that the MCE has occurred.

[0092] Based on the above-mentioned 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 detects that the valid flag bit of the first response data packet is an invalid flag (such as the EP bit is 1). It can also trigger a machine check exception (MCE). Furthermore, it can obtain information about the exception bit representing the machine check exception from the virtual instance control structure; and when the information about the exception bit representing the machine check exception is an identifier corresponding to a fatal error triggering a machine check exception (such as the exception bit 1 representing the MCE in the Exception Bitmap field of the VMCS), it can trigger the first virtual instance to perform a virtual instance exit operation.

[0093] Host 21 can also stop the target virtual instance in virtual instance 211 on host 21 if it detects the first virtual instance has exited, preventing errors from propagating to the virtual instance. This operation is specifically performed by the CPU on host 21. Stopping the target virtual instance primarily involves stopping the process running on the target virtual instance.

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

[0095] Specifically, processing module 223 may send the identifier of the abnormal pass-through device to host 21. When 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 offload card 22, host 21 may determine that all virtual instances deployed on host 21 are target virtual instances. Accordingly, host 21 may stop all virtual instances deployed on host 21.

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

[0097] The following is an exemplary description of the virtual instance protection method provided by the embodiment of the present disclosure in conjunction with a specific implementation step. As shown in Figure 4, the virtual instance protection method provided by the embodiment of the present disclosure may include:

[0098] 401. When the detection unit detects that an abnormal pass-through device exists in the pass-through device, the detection unit enables a target unit in the programmable hardware module; 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 forwarding access requests that do not require a response, and responds to non-forwarding access requests that require a response 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 transaction type and forwarding type or non-forwarding type, please refer to the relevant content of the above embodiment and 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, then determines that the processing of the first response data packet is a fatal error, thereby triggering the 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 disclosure, a target unit is set on the programmable hardware module of the offload card. The target unit can intercept the virtual instance's access request to the target pass-through device in the event of an abnormality in the target pass-through device, and return a response data packet for the access request, thereby achieving 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 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, thereby preventing the virtual instance from consuming erroneous data, thereby helping to prevent internal logical errors in the virtual instance.

[0106] The virtual instance protection method provided by the embodiment of the present disclosure is exemplarily described below from the perspectives of the offload card and the host.

[0107] Figure 5 is a flow chart illustrating another virtual instance protection method provided by an embodiment of the present disclosure. This virtual machine protection method is applicable to an offload card. The offload card includes: a programmable hardware module in communication with at least one pass-through device. The offload card is in communication with a host; the host is deployed with at least one virtual instance. As shown in Figure 5, the virtual instance protection method primarily 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 deployed by the host.

[0109] 502. When the target pass-through device is abnormal, generating a first response data packet with a data valid flag bit set to 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] FIG6 is a flow chart illustrating another virtual instance protection method provided by an embodiment of the present disclosure. This virtual machine protection method is applicable to a host. The host is in communication with an offload card. The offload card includes: a programmable hardware module and at least one pass-through device in communication connection; the host is deployed with at least one virtual instance. As shown in FIG6 , this virtual instance protection method primarily includes:

[0112] 601. Initiate a non-forwarding transaction type access request to a target pass-through device through a first virtual instance; wherein the 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 as an invalid flag for the access request.

[0113] The first virtual instance is any virtual instance deployed on 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, and 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, it may initiate a non-posted access request to the target pass-through device in step 601. For embodiments in which the host and the offload card are connected via a PCIe bus, 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 content of the above embodiment and will not be repeated here.

[0119] In the case of a non-forwarded access request with an abnormal target pass-through device, 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, it will consume the erroneous data generated by the completion timeout in the above traditional solution.

[0120] In this embodiment, to address this technical issue, for the uninstall card, in step 501, an access request sent by the first virtual instance can be received by a programmable hardware module. Specifically, a target unit can be provided on the programmable hardware module, and the target unit receives the access request sent by the first virtual instance. In the disclosed embodiment, the target unit's processing logic for the access request varies depending on whether the target pass-through device being accessed is abnormal. Therefore, the target unit needs to determine whether the target pass-through device is abnormal.

[0121] In some embodiments, the identification of the abnormal pass-through device 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 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 target pass-through device does not include 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 pass-through devices are abnormal, the offload card may also be provided with a processing module, which is used to manage and control various components, modules or devices in the computing system.

[0123] In this embodiment, when the processing module is abnormal or an abnormal pass-through device exists among the pass-through devices, the processing module may enable the target unit and provide the target unit with an identifier of the abnormal pass-through device.

[0124] In some embodiments, the processing module itself is abnormal. In the event of a processing module abnormality, the processing module can access the function call link corresponding to the processing module abnormality; a hook function mounted on the function call link is used to start the target unit to enable the target unit. Furthermore, the identifiers of all pass-through devices on the offload card can be provided to the target unit as identifiers of the abnormal pass-through device.

[0125] In other embodiments, the processing module may further perform anomaly detection on the pass-through devices to identify abnormal pass-through devices. Optionally, the anomaly detection on the pass-through devices may be implemented by the processing module sending a probe data packet to the pass-through devices. Optionally, the probe data packet may be periodically sent to the pass-through devices according to a set probe 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 has not returned 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 target unit can obtain the identification of the target direct-through device from the access request; if the identification of the abnormal direct-through device contains the identification of the target direct-through device, then the target direct-through device is determined to be abnormal; if the identification of the target direct-through device does not contain the identification of the abnormal direct-through device, then the target direct-through device is determined to be normal.

[0128] In summary, the target unit adds a judgment logic for determining whether the target pass-through device to be accessed by the access 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 the pass-through devices on the uninstall card are normal, the target unit still determines 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 directly forwards the access request to the target pass-through device when receiving an access request. If and only if the detection unit identifies an abnormal pass-through device, it notifies the target unit 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 operating in an enabled state. Specifically, when the target unit receives an access request, it can determine whether the identifier of the abnormal pass-through device includes the identifier of the target pass-through device. If the identifier of the abnormal pass-through device includes the identifier of the target pass-through device, the target pass-through device is determined to be abnormal. If the identifier of the abnormal pass-through device does not include the identifier of the target pass-through device, the target pass-through device is determined to be normal.

[0130] Furthermore, 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 packet. The target unit may then return the response packet to the first virtual instance. The first virtual instance receives the response packet and performs subsequent logical operations based on the response packet.

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

[0132] Furthermore, in step 503, the first response data packet with the data valid flag set to invalid can be returned to the first virtual instance through the programmable hardware module (specifically, the target unit in the programmable hardware module). For the above-mentioned host offload card, the communication connection is via a serial bus. In an embodiment of an RC having a serial bus provided on the host, since the target unit responds to the access request on behalf 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, i.e., the header of the first response data packet, is also provided with a message status code field. If the message status code field is set to indicate successful completion, 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 an access request on behalf of the target pass-through device under the condition that the target pass-through device is abnormal, it can generate a first response data packet for the access request with a message status code indicating successful completion and a data valid flag indicating invalid.

[0134] For an 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] Furthermore, the first response data packet can be forwarded to the RC on the host via the serial bus. On the host side, the RC can detect the message status code of the first response data packet and send the first response data packet to the first virtual instance if the message status code of the first response data packet is a successful completion indicator (such as SC).

[0136] Accordingly, in step 602, a first response data packet may be received by the first virtual instance, and information on the data valid flag of the first response data packet may be detected. If the information on the data valid flag of the first response data packet is an invalid flag, the first response data packet is a poison packet. 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, if the information on the data valid flag of the first response data packet is an invalid flag, a virtual instance exit operation may be performed on the first virtual instance in step 603 through the first virtual instance, so that the host processor execution flow enters the host side.

[0137] In the embodiments of the present disclosure, 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 invalid (such as the EP bit is 1).

[0138] In other embodiments, 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 disclosure, 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 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 a 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 (MCE). Accordingly, 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 an 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. Since the virtual instance control result pre-specifies that the MCE exception 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 aforementioned virtual instance control structure, if it is detected that the valid flag bit of the first response data packet is an invalid flag (e.g., 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. Furthermore, information about the exception bit representing the machine check exception can be obtained from the virtual instance control structure; if the information about the exception bit representing the machine check exception is an indicator that the machine check exception triggered a virtual instance exit (the exception bit representing the MCE in the Exception Bitmap field of the VMCS is 1), the first virtual instance is triggered to execute a virtual instance exit operation.

[0143] For the host, in step 604, if the first virtual instance is detected to have exited, the target virtual instance in the host's virtual instances may be stopped to prevent errors from propagating to the virtual instances. The target virtual instance includes the first virtual instance. Of course, in addition to the first virtual instance, it may also include other virtual instances deployed on the host, depending on the scope of the virtual instance exception on the host.

[0144] Specifically, the processing module may send the identifier of the abnormal passthrough device to the host. Upon detecting the exit of the first virtual instance, if the host detects that the identifier of the abnormal passthrough device includes the identifiers of all passthrough devices on the uninstall card, all virtual instances deployed on the host are determined to be target virtual instances. Accordingly, all virtual instances deployed on the host may be stopped.

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

[0146] In this embodiment, if the target pass-through device experiences an anomaly, the offload card intercepts the virtual instance's non-forwarded access request to the target pass-through device and returns a response packet to the access request, thus isolating the pass-through device from the anomaly. The response packet's data validity flag is set to an invalid flag. Based on this invalid flag, the virtual instance identifies the response packet as a corrupted packet, triggering a virtual instance exit. Upon detecting the virtual instance exit, the host can promptly terminate the virtual instance, preventing the virtual instance from consuming erroneous data and, in turn, preventing internal logic errors in the virtual instance.

[0147] It should be noted that the execution entity 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 entity of steps 401 and 402 can be device A; for another example, the execution entity of step 401 can be device A, and the execution entity of step 402 can be device B; and so on.

[0148] In addition, some of the processes described in the above embodiments and the accompanying drawings include multiple operations that appear in a specific order. However, 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. The sequence numbers of the operations, such as 401 and 402, are merely used to distinguish between different operations and do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel.

[0149] Accordingly, an embodiment of the present disclosure further 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 is a schematic diagram of the structure of an offload card provided in an embodiment of the present disclosure. As shown in Figure 7, the offload card includes a programmable hardware module 71 and at least one pass-through device 72. The offload card can be communicatively connected to a 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 flag 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 flag. Among them. The host is used to stop the operation of the target virtual instance in at least one virtual instance when it is detected that the virtual instance A has exited; the target virtual instance includes the virtual instance A.

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

[0153] The processing module 73 is configured to enable the target unit when at least one pass-through device 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 identifier of the target pass-through device from the access request, and performs an operation to determine whether the identifier of the abnormal pass-through device includes the identifier of the target pass-through device; and, if 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.

[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. Specifically, it is used to: when the processing module 73 is abnormal, enter the function call link corresponding to the processing module abnormality; 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 uninstall card as the identifiers of the abnormal pass-through devices to the target unit 71a.

[0156] In other embodiments, the processing module 73 is further configured to perform anomaly detection on the at least one pass-through device to identify an abnormal pass-through device. Accordingly, when an abnormal pass-through device is present in at least one pass-through device, the processing module 73 enables the target unit through the processing module and provides the target unit with an identifier of the abnormal pass-through device in the at least one pass-through device. Specifically, when an abnormal pass-through device is present in the pass-through devices on the uninstall card, the processing module provides the identifier of the abnormal pass-through device to the target unit through the processing module to trigger the target unit to initiate a proxy answering process, thereby enabling the target unit.

[0157] Optionally, when performing abnormality 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 a second response data packet of the probe data packet returned by at least one pass-through device is not received within a set time length, then the pass-through device that has not returned the second response data packet of the probe data packet within the set time length is determined to be an abnormal pass-through device.

[0158] In an embodiment of the present disclosure, the host and the offload card may be communicatively connected via a serial bus; a root complex of the serial bus is provided on the host;

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

[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 offload card provided in this embodiment can intercept a virtual instance's non-forwarded access request to a target pass-through device when the target pass-through device is abnormal, and return a response data packet to the access request, thereby isolating the pass-through device from abnormalities. The data validity flag in the response data packet is set to an invalid flag. Based on this invalid flag, the virtual instance can identify the response data packet as a contaminated packet, thereby triggering a virtual instance exit operation. Upon detecting a virtual instance exit, the host can promptly terminate the virtual instance, preventing the virtual instance from consuming erroneous data and, in turn, helping to prevent internal logic errors in the virtual instance.

[0162] Figure 8 is a schematic diagram of the host structure provided by an embodiment of the present disclosure. As shown in Figure 8, the host may include a memory 80a and a processor 80b. The memory is used to store computer programs; utilizing the memory and processor, at least one virtual instance is deployed on the host. The host may be communicatively connected to an 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 the first response data packet returned by the programmable hardware module through virtual instance A; in the case that the valid flag bit 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 that virtual instance A exits, stops the operation of the target virtual instance in at least one virtual instance; the target virtual instance includes virtual instance A.

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

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

[0166] In some embodiments of the present disclosure, a host is deployed with a virtual manager (not shown in FIG8 ). The virtual manager is used to manage at least one virtual instance. Processor 80 b is further configured to: during the creation of virtual instance A, set, via the virtual manager, an exception bit representing a machine check exception in the virtual instance data structure corresponding to virtual instance A as an indicator that the machine check exception triggered the virtual instance exit.

[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: determine that all virtual instances in at least one virtual instance are target virtual instances when the identification of the abnormal pass-through device includes the identification of all pass-through devices on the unload card; and determine that virtual instance A is the target virtual instance when the identification of the abnormal pass-through device includes the identification of some pass-through devices on the unload card.

[0169] In some optional embodiments, as shown in FIG8 , the host may further include components such as a communication component 80c and a power supply component 80d. In some embodiments, the host may be implemented as a terminal device such as a computer or workstation, and may further include optional components such as a display component 80e and an audio component 80f. FIG8 illustrates only some components, and does not necessarily mean that the host must include all of the components shown in FIG8 , nor does it mean that the host can only include the components shown in FIG8 .

[0170] The host provided in this embodiment is deployed with a virtual instance. When communicating with an offload card, the host can obtain a response packet returned by the offload card's programmable hardware module to an access request in the event of an abnormality in the target pass-through device. Furthermore, the host can identify the response packet as a corrupted packet based on an invalid data valid flag, thereby triggering a virtual instance exit. Upon detecting a virtual instance exit, the host can promptly terminate the virtual instance, preventing the virtual instance from consuming erroneous data and, in turn, preventing internal logic errors in the virtual instance.

[0171] In the embodiments of the present disclosure, the memory is used to store computer programs and can be configured to store various other data to support operations on the device where it is located. 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 (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0172] In the embodiments of the present disclosure, the processor may be any hardware processing device that can execute the logic of the above method. Optionally, the processor may be a central processing unit (CPU), a graphics processing unit (GPU), or a microcontroller unit (MCU); or a programmable device such as a field programmable gate array (FPGA), a programmable array logic device (PAL), a general array logic device (GAL), a complex programmable logic device (CPLD); or an advanced reduced instruction set (RISC) processor (Advanced RISC Machines, ARM) or a system on chip (SoC), etc., but is not limited thereto.

[0173] In an embodiment of the present disclosure, 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 disclosure, 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 touches, slides, 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 disclosure, 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 disclosure, the audio component may be configured to output and / or input audio signals. For example, the audio component includes a 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 voice 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 further includes a speaker for outputting an audio signal. For example, for a device with a language interaction function, voice interaction with a user may be achieved through the 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 disclosure 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 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 disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, compact disc read-only memory (CD-ROM), optical storage, etc.) containing computer-usable program code.

[0180] The present disclosure 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 disclosure. 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 produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0181] These computer program instructions may also be stored in a computer-readable memory that can direct 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 a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[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, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[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, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0185] Computer storage media is readable storage media, also known as computer-readable media. Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, 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 technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic 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 transitory computer-readable media, such as modulated data signals and carrier waves.

[0186] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, commodity, or apparatus comprising the aforementioned elements.

[0187] The above contents are merely examples of the present disclosure and are not intended to limit the present disclosure. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included within the scope of the claims of the present disclosure.

Claims

1. A computing system comprising: Host and offload cards; The host is in communication connection with the offload card; 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, wherein: 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; wherein: 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, wherein: 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, wherein: 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, wherein: Also includes: Performing abnormality detection on the at least one pass-through device by the processing module to determine the abnormal pass-through device; When there is an abnormal pass-through device in the at least one pass-through device, 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, includes: 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, wherein: 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, wherein: 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; wherein: 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, wherein: 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, wherein: 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, wherein: include: a communicatively coupled programmable hardware module and at least one pass-through device; When the offload card is in communication connection with the host, it is used to execute the steps in the method according to any one of claims 3 to 8; wherein the host is deployed with at least one virtual instance.

13. A host, wherein: 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, wherein: 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

  • Fault processing method, related device and computer storage medium

    CN109815043A

  • Information processing method, device and system

    CN113312232A

  • Server system and virtual machine creating method and device

    CN114691286A

  • Selecting Between Pass-Through and Emulation in a Virtual Machine Environment

    US20090119684A1

  • Migrating Virtual Machines Configured With Pass-Through Devices

    US20100250824A1