Computing system, virtual instance protection method, offload card, host and storage medium
By setting a target unit on the programmable hardware module of the unloading card to intercept and respond to access requests from abnormal pass-through devices, the problem of virtual instances consuming erroneous data is prevented, thus solving the internal logic error problem of virtual machines during device pass-through and achieving stable system operation.
Patent Information
- Application Number
- CN202311272280.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2043-09-27
AI Technical Summary
During device passthrough, the virtual machine's lack of awareness of abnormal passthrough devices leads to erroneous data consumption, which in turn causes internal logic errors within the virtual machine.
The target unit is set on the programmable hardware module of the offload card to intercept the virtual instance's access request to the abnormal pass-through device and return a response data packet with the data validity flag bit set to invalid, triggering the virtual instance exit operation. The host stops its operation when it detects the virtual instance exiting.
Prevent virtual instances from consuming erroneous data, avoid internal logic errors, and ensure system stability.
Smart Images

Figure CN119718730B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and particularly relates to a computing system, a virtual instance protection method, an offload card, a host and a storage medium. BACKGROUND
[0002] In the field of computers, a pass-through technology allows a physical device (such as a network adapter, a disk controller, a graphics card, etc.) to be directly assigned to a virtual machine, so that the virtual machine can directly access and control the device without passing through a virtualization layer. This pass-through mode can provide lower latency and higher performance. The physical device that can be directly accessed by the virtual machine is a pass-through device.
[0003] In a traditional scheme, when an exception occurs in the pass-through device, the virtual machine has no awareness of the exception of the pass-through device, so that the virtual machine accesses the pass-through device, and the virtual machine can obtain and consume error data, thereby causing internal logic errors of the virtual machine. SUMMARY
[0004] Aspects of the present application provide a computing system, a virtual instance protection method, an offload card, a host and a storage medium to prevent the virtual instance from consuming error data, thereby helping to prevent internal logic errors of the virtual machine.
[0005] In a first aspect, an embodiment of the present application provides a computing system, comprising: a host and an offload card; the host and the offload card are communicatively connected; the offload card comprises a programmable hardware module and at least one pass-through device communicatively connected; the programmable hardware module is provided with a target unit; the host is deployed with at least one virtual instance;
[0006] Any virtual instance of the at least one virtual instance is configured to initiate a non-forwarding access request to a target pass-through device of the at least one pass-through device;
[0007] The target unit is configured to receive the access request, generate first response data packets with an invalid identification of a data validity flag for the access request in the case of an exception of the target pass-through device, and return the first response data packets to the any virtual instance;
[0008] The any virtual instance is configured to perform a virtual instance exit operation in the case of detecting that the data validity flag of the first response data packets is the invalid identification.
[0009] The host is configured to stop a target virtual instance of the at least one virtual instance from running in the case of detecting that the any virtual instance exits; the target virtual instance comprises the any virtual instance.
[0010] In a second aspect, the embodiments of the present application further provide 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; and the method comprises:
[0011] receiving, by the programmable hardware module, an access request of a non-forwarding transaction type sent by any virtual instance of the at least one virtual instance; the access request is used to access a target pass-through device of the at least one pass-through device;
[0012] in the case of an exception of the target pass-through device, generating, for the access request, a first response data packet with an invalid identification of a data validity flag;
[0013] returning the first response data packet to the any virtual instance, so that the any virtual instance performs a virtual instance exit operation in the case of an invalid identification of a validity flag of the first response data packet;
[0014] wherein the any virtual instance triggers the host to stop a target virtual instance of the at least one virtual instance from running; and the target virtual instance comprises the any virtual instance.
[0015] In a third aspect, the embodiments of the present application further provide a virtual instance protection method, applicable to a host; the host is in communication connection with an offload card; 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; and the method comprises:
[0016] initiating, by any virtual instance of the at least one virtual instance, an access request of a non-forwarding transaction type to a target pass-through device of the at least one pass-through device; wherein the programmable hardware module receives the access request; and in the case of an exception of the target pass-through device, returning, for the access request, a first response data packet with an invalid identification of a data validity flag;
[0017] acquiring, by the any virtual instance, the first response data packet returned by the programmable hardware module;
[0018] in the case of an invalid identification of a validity flag of the first response data packet, performing, by the any virtual instance, a virtual instance exit operation on the any virtual instance;
[0019] and in the case of an exit of the any virtual instance, stopping a target virtual instance of the at least one virtual instance from running; and the target virtual instance comprises the any virtual instance.
[0020] In a fourth aspect, the embodiments of the present application further provide an offload card, comprising: a programmable hardware module and at least one pass-through device in communication connection; when the offload card is in communication connection with a host, the offload card is configured to perform the steps in the virtual instance protection method provided in the second aspect; and the host is configured to deploy at least one virtual instance.
[0021] In a fifth aspect, the embodiments of the present application further provide a host, comprising: a memory and a processor; wherein the memory is configured to store a computer program; and the memory and the processor are configured to execute the computer program, so as to perform the steps in the virtual instance protection method provided in the third aspect, when the host is in connection with an offload card.
[0022] In the fifth aspect, the offload card comprises: a programmable hardware module and at least one pass-through device in communication connection.
[0023] In the fifth aspect, the offload card comprises: a programmable hardware module and at least one pass-through device in communication connection.
[0024] In a fifth aspect, the embodiments of the present application further provide a computer readable storage medium storing computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps in the virtual instance protection method provided in the second aspect and / or the third aspect.
[0025] In the embodiments of the present application, a target unit is arranged on the programmable hardware module of the offload card. The target unit can intercept a non-forwarding type access request of a virtual instance to a target pass-through device in the case of an exception of the target pass-through device, and return a response data packet for the access request, so as to realize the exception isolation of the pass-through device. In the embodiments of the present application, a data valid flag of the response data packet is set as an invalid identifier, and the virtual instance can identify the response data packet as a pollution packet based on the invalid identifier, and then trigger a virtual instance exit operation. The host can stop the running of the virtual instance in time when detecting the virtual instance exit, so as to prevent the virtual instance from consuming error data, and then help to prevent the internal logic error of the virtual instance. BRIEF DESCRIPTION OF DRAWINGS
[0026] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, illustrate certain illustrative embodiments of the present application and together with the description serve to explain the present application. In the drawings:
[0027] Figure 1 a structural schematic diagram of a computing system provided by a traditional scheme;
[0028] Figure 2 and Figure 3 a structural schematic diagram of a computing system provided by the embodiments of the present application;
[0029] Figures 4-6 A flowchart of a virtual instance protection method provided by an embodiment of the present application is shown in FIG. 1.
[0030] Figure 7 A structural diagram of an offload card provided by an embodiment of the present application is shown in FIG. 2.
[0031] Figure 8 A structural diagram of a host provided by an embodiment of the present application is shown in FIG. 3. DETAILED DESCRIPTION
[0032] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described below in detail with reference to the embodiments of the present application and the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0033] In a computer architecture in which computing and control and network functions are separated, as shown in FIG. 1, a computing system generally includes a host 10 and an offload card 20. The host 10 and the offload card 20 are connected in communication through a Peripheral Component Interconnect Express (PCIe) bus. The host 10 is provided with a root complex (RC) 101 of the PCIe bus. The offload card 20 can be plugged into the host 10 through a PCIe interface. Figure 1
[0034] In the separated computer system, the host 10 is mainly used to implement computing functions, and the offload card 20 is used to implement control and network functions. The host 10 refers to any computer device with computing, storage and communication functions, such as a server, a computer, a workstation, etc. One or more virtual machines (VMs) 102 can be deployed on the host 10 to provide computing resources.
[0035] The offload card 20 includes a processing module 201, a Field Programmable Gate Array (FPGA) 202 and a PCIe device 203 connected in communication with the FPGA. The PCIe device 203 can be a network card or a storage medium, etc.
[0036] In the separated computer system, the host 10 is mainly used to implement computing functions, and the offload card 20 is used to implement control and network functions. The host 10 refers to any computer device with computing, storage and communication functions, such as a server, a computer, a workstation, etc. One or more virtual machines (VMs) 102 can be deployed on the host 10 to provide computing resources. Figure 1 In the illustrated computing system, the back-end device (i.e., the PCIe device 203) of the computing system is managed by a specific processing module 201. The processing module 201 forwards data to and from the host 10 through the FPGA 202. The host 10 is responsible for virtualization and is deployed with one or more virtual machines 102. The virtual machines 102 complete read and write access to the PCIe device 203 through the RC 101 of the host 10. Pass-Through technology refers to a usage mode in which a physical device (such as the PCIe device 203) on the host 10 is directly presented to a virtual machine, and the virtual machine can directly access the resources of the PCIe device 203. Using the Pass-Through mode can enable the virtual machine to obtain good Input / Output (IO) performance. When the system software of the processing module 201 or the PCIe device 203 is abnormal, the virtual machine 102 accesses the PCIe device 203 directly passed through by the virtual machine 102. Because the system software of the processing module 201 or the PCIe device 203 is abnormal, the PCIe device 203 cannot respond to the access request. Therefore, the RC 101 in the host 10 cannot receive a completion packet, causing a timer in the RC 101 to time out, triggering a completion timeout exception. After waiting for a timeout, the RC 101 returns a full-1 Transaction Layer Packet (TLP) to the virtual machine. After waiting for a timeout, the virtual machine cannot determine whether the full-1 TLP is correct, and thus consumes the full-1 data and continues to execute subsequent logic, which undoubtedly causes the virtual machine 102 to consume incorrect data and cannot guarantee the correctness of the subsequent logic executed by the virtual machine.
[0037] To solve the above technical problems, in some embodiments of the present application, a target unit is arranged on a programmable hardware module of an offload card. The target unit can intercept a non-forwarding type access request of a virtual instance to a target pass-through device in a case where the target pass-through device is abnormal, and return a response packet for the access request, thereby realizing isolation of the pass-through device in the abnormal case. The data valid flag of the response packet is set to an invalid identifier, and the virtual instance can identify the response packet as a contaminated packet based on the invalid identifier, and then trigger the virtual instance to exit the operation. The host can stop the virtual instance from running in a timely manner when detecting that the virtual instance exits, which can prevent the virtual instance from consuming incorrect data and thus help prevent internal logic errors of the virtual instance.
[0038] The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0039] It should be noted that the same reference numbers are used in the following drawings and embodiments to represent the same or similar objects, and thus once an object is defined in one drawing or embodiment, it need not be discussed further in subsequent drawings and embodiments.
[0040] Figure 2 A structural schematic diagram of a computing system is provided in the embodiments of the present application. As shown in the figure, Figure 2 the computing system can include a host 21 and an offload card 22. The host 21 is mainly used to provide computing functions and can deploy one or more virtual instances 211. The number of virtual instances 211 is two or more. The virtual instance 211 refers to a virtual server deployed on a host by using a virtual machine technology and can provide different computing services. The virtual instance 211 can be a virtual machine (VM), a container, or a container group (such as a Pod). The virtual instance 211 can also be referred to as a guest. The host operating system is responsible for allocating hardware resources among the virtual instances 211 and allowing the virtual instances 211 to be independent of each other.
[0041] The host 21 can include general-purpose processing units and memories (not shown in the figure). Figure 2 In the embodiments, the number of general-purpose processing units is not limited. The general-purpose processing unit can be at least one, that is, one or more. Each general-purpose processing unit can be a single-core processing unit or a multi-core processing unit.
[0042] In the embodiments, the general-purpose processing unit is generally a processing chip provided on the motherboard of the host 21, such as a central processing unit (CPU) of the host 21. The general-purpose processing unit 101 can be any processing device with computing capability. The general-purpose processing unit can be a serial processing unit or a parallel processing unit. For example, the general-purpose processing unit can be a general-purpose processor, such as a CPU. The parallel processing unit refers to a processing device that can perform parallel computing, such as a graphics processing unit (GPU) or an FPGA.
[0043] The offload card 22 mentioned above refers to any hardware device or component with the functions of management, communication, and storage. The offload card 22 also has the ability to process a network protocol stack. Figure 2 and Figure 3As shown, the offload card 22 can 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 can be a PCIe interface, a PCI interface, or a UPI interface, etc. Preferably, the programmable hardware module 221 and the IO device 222 are connected through a PCIe interface, which can improve 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 can also be referred to as a PCIe device.
[0044] The programmable hardware module 221 refers to a hardware processor that processes data using a hardware description language (HDL). The hardware description language can be VHDL, Verilog HDL, System Verilog, System C, etc. The programmable hardware module 221 can be an FPGA, a PAL, a GAL, a CPLD, etc. Alternatively, the programmable hardware module 221 can also be an ASIC or an SoC, etc.
[0045] The host 21 and the offload card 22 are communicatively connected. Specifically, the offload card 22 and the host 21 can be communicatively connected through 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 USB serial bus interface, an RS485 interface, or an RS232 interface, etc. Preferably, the serial bus is a PCIe bus interface, which can improve the data transmission rate between the host 21 and the offload card 22.
[0046] As shown in FIG. 2, the offload card 22 can include a plurality of programmable hardware modules 221 and a plurality of IO devices 222. The plurality of programmable hardware modules 221 and the plurality of IO devices 222 are communicatively connected. Specifically, the plurality of programmable hardware modules 221 and the plurality of IO devices 222 can be communicatively connected through a communication interface. The communication interface can be a PCIe interface, a PCI interface, or a UPI interface, etc. Preferably, the plurality of programmable hardware modules 221 and the plurality of IO devices 222 are connected through a PCIe interface, which can improve the data transmission rate between the plurality of programmable hardware modules 221 and the plurality of IO devices 222. When the plurality of programmable hardware modules 221 and the plurality of IO devices 222 are connected through a PCIe interface, the plurality of IO devices 222 can also be referred to as a plurality of PCIe devices. Figure 2 and Figure 3As shown, the host 21 is generally provided with a root complex (RC) 212 of a serial bus. The RC 213 is an interface between the general processing unit of the host and the topology bus, and represents the general processing unit to communicate with other parts of the computing system. The RC can be understood as a controller of the serial bus, which is responsible for not only managing data access of the device, but also a series of contents including access control, error handling and virtualization technology.
[0047] The bus interface of the host 21 can be expanded according to the specifications of the host 21, and the communication interface of the host 21 is generally multiple. The "multiple" in the embodiments of the present application means more than one, that is, two or more. When the offload card 22 is connected to the host 21 through the bus interface, the offload card 22 can be multiple, realizing the expansion of the offload card 22.
[0048] In the pass-through technology, the virtual instance 211 can directly access the IO device 222 mounted on the programmable hardware module 221 through the virtual manager. In the pass-through technology, the IO device 222 can also be referred to as a pass-through device. The virtual manager refers to a computer program for managing the virtual instance 211, which can be implemented as a software function module or a plug-in. The operating system of the virtual instance 221 can communicate with the hardware through the virtual manager. The virtual manager is different in different implementation forms of the virtual instance 221.
[0049] For example, in the embodiment in which the virtual instance is a container or a container group, the operating system virtualization architecture can be used to divide the single operating system of the host into multiple containers, which are managed by a container manager. Multiple means two or more.
[0050] For another example, in the embodiment in which the virtual instance is a virtual machine, the underlying hardware resources are no longer divided, but a virtual machine manager (VMM) is installed on the operating system, and the virtual layer exists as an application-level software and does not involve the operating system kernel. The virtual layer simulates a set of independent hardware devices for each virtual machine, including processor, memory, motherboard, graphics card, network card and other hardware resources, on which a client operating system is installed. Correspondingly, the virtual manager is implemented as a VMM.
[0051] In the pass-through technology, the virtual instance 211 can directly access the IO device 222 mounted on the programmable hardware module 221, so that the IO operation path of the virtual instance 211 is almost the same as the IO path in the non-virtualization environment. The IO device 222 is a pass-through device 222. The pass-through device 222 refers to the IO device mounted on the programmable hardware module 221, which can include a network card, a storage medium and the like. The storage medium can be a disk, a hard disk and the like. The number of pass-through devices 222 is one or more, which is flexibly configured according to actual needs.
[0052] In the embodiment, the programmable hardware module 221 is mainly used for data forwarding between the host 21 and the pass-through device 222. In the embodiment, the access process of each virtual instance deployed by the host 21 to each pass-through device 222 is the same, and the access process of the virtual instance to the pass-through device 222 provided by the embodiment is exemplarily described below by taking the access of any virtual instance deployed on the host 21 to any pass-through device as an example. For the convenience of description and illustration, the virtual instance used in the example is defined as a first virtual instance, and the pass-through device used in the example is defined as a target pass-through device. In the embodiment, the first virtual instance is exemplarily described as a virtual instance deployed on the host 21, and the target pass-through device is exemplarily described as a pass-through device connected to the host 21. Figure 2 and Figure 3 The first virtual instance is illustrated by a number 211a, and the target pass-through device is illustrated by a number 222a. The first virtual instance 211a is any virtual instance deployed on the host 21. The target pass-through device 222a is any pass-through device.
[0053] When the first virtual instance 211a needs to access the target pass-through device 222a, the first virtual instance 211a can initiate a non-posted access request to the target pass-through device 222a. For the embodiment in which the host 21 and the offload card 22 are connected by a PCIe bus for communication, the access request can be a TLP request.
[0054] The access request initiated by the first virtual instance 211a to the target pass-through device 222a is non-posted, mainly because the non-posted 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, including three processes of sending, receiving and feedback. For the sending end (the first virtual instance 211a), it must wait to receive the completion data packet before ending the current transaction. Therefore, in the case of an abnormal target pass-through device 222a, the abnormal target pass-through device 222a cannot respond to the access request, resulting in a completion timeout, and the first virtual instance 211a cannot end the current transaction because the first virtual instance 211a does not receive the completion data packet, which will consume the error data generated by the above-mentioned traditional scheme due to the completion timeout.
[0055] In the present application, consuming error data refers to performing logical operations based on error data. For example, performing data processing on error data; for another example, using error data to process other data, but not limited thereto.
[0056] The posted request is sent from the sending end to the receiving end, and the current transaction can be ended without waiting for the return of the completion packet. In this way, even if the target pass-through device 222a is abnormal, the sending end (the first virtual instance 211a) can end the current transaction without receiving the completion packet, and will not consume the error data generated by the completion timeout in the above-mentioned traditional scheme. Therefore, the posted access request does not have the technical problem that the subsequent execution logic of the first virtual instance is logically incorrect due to the consumption of error data. Therefore, the embodiments of the present application relate to the processing of non-posted access requests.
[0057] Whether the access request is posted or non-posted is mainly determined by the transaction type of the access request of the first virtual instance 211a to the target pass-through device 222a. Generally, if the transaction type of the access request of the first virtual instance 211a to the target pass-through device 222a is memory read (Memory Read), IO read (IO Read), IO write (IO Write), configuration read (Configuration Read) or configuration write (Configuration Write), the access request is a non-posted request. If the transaction type of the access request of the first virtual instance 211a to the target pass-through device 222a is memory write (Memory Write) or message (Message), the access request is a posted request, etc.
[0058] Since the target pass-through device 222a cannot respond to the access request in the case of target pass-through device exception, the access request completion timeout will occur, and the first virtual instance 211a receives the all-1 completion timeout packet returned by the RC 212. Since the first virtual instance 211a cannot determine whether the all-1 data of the completion timeout packet is correct data, it continues to execute subsequent operations to consume the all-1 data, resulting in that the first virtual instance 211a consumes error data, and causing the execution logic error of the first virtual instance 211a.
[0059] In the embodiments, in order to solve the technical problem, a target unit 221a is arranged on the programmable hardware module 221. The target unit 221a can be a hardware language module written by a programmable hardware language, used to intercept and forward the access request sent by the virtual instance to the pass-through device.
[0060] Specifically, the target unit 221a can receive the access request sent by the first virtual instance 211a. In the embodiments of the present application, the target pass-through device accessed by the access request is abnormal or not, and the processing logic of the target unit 221a for the access request is different. Therefore, the target unit 221a needs to determine whether the target pass-through device is abnormal.
[0061] 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 present in the identifiers of the abnormal pass-through devices, then the target pass-through device 222a is determined to be abnormal; if the identifier of the target pass-through device 222a is not present in the identifiers of the abnormal pass-through devices, then the target pass-through device 222a is determined to be normal. In the embodiments of this application, 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.
[0062] To determine which pass-through devices are malfunctioning, such as... Figure 3 As shown, the unloading card 22 may also include a processing module 223. The processing module 223 is used for the management and control of various components, modules, or devices in the computing system. For example, the processing module 223 can control the operation of the programmable hardware module 221. In the separate architecture of the computing system shown in this application, the processing module 223 can also manage the pass-through device 222. In some embodiments, the processing module 223 may also include a virtual manager to manage virtual instances.
[0063] In this embodiment, the processing module 223 may include a processor. The processor may be a CPU, FPGA, GPU, ASIC chip, or other device with processing capabilities. Generally, the computing resources of the processing module 223 are less than the computing resources provided by the host 21. The processing module 223 may also include memory and other peripheral circuits for processor operation. The memory may store the computer programs required by the processing module 223 to perform its control functions. The processor may run the computer programs to control various components, modules, or devices in the computing system.
[0064] In this embodiment, the processing module 223 can also perform anomaly detection on the through-pass device 222 to determine the abnormal through-pass device. For example... Figure 3 As shown, a detection unit 223a can be added to the processing module 223. The detection unit 223a refers to a software function module that performs anomaly detection on the through-pass device 222.
[0065] It is worth mentioning that in the embodiments of the present application, the pass-through device exception mainly refers to an exception phenomenon that the pass-through device cannot respond to the access request of the virtual instance. The pass-through device exception can be that the pass-through device itself is abnormal, resulting in the inability to respond to the access request of the virtual instance; or it can be that other devices or modules are abnormal, resulting in the inability of the pass-through device to respond to the access request of the virtual instance, which also belongs to the pass-through device exception. For example, 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 processing module 223 is abnormal, the programmable hardware module 221 and the pass-through device 222 cannot run, and the pass-through device cannot respond to the access request of the virtual instance, which also belongs to the pass-through device exception.
[0066] In the case of an abnormal processing module 223 or an abnormal pass-through device in the pass-through device 222, the processing module 223 can enable the target unit 221a; and provide the identification of the abnormal pass-through device to the target unit 221a.
[0067] In some embodiments, the processing module 223 itself is abnormal. The processing module 223 (specifically the detection unit 223a in the processing module 223) enters the function call link corresponding to the processing module exception in the case of the abnormal processing module 223; and uses the hook function mounted on the function call link to start the target unit to enable the target unit. The processing module 223 also provides the identification of all pass-through devices on the card 22 to the target unit 221a as the identification of the abnormal pass-through device.
[0068] In other embodiments, the processing module 223 (specifically the detection unit 223a in the processing module 223) can also detect the abnormality of the pass-through device 222. Specifically, the processing module 223 (specifically the detection unit 223a in the processing module 223) can send a probe data packet to the pass-through device 222 when detecting the abnormality of the pass-through device 222. Optionally, the processing module 223 (specifically the detection unit 223a in the processing module 223) can periodically send a probe data packet to the pass-through device 222 according to a set probe period.
[0069] If the response data packet of the probe data packet returned by the pass-through device 222 is not received within a set time period, the pass-through device that does not return the response data packet of the probe data packet within the set time period is determined to be an abnormal pass-through device.
[0070] Correspondingly, the processing module 223 provides the identification of the abnormal pass-through device to the target unit 221a in the case that the pass-through device 222 on the offload card is abnormal. The target unit 221a can start the call answering process in the case that the identification of the abnormal pass-through device is received, thereby enabling the target unit. The call answering process refers to a process in which the target unit intercepts the access request of the virtual machine to the abnormal pass-through device and responds to the access request.
[0071] The target unit 221a can store the identification of the abnormal pass-through device, and obtain the identification of the target pass-through device 222a from the access request when the access request is received. If the identification of the target pass-through device 222a exists in the identification of the abnormal pass-through device, it is determined that the target pass-through device 222a is abnormal. If the identification of the target pass-through device 222a does not exist in the identification of the abnormal pass-through device, it is determined that the target pass-through device 222a is not abnormal.
[0072] As can be seen, the target unit 221a adds the judgment logic of whether the target pass-through device accessed by the access request is abnormal, which undoubtedly reduces the forwarding efficiency of the access request and increases the response time of the pass-through device to the access request. If all the pass-through devices on the offload card are not abnormal, the target unit 221a 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 can be enabled by default and in a silent state. When the target unit 221a is in the silent state, the access request is directly forwarded to the target pass-through device when the access request is received. Only when the detection unit 223a identifies the abnormal pass-through device, the target unit is notified to start, and the target unit performs the operation of determining whether the target pass-through device is abnormal. For the manner of enabling the target unit, refer to the related content of the above embodiments, which will not be described here.
[0073] The target unit 221a starts working in the enabled state. That is, the target unit 221a can perform the operation of judging whether the identification of the abnormal pass-through device includes the identification of the target pass-through device when the access request is received in the enabled state. If the identification of the target pass-through device 222a exists in the identification of the abnormal pass-through device, it is determined that the target pass-through device 222a is abnormal. If the identification of the target pass-through device 222a does not exist in the identification of the abnormal pass-through device, it is determined that the target pass-through device 222a is not abnormal.
[0074] Further, if the target pass-through device 222a is normal, the target unit 221a can forward the access request to the target pass-through device 222a. The target pass-through device 222a responds to the access request and returns a response packet. Then, the response packet can be returned to the first virtual instance 211a through the target unit 221a. The first virtual instance 211a receives the response packet and performs subsequent logical operations based on the response packet.
[0075] In the embodiment, in the case that the target pass-through device 222a is abnormal, the target unit 221a can respond to the access request instead of the target pass-through device 222a. Specifically, the target unit 221a can generate a response packet with the data valid flag bit being invalid in the case that the target pass-through device 222a is abnormal. For the convenience of description and distinction, the response packet with the data valid flag bit being invalid generated by the target unit 221a for the access request is defined as a first response packet.
[0076] The data valid flag bit is a flag bit of a packet header of a packet, which is used to support error delivery. When the data contains a data payload, the data valid flag bit is used to identify whether the data payload is valid, i.e., whether the data payload is contaminated. In some embodiments, the data valid flag bit is set to 1, indicating that the data payload of the packet is invalid, i.e., contaminated. Correspondingly, the invalid identification is 1.
[0077] For the embodiment in which the access request is a TLP request, the first response packet is also a TLP, and the data valid flag bit can be an error / poisoned bit (EP bit) in the packet header of the TLP. 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., contaminated data; setting the EP bit of the first response packet to 0 indicates that the data of the first response packet is valid data. Correspondingly, for a non-forwarding type TLP request, the target unit 221a can generate a response TLP with the EP bit being 1 for the TLP request in the case that the target pass-through device 222a is abnormal.
[0078] The target unit 221a can return the first response packet with the data valid flag being invalid to the first virtual instance 211a after generating the first response packet with the data valid flag being invalid. The host 21 and the offload card 22 are connected through the serial bus. In the embodiment where the RC 212 of the host 21 is provided with the serial bus, the RC 212 can receive the first response packet before the completion timeout is triggered, and send the first response packet to the first virtual instance 211a, since the target unit 221a replies to the access request instead of the target pass-through device 222a.
[0079] According to the completion timeout mechanism, the packet header of the completion packet received by the RC 212, i.e., the packet header of the first response packet, is also provided with the packet status code field, and the RC 212 can determine that the completion packet is received without triggering the completion timeout exception, when the packet status code field is set to the success completion indication. Based on this, in some embodiments, the target unit 221a can generate, for the access request, the first response packet with the packet status code being the success completion indication and the data valid flag being invalid, when replying to the access request instead of the target pass-through device 222a under the abnormal condition of the target pass-through device 222a.
[0080] For the embodiment where the access request is the TLP request, the first response packet is also the TLP, and the success completion indication of the packet status code can be the success completion (SC).
[0081] Further, the target unit 221a can forward the first response packet to the RC 212 through the serial bus. The RC 212 can detect the packet status code of the first response packet, and send the first response packet to the first virtual instance 211a when the packet status code of the first response packet is the success completion indication (e.g., the SC).
[0082] Correspondingly, for the first virtual instance 211a, the first response packet can be received, and the information of the data valid flag of the first response packet is detected. If the information of the data valid flag of the first response packet is invalid, it indicates that the first response packet is the poison packet. In order to prevent the poison packet from being consumed and transmitting the error to the internal logic of the virtual instance, the first virtual instance 211a can perform the virtual instance exit operation when the information of the data valid flag of the first response packet is invalid.
[0083] The virtual instance exit operation refers to exiting the virtual instance from the execution flow of a processor (such as a CPU) and switching the execution flow of the processor from the virtual instance side to the host side. The execution flow of the processor is a logically independent instruction area. The execution flows are independent, and each execution flow has its own stack, its own register image and memory resources, that is, the execution flow has an independent context environment. The execution flow of the processor can include the instruction sequence currently run by the processor and the register state of the processor.
[0084] In the embodiments of the present application, the trigger condition of the virtual instance exit operation is not limited. In some embodiments, the first virtual instance 211a can trigger the virtual instance exit operation of the first virtual instance 211a when the data valid flag bit of the first response data packet is invalid (for example, the EP bit is 1).
[0085] In other embodiments, the uncorrectable error can be divided into two types: fatal error and non-fatal error. The non-fatal error usually only affects the failure of a single transaction, while the fatal error can cause the system to crash. In the embodiments of the present application, in order to prevent the error from being passed to the virtual instance content, the first virtual instance 211a can determine that the processing of the first response data packet is a fatal error when the data valid flag bit of the first response data packet is invalid (for example, 1), thereby preventing the virtual instance from consuming error data.
[0086] The host is provided with a virtual instance control structure corresponding to the virtual instance 211. The virtual instance control structure includes information of related registers of the processor of the virtual instance and related control information of the processor of the virtual instance. Each virtual instance control structure corresponds to a virtual processor. The virtual processor refers to a plurality of virtual processors (such as virtual CPUs) obtained by virtualizing a processor. For embodiments in which the virtual instance is a VM, the virtual instance control structure can be a virtual machine control structure (VMCS).
[0087] The virtual instance control structure includes a version identifier, an abort indication, and a data field. The VMCS data field includes the following information: (1) a guest-state field for saving the state information of the processor when the guest is running. When the virtual instance exits, the previous state of the processor is stored in the guest-state field; when the virtual instance enters, the processor recovers the state from the guest-state field; (2) a host-state field for saving the state of the processor when the host is running. When the virtual instance exits, the processor recovers the state from the host-state field; (3) a virtual instance entry control field for controlling the behavior of the processor when the virtual instance enters; (4) a virtual instance execution control field for controlling the conditions that trigger the virtual instance exit event when the processor is in the virtual instance running state; (5) a virtual instance exit control field for controlling the behavior of the processor when the virtual instance exits; and (6) a virtual instance exit information field for providing the reason and detailed information of the virtual instance exit event, which can be used by the virtual manager to determine how to manage and control the virtual instance.
[0088] The virtual instance execution control field includes an exception bitmap field. The exception bitmap field can be a value of a set number of bits (e.g., 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 representing the exception. If the value of the exception bit is an identifier of the exception triggering the virtual instance exit (e.g., 1), it means that the exception is specified to trigger the virtual instance exit. If the value of the exception bit is an invalid identifier (e.g., 0), it means that the exception is not specified to trigger the virtual instance exit. 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 identifier of the MCE triggering the virtual instance exit (e.g., 1), it means that the MCE is specified to trigger the virtual instance exit. The MCE is an exception triggered by the processor when a hardware error is found.
[0089] Based on this, in some embodiments of the present application, 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 as 1.
[0090] Specifically, as Figure 3As shown, the virtual manager 213 can be deployed on the host 21. The virtual manager 213 is configured to manage the virtual instances deployed on the host 21. Accordingly, the virtual manager 213 can set the exception bit corresponding to the MCE in the virtual instance data structure (e.g., the VMCS) of the virtual instance to the identifier of the MCE triggering the exit of the virtual instance during the creation of the virtual instance. For example, the virtual manager 213 can set the exception bit corresponding to the MCE in the Exception Bitmap field of the VMCS to 1 during the creation of the virtual instance. In this way, since it is predefined that the fatal error can trigger the MCE, the virtual instance can trigger the MCE upon determining that the fatal error occurs. Since it is also predefined in the control result of the virtual instance that the MCE is an exception triggering the exit of the virtual instance, the virtual instance can trigger the exit of the virtual instance upon determining that the MCE occurs.
[0091] Based on the above virtual instance control structure, the first virtual instance 211a can determine that the processing of the first response data packet is a fatal error when detecting that the valid flag bit of the first response data packet is the invalid identifier (e.g., the EP bit is 1). The first virtual instance 211a can further trigger the machine check exception (MCE). In addition, the first virtual instance 211a can obtain the information of the exception bit corresponding to the machine check exception from the virtual instance control structure, and trigger the first virtual instance to perform the exit operation of the virtual instance when the information of the exception bit corresponding to the machine check exception is the identifier of the fatal error triggering the machine check exception (e.g., the exception bit corresponding to the MCE in the Exception Bitmap field of the VMCS is 1).
[0092] For the host 21, the running of the target virtual instance in the virtual instance 211 on the host 21 can be stopped when detecting the exit of the first virtual instance, which can prevent the error from being passed to the inside of the virtual instance. The operation is performed by the CPU on the host 21 side. The running of the target virtual instance is mainly to stop the process of the target virtual instance.
[0093] The target virtual instance includes the first virtual instance. In addition to the first virtual instance, the target virtual instance can also include other virtual instances deployed on the host 21, which is determined by the exception range of the virtual instance on the host 21.
[0094] Specifically, the processing module 223 can send the identifier of the pass-through device of the exception to the host 21. The host 21 can determine that all the virtual instances deployed on the host 21 are target virtual instances when detecting the exit of the first virtual instance, and the identifier of the pass-through device of the exception includes the identifiers of all the pass-through devices on the offload card 22. Accordingly, the host 21 can stop the running of all the virtual instances deployed on the host 21.
[0095] If the identifier of the abnormal pass-through device includes the identifier of the partial pass-through device on the offload card 22, the target virtual instance is determined as the first virtual instance 211a. Accordingly, the host 21 can stop the first virtual instance 211a from running.
[0096] The virtual instance protection method provided by the embodiments of the present application will be described exemplarily in combination with a specific implementation procedure.
[0097] As shown in Figure 4 The virtual instance protection method provided by the embodiments of the present application can include the following steps.
[0098] 401. When the detection unit detects that there is an abnormal pass-through device in the pass-through device, the target unit in the programmable hardware module is enabled; the target unit is enabled.
[0099] 402. The virtual instance initiates an access request to the target pass-through device.
[0100] 403. The target unit ignores the forwarding type of the access request which does not need to be replied, and replies the first response data packet with the message status code SC and the data effective flag EP as 1 to the non-forwarding type of the access request which needs to be replied.
[0101] The target unit can determine whether the access request is of the forwarding type or the non-forwarding type according to the transaction type of the access request. The correspondence between the transaction type and the forwarding type or the non-forwarding type can be referred to the related content of the above embodiments, which will not be described 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, and further triggers the MCE. The MCE further triggers the virtual instance to exit.
[0104] 406. The host detects that the virtual instance exits and stops the running of the virtual instance.
[0105] In the embodiment of the present application, a target unit is arranged on the programmable hardware module of the offload card. The target unit can intercept the access request of the virtual instance to the target pass-through device in the case of abnormality of the target pass-through device, and return a response data packet for the access request, thereby realizing abnormality isolation of the pass-through device. The data valid flag of the response data packet is set as an invalid identifier. The virtual instance can identify the response data packet as a pollution packet based on the invalid identifier, and then trigger the virtual instance to exit the operation. The host can stop the virtual instance from running in time when detecting that the virtual instance exits, thereby preventing the virtual instance from consuming error data, and further preventing the virtual instance from having internal logic error.
[0106] The virtual instance protection method provided by the embodiment of the present application is exemplarily described below from the perspective of the offload card and the host.
[0107] Figure 5 A flowchart of another virtual instance protection method provided by the embodiment of the present application is shown. The virtual machine protection method is applicable to an offload card. The offload card includes 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. As shown in the figure, the virtual instance protection method mainly includes the following steps. Figure 5
[0108] 501. The programmable hardware module receives a non-forwarding transaction type access request sent by a first virtual instance; the access request is used to access a target pass-through device in the pass-through device on the offload card; the first virtual instance is any virtual instance of the virtual instances deployed by the host.
[0109] 502. In the case of abnormality of the target pass-through device, a first response data packet with an invalid identifier of a data valid flag is generated for the access request;
[0110] 503. The first response data packet is returned to the first virtual instance, so that the first virtual instance performs a virtual instance exit operation in the case that the valid flag of the first response data packet is the invalid identifier; wherein the first virtual instance exit triggers the host to stop the target virtual instance from running; the target virtual instance includes the first virtual instance.
[0111] Figure 6 A flowchart of still another virtual instance protection method provided by the embodiment of the present application is shown. The virtual machine protection method is applicable to a host. The host is in communication connection 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 the figure, the virtual instance protection method mainly includes the following steps. Figure 6
[0112] 601. Initiating, by the first virtual instance, an access request of a non-posted transaction type to the target pass-through device; wherein the programmable hardware module receives the access request; and in the case of an exception of the target pass-through device, returning, for the access request, a first response data packet with an invalid identification of a data valid flag.
[0113] The first virtual instance is any one of the virtual instances deployed by the host. The target pass-through device is any pass-through device on the offload card.
[0114] 602. Obtaining, by the first virtual machine, the first response data packet returned by the programmable hardware module.
[0115] 603. In the case of the invalid identification of the valid flag of the first response data packet, performing, by the first virtual instance, a virtual instance exit operation on the first virtual instance.
[0116] 604. In the case of the exit of the first virtual instance, stopping the running of a target virtual instance among the virtual instances deployed on the host; the target virtual instance includes the first virtual instance.
[0117] In the embodiment, the first virtual instance is any one of the virtual instances deployed on the host. The target pass-through device is any pass-through device on the offload card.
[0118] When the first virtual instance needs to access the target pass-through device, in step 601, the first virtual instance can initiate a non-posted access request to the target pass-through device. For the embodiment in which the host and the offload card are connected through a PCIe bus, the access request can be a TLP request. For the reason why the access request is non-posted, refer to the related content of the above embodiment, which will not be described here.
[0119] In the case of an exception of the target pass-through device, the non-posted access request cannot be responded by the abnormal target pass-through device, resulting in a completion timeout. Since the first virtual instance does not receive the completion data packet, the first virtual instance cannot end the current transaction, and will consume the error data generated by the traditional scheme due to the completion timeout.
[0120] In the embodiment, in order to solve the technical problem, for the offload card, in step 501, the programmable hardware module can receive the access request sent by the first virtual instance. Specifically, a target unit can be set on the programmable hardware module, and the target unit receives the access request sent by the first virtual instance. In the embodiment, the target unit has different processing logics for the access request depending on whether the target pass-through device accessed by the access request is abnormal. Therefore, the target unit needs to determine whether the target pass-through device is abnormal.
[0121] In some embodiments, the identifiers of the abnormal pass-through devices can be pre-stored; and the target unit can obtain the identifier of the target pass-through device from the access request; if the identifier of the target pass-through device exists in the identifiers of the abnormal pass-through devices, it is determined that the target pass-through device is abnormal; if the identifier of the target pass-through device does not exist in the identifiers of the abnormal pass-through devices, 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 can further comprise a processing module. The processing module is configured to manage and control each component, module or device in the system.
[0123] In the present embodiment, in the case that the processing module is abnormal or there is an abnormal pass-through device in the pass-through devices, the processing module can enable the target unit and provide the identifiers of the abnormal pass-through devices to the target unit.
[0124] In some embodiments, the processing module itself is abnormal. In the case that the processing module is abnormal, the processing module can enter a function call link corresponding to the abnormal processing module, and use a hook function mounted on the function call link to start the target unit to enable the target unit. Further, the identifiers of all pass-through devices on the offload card can be provided to the target unit as the identifiers of the abnormal pass-through devices.
[0125] In other embodiments, the processing module can further detect the abnormal pass-through devices in the pass-through devices to determine the abnormal pass-through devices. Alternatively, the detection of the abnormal pass-through devices can be implemented by sending a probe data packet to the pass-through devices by the processing module. Alternatively, the probe data packet can be sent to the pass-through devices periodically according to a set probe period.
[0126] If no response data packet of the probe data packet returned by the pass-through device is received within a set time period, it is determined that the pass-through device that does not return the response data packet of the probe data packet within the set time period is an abnormal pass-through device.
[0127] After the abnormal pass-through devices are determined, the processing module can send the identifiers of the abnormal pass-through devices to the target unit to trigger the target unit to start the answering process and enable the target unit. The target unit can store the identifiers of the abnormal pass-through devices. Accordingly, when the target unit receives an access request, the target unit can obtain the identifier of the target pass-through device from the access request; if the identifier of the target pass-through device exists in the identifiers of the abnormal pass-through devices, it is determined that the target pass-through device is abnormal; if the identifier of the target pass-through device does not exist in the identifiers of the abnormal pass-through devices, it is determined that the target pass-through device is normal.
[0128] In summary, the target unit adds the judgment logic of whether the target pass-through device requested by the access request is abnormal, which undoubtedly reduces the forwarding efficiency of the access request and increases the response time of the access request by the pass-through device. If all the pass-through devices on the offload card are normal, the target unit still judges whether the target pass-through device of any access request is abnormal, which is undoubtedly redundant. Based on this, in some embodiments, the target unit can be disabled by default and in a silent state. When the target unit is in the silent state, it directly forwards the access request to the target pass-through device upon receiving the access request. Only when the detection unit identifies the abnormal pass-through device, the target unit is notified to start, and the target unit performs the operation of judging whether the target pass-through device is abnormal.
[0129] When the target unit is in the enabled state, it starts to work. That is, when the target unit is in the enabled state, upon receiving the access request, it can perform the operation of judging whether the identifier of the abnormal pass-through device includes the identifier of the target pass-through device; if the identifier of the target pass-through device exists in the identifier of the abnormal pass-through device, it is determined that the target pass-through device is abnormal. If the identifier of the target pass-through device does not exist in the identifier of the abnormal pass-through device, it is determined that the target pass-through device is normal.
[0130] Further, if the target pass-through device is normal, the target unit can forward the access request to the target pass-through device. The target pass-through device responds to the access request and returns a response data packet. Then, the response data packet can be returned to the first virtual instance through the target unit. The first virtual instance receives the response data packet and performs subsequent logical operations based on the response data packet.
[0131] In this embodiment, in the case where the target pass-through device is abnormal, the target unit can respond to the access request instead of the target pass-through device. Specifically, as shown in step 502, in the case where 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 an invalid data valid flag for the access request. For the convenience of description and distinction, the response data packet with an invalid data valid flag generated for the access request is defined as a first response data packet.
[0132] Further, in step 503, the programmable hardware module (specifically, the target unit in the programmable hardware module) can return the first response data packet with an invalid data valid flag to the first virtual instance. For the above-mentioned embodiment of the host offload card connected through a serial bus communication, since the target unit responds to the access request instead of the target pass-through device, the RC can receive the first response data packet before the completion timeout, and send the first response data packet to the first virtual instance.
[0133] According to the completion timeout mechanism, the message header of the completion message received by the RC, i.e., the packet header of the first response data packet, is also provided with a message status code field, and in the case where the message status code field is set to a successful completion identifier, the RC can determine that the completion message has been received without triggering a completion timeout exception. Based on this, in some embodiments, the target unit, in the case of a target pass-through device exception, can generate, instead of the target pass-through device, a first response data packet for the access request, with a message status code being a successful completion identifier and a data valid flag being an invalid identifier.
[0134] For embodiments 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 can be SC.
[0135] Further, the first response data packet can be forwarded to the RC on the host through the serial bus. For the host side, the message status code of the first response data packet can be detected by the RC, and in the case where the message status code of the first response data packet is a successful completion identifier (such as SC), the first response data packet can be sent to the first virtual instance.
[0136] Correspondingly, in step 602, the first response data packet can be received by the first virtual instance, and the information of the data valid flag of the first response data packet can be detected. If the information of the data valid flag of the first response data packet is an invalid identifier, it means that the first response data packet is a poison packet. In order to prevent the poison packet from being consumed and thus transmitting errors to the internal logic of the virtual instance, in the case where the information of the data valid flag of the first response data packet is an invalid identifier, the first virtual instance can perform a virtual instance exit operation on the first virtual instance in step 603, so that the processor execution flow of the host enters the host side.
[0137] In the embodiments of the present application, the specific implementation form of the trigger condition of the virtual instance exit operation performed by the virtual instance is not limited. In some embodiments, the first virtual instance can be triggered to perform a virtual instance exit operation in the case where the data valid flag of the first response data packet is an invalid identifier (such as EP bit being 1).
[0138] In some embodiments, the uncorrectable error can be classified into two types: fatal error and non-fatal error. The non-fatal error usually only affects the failure of a single transaction, while the fatal error can cause the system to crash. In the embodiments of the present application, in order to prevent the error from being passed to the virtual instance content, when it is detected that the data valid flag of the first response data packet is invalid (e.g., 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 error data.
[0139] The host is provided with a virtual instance control structure corresponding to the virtual instance. The description of the virtual instance control structure can be referred to the related content of the system embodiments described above, which will not be repeated here. The virtual instance control structure includes an Exception Bitmap field. In the embodiments, the Exception Bitmap field includes an exception bit representing a machine check exception (MCE). Accordingly, if the value of the exception bit is an identifier of MCE triggering the virtual instance to exit, i.e., valid, such as 1, it means that the occurrence of MCE is specified, triggering the virtual instance to exit. MCE is an exception triggered when the processor discovers a hardware error.
[0140] Accordingly, the exception bit representing MCE in the virtual instance data structure can be pre-set as an identifier of MCE triggering the virtual instance to exit, such as setting the exception bit representing 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 the virtual instance deployed on the host. Accordingly, in the virtual instance creation process, the virtual manager can set the exception bit representing MCE in the virtual instance data structure (e.g., VMCS) corresponding to the virtual instance to an identifier of MCE triggering the virtual instance to exit. In this way, since it is specified in advance that the fatal error can trigger MCE, the virtual instance can trigger MCE when it is determined that a fatal error occurs. Since it is specified in advance in the virtual instance control result that the MCE exception will trigger the virtual instance to exit, the virtual instance will trigger the virtual instance to exit when it is determined that MCE occurs.
[0142] Based on the virtual instance control structure, in a case that the valid flag of the first response data packet is detected as the invalid identification (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. Further, information of an exception bit representing the machine check exception can be obtained from the virtual instance control structure; in a case that the information of the exception bit representing the machine check exception is an identification that the machine check exception triggers the virtual instance to exit (the exception bit representing the MCE in the Exception Bitmap field of the VMCS is 1), the first virtual instance is triggered to perform a virtual instance exit operation.
[0143] For the host, in a case that the first virtual instance is detected to exit, the running of a target virtual instance in the virtual instances on the host can be stopped, which can prevent the error from being passed to the virtual instance. The target virtual instance includes the first virtual instance. Of course, in addition to the first virtual instance, other virtual instances deployed on the host can also be included, which is determined by the exception range of the virtual instances on the host.
[0144] Specifically, the processing module can send the identification of the exception pass-through device to the host. In a case that the first virtual instance is detected to exit, if the identification of the exception pass-through device includes the identification of all pass-through devices on the offload card, it is determined that all virtual instances deployed on the host are target virtual instances. Accordingly, the running of all virtual instances deployed on the host can be stopped.
[0145] If the identification of the exception pass-through device includes the identification of part of the pass-through devices on the offload card, it is determined that the target virtual instance is the first virtual instance. Accordingly, the running of the first virtual instance can be stopped.
[0146] In this embodiment, in a case that the target pass-through device is abnormal, the offload card can intercept a non-forwarding access request of a virtual instance to the target pass-through device, and return a response data packet for the access request, realizing the abnormal isolation of the pass-through device. The data valid flag of the response data packet is set as an invalid identification, and the virtual instance can identify the response data packet as a pollution packet based on the invalid identification, and then trigger a virtual instance exit operation. The host can stop the running of the virtual instance in time when the virtual instance exits, which can prevent the virtual instance from consuming error data, and thus helps to prevent the internal logic error of the virtual instance.
[0147] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can also be executed by different devices as the execution subject. For example, the execution subject of steps 401 and 402 can be device A; for another example, the execution subject of step 401 can be device A, and the execution subject of step 402 can be device B; and the like.
[0148] In addition, in some of the processes described in the above embodiments and the accompanying drawings, a plurality of operations are included in a specific order, but it should be clear that the operations can be executed in the order in which they appear in this document or in parallel, and the serial numbers of the operations, such as 401, 402, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes can include more or fewer operations, and the operations can be executed in sequence or in parallel.
[0149] Accordingly, the embodiments of the present application also provide a computer readable storage medium storing computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the virtual instance protection method provided by the above embodiments.
[0150] Figure 7 The structure of the offload card provided by the embodiments of the present application is shown in the figure. As shown in the figure, the offload card includes a programmable hardware module 71 and at least one pass-through device 72 connected in communication. The offload card can be connected in communication with a host. The host is deployed with at least one virtual instance. Figure 7
[0151] In the present embodiment, the programmable hardware module 71 is provided with a target unit 71a. Among them, any virtual instance A in 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. The target unit 71a is used to receive the access request; in the case of an exception of the target pass-through device, generate a first response data packet with an invalid identification of a data valid flag bit for the access request; and return the first response data packet to the virtual instance A, so that the virtual instance A executes a virtual instance exit operation in the case of detecting that the data valid flag bit of the first response data packet is invalid. Among them. The host is used to stop the target virtual instance in the at least one virtual instance from running in the case of detecting that the virtual instance A exits; the target virtual instance includes the virtual instance A.
[0152] In some embodiments, the offload card further includes a processing module 73. The processing module 73 is used to control the running of the programmable hardware module 71.
[0153] The processing module 73 is used to enable the target unit in the case of an abnormal pass-through device or a processing module in the at least one pass-through device, and provide the target unit 71a with the identification of the abnormal pass-through device.
[0154] The target unit 71a is in an enabled state, obtains the identification of the target pass-through device from the access request, performs an operation of judging whether the identification of the abnormal pass-through device includes the identification of the target pass-through device, and determines that the target pass-through device is abnormal in a case where the identification of the abnormal pass-through device includes the identification of the target pass-through device.
[0155] Optionally, the processing module 73 is configured to, in a case where the processing module is abnormal, enable the target unit by the processing module and provide the identification of the abnormal pass-through device in the at least one pass-through device to the target unit, and specifically configured to, in a case where the processing module 73 is abnormal, enter a function call link corresponding to the processing module abnormality, start the target unit by using a hook function mounted on the function call link to enable the target unit, and provide the identification of all pass-through devices on the offload card as the identification of the abnormal pass-through device to the target unit 71a.
[0156] In some other embodiments, the processing module 73 is further configured to perform abnormality detection on the at least one pass-through device to determine the abnormal pass-through device. Correspondingly, the processing module 73 is configured to, in a case where the at least one pass-through device includes the abnormal pass-through device, enable the target unit by the processing module and provide the identification of the abnormal pass-through device in the at least one pass-through device to the target unit, and specifically configured to, in a case where the pass-through device on the offload card includes the abnormal pass-through device, provide the identification of the abnormal pass-through device to the target unit by the processing module to trigger the target unit to start the answering process to enable the target unit.
[0157] Optionally, the processing module 73 is configured to, in the abnormality detection on the at least one pass-through device, specifically configured to: send a probe data packet to the at least one pass-through device; and determine the pass-through device that does not return the second response data packet of the probe data packet within a set time length as the abnormal pass-through device if the second response data packet of the probe data packet returned by the at least one pass-through device is not received within the set time length.
[0158] In the embodiments of the present application, the host and the offload card can be connected through a serial bus communication; the root complex of the serial bus is arranged on the host;
[0159] The target unit 71a is configured to, in generating the first response data packet with the invalid identification of the data valid flag bit for the access request, specifically configured to: generate the first response data packet with the success completion identification of the message status code and the invalid identification of the data valid flag bit for the access request. Correspondingly, the target unit is configured to, in returning the first response data packet to the virtual instance A, specifically configured to: forward the first response data packet to the root complex through the serial bus, so that the root complex sends the first response data packet to the virtual instance A in a case where the message status code of the first response data packet is detected as the success completion identification.
[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 determines a target virtual instance according to the identifier of the abnormal pass-through device.
[0161] The offload card provided by the embodiment can intercept a non-forwarding access request of a virtual instance to a target pass-through device in the case of abnormality of the target pass-through device, and return a response data packet for the access request, thereby realizing abnormality isolation of the pass-through device. The data valid flag bit of the response data packet is set as an invalid identifier. In this way, the virtual instance can identify the response data packet as a pollution packet based on the invalid identifier, and then trigger a virtual instance exit operation. The host can stop running of the virtual instance in time when detecting the virtual instance exit, which can prevent the virtual instance from consuming error data, thereby helping to prevent internal logic errors of the virtual instance.
[0162] Figure 8 A structural diagram of the host provided by the embodiment of the application is shown in FIG. 1. As shown in FIG. 1, the host can include a memory 80a and a processor 80b. The memory is configured to store a computer program. The host is configured to deploy at least one virtual instance by using the memory and the processor. The host can be in communication connection with an offload card. The offload card can include a programmable hardware module and at least one pass-through device in communication connection. Figure 8
[0163] When the host is connected with the offload card, the processor 80b is coupled to the memory 80a and configured to execute the computer program, so as to: initiate, by any virtual instance A in 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; the programmable hardware module receives the access request; in the case of abnormality of the target pass-through device, return, for the access request, a first response data packet with an invalid identifier of a data valid flag bit; acquire, by the virtual instance A, the first response data packet returned by the programmable hardware module; in the case that the valid flag bit of the first response data packet is the invalid identifier, perform, by the virtual instance A, a virtual instance exit operation on the virtual instance A; and in the case that the virtual instance A exits, stop running of a target virtual instance in the at least one virtual instance; the target virtual instance includes the virtual instance A.
[0164] In some embodiments, the host and the offloading card are connected via a serial bus; the host is provided with a root complex of the serial bus; wherein, in response to an access request, the programmable hardware module generates a first response data packet with a message status code indicating successful completion and a data validity flag set to invalid. Accordingly, when the processor 80b obtains the first response data packet of the programmable hardware unit module through any virtual machine, it is specifically configured to: detect the message status code of the first response data packet through the root complex, and if the message status code of the first response data packet is detected to be successful completion, send the first response data packet to virtual instance A; and obtain the first response data packet through any virtual machine.
[0165] In some embodiments, the host's memory stores a virtual instance control structure corresponding to virtual instance A; the exception bit in the virtual instance data structure representing a Machine Check Error (MCE) is pre-set as an identifier that triggers virtual instance exit when a Machine Check Error (MCE) occurs. Accordingly, when processor 80b performs a virtual instance exit operation through any virtual machine, it is specifically configured to: detect the validity flag bit of the first response data packet through virtual instance A; if the validity flag bit of the first response data packet is detected to be invalid, determine that the processing of the first response data packet is a fatal error and trigger an MCE; obtain information about the exception bit representing a Machine Check Error from the virtual instance control structure; and if the information about the exception bit representing an MCE is an identifier that triggers virtual instance exit, trigger virtual instance A to perform a virtual instance exit operation.
[0166] In some embodiments of this application, the host is equipped with a virtual manager ( Figure 8 (Not shown in the image). The virtual manager is used to manage at least one virtual instance. The processor 80b is also used to: during the creation of virtual instance A, set the exception bit in the virtual instance data structure corresponding to virtual instance A, which represents a machine check exception, to an identifier that triggers the virtual instance to exit due to a machine check exception, through the virtual manager.
[0167] In some embodiments, the processor 80b is further configured to: obtain the identifier of an abnormal pass-through device provided by the unloading card; and determine a target virtual instance from at least one virtual instance based on the identifier of the abnormal pass-through device.
[0168] Optionally, the processor 80b is further configured to: determine all virtual instances in at least one virtual instance as the target virtual instance if the identifier of the abnormal pass-through device includes the identifiers of all pass-through devices on the offload card; and determine virtual instance A as the target virtual instance if the identifier of the abnormal pass-through device includes the identifiers of some pass-through devices on the offload card.
[0169] In some alternative implementations, such as Figure 8As shown, the host can further include components such as a communication component 80c and a power supply component 80d. In some embodiments, the host can be implemented as a terminal device such as a computer or a workstation, and can further include optional components such as a display component 80e and an audio component 80f. Figure 8 The partial components shown are merely illustrative and do not mean that the host must include Figure 8 all the components shown, nor that the host can only include Figure 8 the components shown.
[0170] The host provided by the embodiment is deployed with a virtual instance, and when in communication connection with the offload card, the host can acquire a response data packet returned by the programmable hardware module of the offload card in the case of an exception of the target pass-through device to the access request. Further, the response data packet can be identified as a pollution packet based on the invalid identification of the data valid flag of the response data packet, and the virtual instance is triggered to exit. The host can stop the running of the virtual instance in time when detecting the exit of the virtual instance, which can prevent the virtual instance from consuming error data, and further help to prevent the internal logic error of the virtual instance.
[0171] In the embodiment of the present application, the memory is used to store the computer program and can be configured to store other various data to support the operation on the device where it is located. Among them, the processor can execute the computer program stored in the memory to realize the corresponding control logic. The memory can be realized by any type of volatile or non-volatile storage device or their combination, 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 application, the processor can be any hardware processing device that can execute the logic of the above method. Optionally, the processor can be a central processing unit (CPU), a graphics processing unit (GPU), or a microcontroller unit (MCU); it can also be a programmable device such as a field-programmable gate array (FPGA), a programmable array logic (PAL), a general array logic (GAL), a complex programmable logic device (CPLD), etc.; or an advanced reduced instruction set compute (RISC) processor (Advanced RISC Machines, ARM) or a system on chip (SoC), etc., but is not limited thereto.
[0173] In the embodiments of the present application, the communication component is configured to facilitate wired or wireless communication between the device where it is located and other devices. The device where 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 example embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component can also be implemented 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 the embodiments of the present application, the display component can include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the display component includes a touch panel, the display component can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touch or a slide action, but also detect a duration and a pressure associated with a touch or a slide operation.
[0175] In the embodiments of the present application, the power supply component is configured to provide power to various components of the device in which the power supply component is located. The power supply component can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device in which the power supply component is located.
[0176] In the embodiments of the present application, the audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive an external audio signal when the device in which the audio component is located is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory or transmitted via the communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals. For example, for a device with a language interaction function, voice interaction with a user can be implemented through the audio component, etc.
[0177] It should be noted that the "first", "second", etc. described herein are used to distinguish different messages, devices, modules, etc., and do not represent the order of sequence, nor do they limit the "first" and "second" to be 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 for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.
[0179] Those skilled in the art will appreciate that embodiments of the application can be readily used as a method, a system or a computer program product. Accordingly, the application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, magnetic disks under a server, a ROM, a RAM, or the like) embodying computer program code.
[0180] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing device or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0181] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0182] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0183] In one typical configuration, the computing device includes one or more processors (CPU's), input / output interfaces, network interfaces, and memory.
[0184] The memory can include non-persistent memory in a computer-readable medium, such as a volatile random-access memory (RAM) and / or non-volatile memory, e.g., read-only memory (ROM) or flash memory. The memory is an example of computer-readable media.
[0185] The storage media of the computer is a readable storage medium, which can also be referred to as a readable medium. The readable storage medium includes permanent and non-permanent, removable and non-removable media, which can realize information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of the storage media of the computer 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 video disc (DVD) or other optical storage, magnetic cassette, disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition herein, the computer-readable medium does not include transitory media, such as modulated data signals and carriers.
[0186] It should also be noted that the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of another identical element in the process, method, article or device including the above element.
[0187] The above is only an embodiment of the present application and is not intended to limit the present application. The present application can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.
Claims
1. A computing system, comprising: The method comprises the following steps: 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 which are communicatively connected; the programmable hardware module is provided with a target unit; the host is deployed with at least one virtual instance; any virtual instance in the at least one virtual instance is configured to initiate a non- forwarding access request to a target pass-through device in the at least one pass-through device; the target unit is configured to receive the access request, generate first response data packets with an invalid identification of a data validity flag for the access request in the case of an exception of the target pass-through device, and return the first response data packets to the any virtual instance; the any virtual instance is configured to perform a virtual instance exit operation in the case of detecting that the first response data packets have the invalid identification of the data validity flag; the host is configured to stop a target virtual instance in the at least one virtual instance from running in the case of detecting that the any virtual instance exits; the target virtual instance comprises the any virtual instance.
2. The system of claim 1, wherein, The offload card further comprises a processing module; the processing module is configured to control the running of the programmable hardware module; the processing module is configured to enable the target unit in the case of an abnormal pass-through device existing in the at least one pass-through device, and send an identification of the abnormal pass-through device to the target unit; the target unit in the enabled state acquires the identification of the target pass-through device from the access request, performs an operation of judging whether the identification of the abnormal pass-through device comprises the identification of the target pass-through device, and determines that the target pass-through device is abnormal in the case of the identification of the abnormal pass-through device comprising the identification of the target pass-through device.
3. A virtual instance protection method, applicable to an offload card; characterized in that, The offload card comprises a programmable hardware module and at least one pass-through device which are communicatively connected; the offload card is communicatively connected with a host; the host is deployed with at least one virtual instance; the method comprises the following steps: receiving, by the programmable hardware module, a non- forwarding transaction type access request sent by any virtual instance in the at least one virtual instance; the access request is used to access a target pass-through device in the at least one pass-through device; generating first response data packets with an invalid identification of a data validity flag for the access request in the case of the target pass-through device being abnormal; returning the first response data packets to the any virtual instance, so that the any virtual instance performs a virtual instance exit operation in the case of the valid flag of the first response data packets being the invalid identification; wherein, the exit of the any virtual instance triggers the host to stop a target virtual instance in the at least one virtual instance from running; the target virtual instance comprises the any virtual instance.
4. The method of claim 3, wherein, The offload card further comprises a processing module; the programmable hardware module is provided with a target unit; the method further comprises the following steps: In a case that the at least one pass-through device has an abnormal pass-through device or the processing module is abnormal, enabling the target unit by the processing module and providing the target unit with an identification of the abnormal pass-through device in the at least one pass-through device; In a case that the target unit is in an enabled state, obtaining, by the target unit, the identification of the target pass-through device from the access request; and in a case that the identification of the abnormal pass-through device includes the identification of the target pass-through device, determining that the target pass-through device is abnormal.
5. The method of claim 4, wherein, The determining, by the processing module, of the abnormal pass-through device comprises: In a case that the processing module is abnormal, enabling the target unit by the processing module and providing the target unit with the identification of the abnormal pass-through device in the at least one pass-through device comprises: In a case that the processing module is abnormal, entering a function call link corresponding to the processing module being abnormal; starting the target unit by using a hook function mounted on the function call link to enable the target unit; Providing, to the target unit, the identification of all pass-through devices in the at least one pass-through device as the identification of the abnormal pass-through device.
6. The method of claim 4, wherein, Further comprising: The processing module performs abnormality detection on the at least one pass-through device to determine the abnormal pass-through device; and in a case that the at least one pass-through device has an abnormal pass-through device, the processing module enables the target unit and provides the target unit with the identification of the abnormal pass-through device in the at least one pass-through device. In a case that the at least one pass-through device has an abnormal pass-through device, the processing module provides the identification of the abnormal pass-through device to the target unit to trigger the target unit to start an answering process to enable the target unit.
7. The method of claim 6, wherein, The processing module performs abnormality detection on the at least one pass-through device to determine the abnormal pass-through device, comprising: The processing module sends a probe data packet to the at least one pass-through device; If a second response data packet of the probe data packet is not received from the at least one pass-through device within a set time period, a pass-through device that does not return the second response data packet of the probe data packet within the set time period is determined to be an abnormal pass-through device.
8. The method according to any one of claims 3-7, characterized in that, The host and the offload card are connected through a serial bus; a root complex of the serial bus is arranged on the host; The generating, for the access request, of the first response data packet with the data valid flag set to the invalid identification comprises: The programmable hardware module generates, for the access request, the first response data packet with the message status code set to successful completion and the data valid flag set to the invalid identification; The returning of the first response data packet to the any virtual instance comprises: 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 the any virtual instance in a case that the message status code of the first response data packet is successful completion. 9.A virtual instance protection method, applicable to a host, characterized in that, 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: initiating, by any virtual instance of the at least one virtual instance, an access request of a non-forwarding transaction type to a target pass-through device of the at least one pass-through device; wherein the programmable hardware module receives the access request; in the case of an exception of the target pass-through device, returning, for the access request, a first response data packet with an invalid identification of a data validity flag bit; acquiring, by the any virtual instance, the first response data packet returned by the programmable hardware module; in the case of the invalid identification of the data validity flag bit of the first response data packet, performing, by the any virtual instance, a virtual instance exit operation on the any virtual instance; and, in the case of the exit of the any virtual instance, stopping a target virtual instance of the at least one virtual instance from running; the target virtual instance comprises the any virtual instance.
10. The method of claim 9, wherein, The host and the offload card are in communication connection through a serial bus; a root complex of the serial bus is arranged on the host; wherein the programmable hardware module generates, for the access request, a first response data packet with a successful completion of a message status code and an invalid identification of a data validity flag bit; The acquiring, by the any virtual instance, of the first response data packet of the programmable hardware module comprises: detecting, by the root complex, the message status code of the first response data packet, and in the case of detecting that the message status code of the first response data packet is successfully completed, sending the first response data packet to the any virtual instance; acquiring, by the any virtual instance, the first response data packet.
11. The method according to claim 9 or 10, characterized in that, The memory of the host stores a virtual instance control structure corresponding to the any virtual instance; an exception bit representing a machine check exception in the virtual instance data structure is pre-set as an identification of triggering a virtual instance exit by a machine check exception; The performing, by the any virtual instance, of a virtual instance exit operation in the case of the invalid identification of the data validity flag bit of the first response data packet comprises: detecting, by the any virtual instance, the data validity flag bit of the first response data packet; in the case of detecting that the data validity flag bit of the first response data packet is the invalid identification, determining that the processing of the first response data packet is a fatal error, and triggering a machine check exception; acquiring, from the virtual instance control structure, information of the exception bit representing the machine check exception; and, in the case of the information of the exception bit representing the machine check exception being the identification of triggering a virtual instance exit by a machine check exception, triggering the any virtual instance to perform the virtual instance exit operation.
12. An offload card, comprising: comprises: a programmable hardware module and at least one pass-through device in communication connection; when the offload card is in communication connection with a host, the offload card is configured to perform the steps in the method of any one of claims 3-8; wherein the host is deployed with at least one virtual instance.
13. A host, characterized by comprises: a memory and a processor; wherein the memory is configured to store a computer program; and wherein the memory and the processor are configured to execute the computer program for performing the steps of the method of any one of claims 9-11, when the host is connected with the offload card. wherein the processor is coupled to the memory for executing the computer program for performing the steps of the method of any one of claims 9-11, when the host is connected with the offload card. wherein the offload card comprises a programmable hardware module and at least one pass-through device.
14. A computer readable storage medium having stored thereon computer instructions, wherein, The computer program product, when executed by one or more processors, causes the one or more processors to perform the steps of the method of any one of claims 3-11.
Citation Information
Patent Citations
NVMeoF computing node virtualization method based on intermediary unvarnished transmission
CN116418857A
Techniques for switching device implementations for virtual devices
US20230176884A1