PCI device fault processing method and device, and fault processing system

By detecting the PCI device type on the PCI bridge link and performing corresponding troubleshooting, the problem of inaccurate PCI device troubleshooting is solved and the stability and performance of the server are improved.

CN118245269BActive Publication Date: 2024-09-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410671171.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-09-17
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

The existing technology cannot accurately determine PCI device faults, resulting in the inability to accurately handle the faults and affecting the stability and performance of the server.

Method used

By detecting the PCI device on the PCI bridge link, determine its type, start the corresponding fault processing function or set the fault threshold according to the type, and adjust the transmission rate to handle the fault.

Benefits of technology

Improves the accuracy and efficiency of PCI device troubleshooting, ensuring stable operation and performance optimization of the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118245269B
    Figure CN118245269B
Patent Text Reader

Abstract

The embodiment of the present application provides a method and apparatus for handling a PCI device fault, and a fault handling system, the method comprising: detecting a PCI device connected to a PCI bridge link; determining a fault handling method for the PCI device according to the detected PCI device, and handling the PCI device fault according to the fault handling method; wherein, when the PCI device connected to the PCI bridge link is only an EP device, the fault handling function of the EP device is started; when the PCI device connected to the PCI bridge link includes a PCI Switch device, the fault threshold of the PCI Switch device is set, and the transmission rate of the PCI bridge link is adjusted based on the fault threshold. Through the present application, the problem that the PCI device that fails cannot be accurately determined in the related art, so that the accurate fault handling method cannot be determined, is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the server field, and more specifically, to a PCI device fault handling method and apparatus, and a fault handling system. Background Art

[0002] The components that servers of any architecture support and must support include basic core modules such as memory and bus (Peripheral Component Interconnect, referred to as PCI) devices. The core of using the server is to connect external PCI devices through the PCI bus. Traditional PCI devices include PCI interface network cards, storage media cards, acceleration cards, graphics processing units (Graphics Processing Unit, referred to as GPU) cards and other components. No matter what kind of component it is, it needs to follow the standard requirements of its supported protocol, and PCI devices also need to follow the PCI bus protocol standard. However, due to the high speed of the PCI bus, the current maximum speed can support 32GT / s. Once the PCI bus protocol fails, it will cause serious and fatal problems such as PCI device loss and server system downtime. PCI link failures are divided into multiple error types. At the same time, the PCI link can support multiple devices. The relevant technology cannot accurately locate which device on the PCI link has what kind of failure problem, so it is impossible to accurately handle the failure. Summary of the invention

[0003] The embodiments of the present application provide a PCI device fault handling method and apparatus, and a fault handling system to at least solve the problem in the related art that the faulty PCI device cannot be accurately determined, and thus the accurate fault handling method cannot be determined.

[0004] According to an embodiment of the present application, a fault handling method for a PCI device is provided, which is applied to a fault handling system, wherein the fault handling system is arranged on a mainboard of a server, and the fault handling system is connected to a PCI bridge link deployed in the server, and the method comprises: detecting a PCI device connected to the PCI bridge link, wherein the PCI device comprises an EP device and / or a PCI Switch device, and a plurality of the EP devices are allowed to be connected to the PCI Switch device; determining a fault handling method for the PCI device according to the detected PCI device, and handling the fault of the PCI device according to the fault handling method; wherein, in the case that the PCI device connected to the PCI bridge link is only the EP device, starting a fault handling function of the EP device, the fault handling function is a function arranged in the EP device, and the fault handling function is used to handle the fault of the EP device; in the case that the PCI device connected to the PCI bridge link comprises the PCI Switch device, setting the PCI The fault threshold of the Switch device is set, and the transmission rate of the PCI bridge link is adjusted based on the fault threshold. The fault threshold is used to represent the threshold for recording the number of failures of the PCISwitch device. The fault handling method includes the fault handling function and the method for setting the fault threshold of the PCISwitch device.

[0005] In an exemplary embodiment, when the PCI device connected to the PCI bridge link is only the EP device, starting the fault handling function of the EP device includes: when the PCI device connected to the PCI bridge link is only the EP device, setting the AER function of the EP device to an enabled state or a started state to start the fault handling function of the EP device, wherein the AER function includes the fault handling function.

[0006] In an exemplary embodiment, when the PCI device connected to the PCI bridge link is only the EP device, after starting the fault handling function of the EP device, the method further includes: monitoring a first fault event of the EP device, wherein the first fault event includes at least one of the following: a first fault event that allows repair, a first fault event that does not allow repair, a first fault event that causes the EP device to be unable to operate, and a first fault event that allows the EP device to continue to operate; when the first fault event is monitored, reporting the first fault event to the target operating system and the baseboard management controller in the server;

[0007] Among them, the above-mentioned target operating system is used to perform one of the following operations based on the above-mentioned first fault event: restart the above-mentioned server, perform a self-check operation, and generate a fault prompt message; the above-mentioned baseboard management controller is used to perform at least one of the following operations based on the above-mentioned first fault event: record the above-mentioned first fault event, perform a troubleshooting operation, and repair the above-mentioned first fault event.

[0008] In an exemplary embodiment, when the PCI device connected to the PCI bridge link includes the PCISwitch device, setting the fault threshold of the PCI Switch device includes: when the PCI device connected to the PCI bridge link includes the PCI Switch device, determining a target register set in the PCI Switch device, wherein the target register is used to record the number of failures of the PCI Switch device; and setting the fault threshold of the target register according to preset conditions.

[0009] In an exemplary embodiment, the PCI device connected to the PCI bridge link includes the PCISwitch device, including one of the following: the PCI device connected to the PCI bridge link is only the PCI Switch device; the PCI device connected to the PCI bridge link is only the PCI Switch device, and one or more EP devices are connected to the PCI Switch device; the PCI device connected to the PCI bridge link includes the PCISwitch device and the EP device, and the PCI Switch device is connected to the first processor in the server, and the EP device is connected to the second processor in the server; the PCI device connected to the PCI bridge link includes the PCI Switch device and the EP device, and the PCI Switch device is connected to the first processor in the server, one or more other EP devices are connected to the PCI Switch device, and the EP device is connected to the second processor in the server.

[0010] In an exemplary embodiment, the fault threshold of the target register is set according to a preset condition, including: setting the fault threshold of the target register according to the preset condition and through at least one of the following operations: determining operation information of the PCI Switch device, and setting the fault threshold based on the operation information, wherein the operation information includes at least one of the following: operation environment, operation performance, operation safety performance, and operation stability performance; determining a first number of the PCI Switch devices, and a second number of the EP devices connected to the PCI Switch device, and setting the fault threshold based on the first number and the second number.

[0011] In an exemplary embodiment, after setting the above-mentioned fault threshold of the above-mentioned target register according to preset conditions, the above-mentioned method further includes: detecting the above-mentioned PCI Switch device and one or more EP devices connected to the above-mentioned PCI Switch device; when the above-mentioned PCI Switch device fails or any of the above-mentioned EP devices connected to the above-mentioned PCI Switch device fails, triggering the counter in the above-mentioned target register to perform a fault accumulation operation, wherein the above-mentioned fault accumulation operation is used to accumulate the number of times the above-mentioned PCI Switch device fails.

[0012] In an exemplary embodiment, when the PCI device connected to the PCI bridge link includes the PCISwitch device, before setting the fault threshold of the PCI Switch device, the method further includes one of the following: when one or more EP devices are connected to the PCI Switch device, a fault handling function of the EP device is enabled, and a result of the fault handling by the EP device according to the fault handling function is received through the PCI Switch device; when the PCI Switch device is connected to the first processor in the server and the EP device is connected to the second processor in the server, the fault handling function of the EP device is disabled; when the PCI Switch device is connected to the first processor in the server and one or more other EP devices are connected to the PCI Switch device and the EP device is connected to the second processor in the server, the fault handling function of the EP device is disabled, other fault handling functions of the other EP devices are enabled, and the result of the fault handling by the other EP devices according to the other fault handling functions is received through the PCI Switch device.

[0013] In an exemplary embodiment, the transmission rate of the PCI bridge link is adjusted based on the fault threshold, including: when the accumulated first number of failures of the PCI bridge link is greater than or equal to the fault threshold, triggering adjustment of the transmission rate of the PCI bridge link to obtain a first adjusted transmission rate.

[0014] In an exemplary embodiment, when the accumulated first failure number of the above-mentioned PCI bridge link is greater than or equal to the above-mentioned failure threshold, the transmission rate of the above-mentioned PCI bridge link is triggered to adjust to obtain the first adjusted transmission rate, including at least one of the following: when the above-mentioned first failure number is greater than or equal to the above-mentioned failure threshold, the transmission rate of the above-mentioned PCI Switch device is triggered to obtain the above-mentioned first adjusted transmission rate; when the above-mentioned first failure number is greater than or equal to the above-mentioned failure threshold, the transmission rate of one or more of the above-mentioned EP devices connected in the above-mentioned PCI Switch device is triggered to adjust to obtain the above-mentioned first adjusted transmission rate.

[0015] In an exemplary embodiment, when the accumulated first number of failures of the above-mentioned PCI bridge link is greater than or equal to the above-mentioned failure threshold, the transmission rate of the above-mentioned PCI bridge link is triggered to adjust, and after obtaining the first adjusted transmission rate, the above-mentioned method also includes: clearing the above-mentioned first number of failures; and re-recording the number of failures of the above-mentioned PCI bridge link to obtain a second number of failures.

[0016] In an exemplary embodiment, after re-recording the number of failures of the above-mentioned PCI bridge link to obtain a second number of failures, the above-mentioned method further includes: when the above-mentioned second number of failures is greater than or equal to the above-mentioned failure threshold, continuing to trigger adjustment of the transmission rate of the above-mentioned PCI bridge link to obtain a second adjusted transmission rate; and controlling the operation of the above-mentioned PCI bridge link based on the above-mentioned second adjusted transmission rate.

[0017] In an exemplary embodiment, after controlling the operation of the PCI bridge link based on the second adjusted transmission rate, the method further includes: when the second adjusted transmission rate is equal to the minimum rate of the PCI bridge link, stopping the adjustment of the transmission rate of the PCI bridge link; when the second adjusted transmission rate is equal to the minimum rate of the PCI bridge link and the third number of failures of the PCI bridge link recorded is greater than or equal to the failure threshold, triggering the adjustment of the network bandwidth of the PCI bridge link to obtain the adjusted network bandwidth, wherein the third number of failures is the number of failures recorded during the operation of the PCI bridge link at the second adjusted transmission rate.

[0018] In an exemplary embodiment, when the second adjusted transmission rate is equal to the minimum rate of the PCI bridge link, and the recorded third failure number of the PCI bridge link is greater than or equal to the failure threshold, the network bandwidth of the PCI bridge link is adjusted, and after the adjusted network bandwidth is obtained, the method further includes: when the adjusted network bandwidth is equal to the minimum network bandwidth of the PCI bridge link, generating a second fault event, wherein the second fault event includes at least one of the following: a second fault event that allows repair, a second fault event that does not allow repair, a second fault event that causes the PCI bridge link to be unable to operate, and a second fault event that allows the PCI bridge link to continue to operate; sending the second fault event to the baseboard management controller in the server, wherein the baseboard management controller is used to record the second fault event and generate the fault handling information, wherein the fault handling information is used to instruct the replacement of the failed PCI Switch device, and / or, to replace the EP device connected to the failed PCISwitch device.

[0019] In an exemplary embodiment, after adjusting the transmission rate of the PCI bridge link based on the fault threshold, the method further includes: generating target information, and sending the target information to a baseboard management controller deployed in the server, wherein the target information includes a target transmission rate, and the target transmission rate is the rate after adjusting the transmission rate of the PCI bridge link, and the target transmission rate is less than the transmission rate before the PCI bridge link is adjusted; recording the target transmission rate through the baseboard management controller, and generating prompt information to prompt that the first failure number of the PCI bridge link is greater than the fault threshold.

[0020] In an exemplary embodiment, detecting the PCI device connected to the PCI bridge link includes: when starting the server, starting the fault handling system, detecting N levels on the PCI bridge link, wherein N is a natural number greater than or equal to 1; and determining the type of the PCI device in each of the levels.

[0021] According to another embodiment of the present application, a PCI device fault handling device is provided, which is applied to a fault handling system, wherein the fault handling system is arranged on a mainboard of a server, and the fault handling system is connected to a PCI bridge link deployed in the server, and the device comprises: a first detection module, used to detect a PCI device connected to the PCI bridge link, wherein the PCI device comprises an EP device and / or a PCI Switch device, and a plurality of the EP devices are allowed to be connected to the PCI Switch device; a first processing module, used to determine a fault handling method of the PCI device according to the detected PCI device, and handle the fault of the PCI device according to the fault handling method; wherein the first processing module comprises: a first processing unit, used to start a fault handling function of the EP device when the PCI device connected to the PCI bridge link is only the EP device, the fault handling function is a function arranged in the EP device, and the fault handling function is used to handle the fault of the EP device; a second processing unit, used to set the PCI device connected to the PCI bridge link to start a fault handling function of the EP device when the PCI device connected to the PCI bridge link comprises the PCI Switch device. The invention discloses a method for adjusting the transmission rate of the PCI bridge link based on a fault threshold of the switch device, wherein the fault threshold is used to indicate a threshold for recording the number of failures of the PCI switch device, and the fault handling method includes the fault handling function and a method for setting the fault threshold of the PCI switch device.

[0022] In an exemplary embodiment, the above-mentioned first processing unit includes: a first setting subunit, which is used to set the AER function of the above-mentioned EP device to an enabled state or a started state when the above-mentioned PCI device connected to the above-mentioned PCI bridge link is only the above-mentioned EP device, so as to start the fault handling function of the above-mentioned EP device, wherein the above-mentioned AER function includes the above-mentioned fault handling function.

[0023] In an exemplary embodiment, the above-mentioned device also includes a first monitoring module, which is used to monitor the first fault event of the above-mentioned EP device after the fault handling function of the above-mentioned EP device is started when the above-mentioned PCI device connected to the above-mentioned PCI bridge link is the only one of the above-mentioned EP device, wherein the above-mentioned first fault event includes at least one of the following: a first fault event that is allowed to be repaired, a first fault event that is not allowed to be repaired, a first fault event that causes the above-mentioned EP device to be unable to run, and a first fault event that the above-mentioned EP device can continue to run; a first reporting module, which is used to report the above-mentioned first fault event to the target operating system and the baseboard management controller in the above-mentioned server when the above-mentioned first fault event is monitored; wherein the above-mentioned target operating system is used to perform one of the following operations based on the above-mentioned first fault event: restart the above-mentioned server, perform a self-check operation, and generate a fault prompt information; the above-mentioned baseboard management controller is used to perform at least one of the following operations based on the above-mentioned first fault event: record the above-mentioned first fault event, perform a troubleshooting operation, and repair the above-mentioned first fault event.

[0024] In an exemplary embodiment, the second processing unit includes: a first determining subunit, used to determine the target register set in the PCI Switch device when the PCI device connected to the PCI bridge link includes the PCI Switch device, wherein the target register is used to record the number of failures of the PCI Switch device; and a first setting subunit, used to set the failure threshold of the target register according to preset conditions.

[0025] In an exemplary embodiment, the PCI device connected to the PCI bridge link includes the PCISwitch device, including one of the following: the PCI device connected to the PCI bridge link is only the PCI Switch device; the PCI device connected to the PCI bridge link is only the PCI Switch device, and one or more EP devices are connected to the PCI Switch device; the PCI device connected to the PCI bridge link includes the PCISwitch device and the EP device, and the PCI Switch device is connected to the first processor in the server, and the EP device is connected to the second processor in the server; the PCI device connected to the PCI bridge link includes the PCI Switch device and the EP device, and the PCI Switch device is connected to the first processor in the server, one or more other EP devices are connected to the PCI Switch device, and the EP device is connected to the second processor in the server.

[0026] In an exemplary embodiment, the first setting subunit includes: a first setting submodule, used to set the fault threshold of the target register according to the preset conditions and through at least one of the following operations: determining the operation information of the PCI Switch device, and setting the fault threshold based on the operation information, wherein the operation information includes at least one of the following: the operation environment, the operation performance, the operation safety performance, and the operation stability performance; determining the first number of the PCI Switch devices and the second number of the EP devices connected to the PCI Switch device, and setting the fault threshold based on the first number and the second number.

[0027] In an exemplary embodiment, the above-mentioned device also includes: a first detection module, which is used to detect the above-mentioned PCI Switch device and one or more EP devices connected to the above-mentioned PCI Switch device after setting the above-mentioned fault threshold of the above-mentioned target register according to preset conditions; a first trigger module, which is used to trigger the counter in the above-mentioned target register to perform a fault accumulation operation when the above-mentioned PCI Switch device fails or any of the above-mentioned EP devices connected to the above-mentioned PCI Switch device fails, wherein the above-mentioned fault accumulation operation is used to accumulate the number of times the above-mentioned PCI Switch device fails.

[0028] In an exemplary embodiment, the apparatus further includes one of the following: a first enabling module, for enabling a fault handling function of the EP device when one or more EP devices are connected to the PCI Switch device before setting the fault threshold of the PCI Switch device when the PCI device connected to the PCI bridge link includes the PCI Switch device, and receiving a result of the EP device handling the fault according to the fault handling function through the PCI Switch device; a first shutting down module, for disabling the fault handling function of the EP device when the PCISwitch device is connected to the first processor in the server and the EP device is connected to the second processor in the server before setting the fault threshold of the PCI Switch device when the PCI device connected to the PCI bridge link includes the PCI Switch device; and a second processing module, for disabling the fault handling function of the EP device when the PCI device connected to the PCI bridge link includes the PCI Switch device before setting the fault threshold of the PCI Switch device when the PCI Switch device is connected to the first processor in the server and the PCI When one or more other EP devices are connected to the Switch device and the EP device is connected to the second processor in the server, the fault handling function of the EP device is turned off, other fault handling functions of the other EP devices are turned on, and the results of fault handling by the other EP devices according to the other fault handling functions are received through the PCI Switch device.

[0029] In an exemplary embodiment, the above-mentioned second processing unit includes: a first trigger sub-unit, which is used to trigger the adjustment of the transmission rate of the above-mentioned PCI bridge link when the accumulated first failure number of the above-mentioned PCI bridge link is greater than or equal to the above-mentioned failure threshold, so as to obtain a first adjusted transmission rate.

[0030] In an exemplary embodiment, the above-mentioned first trigger sub-unit includes at least one of the following: a first trigger sub-module, used to trigger the adjustment of the transmission rate of the above-mentioned PCISwitch device when the above-mentioned first number of failures is greater than or equal to the above-mentioned failure threshold, so as to obtain the above-mentioned first adjusted transmission rate; a second trigger sub-module, used to trigger the adjustment of the transmission rate of one or more of the above-mentioned EP devices connected in the above-mentioned PCI Switch device when the above-mentioned first number of failures is greater than or equal to the above-mentioned failure threshold, so as to obtain the above-mentioned first adjusted transmission rate.

[0031] In an exemplary embodiment, the above-mentioned device also includes: a first clearing module, which is used to trigger the adjustment of the transmission rate of the above-mentioned PCI bridge link when the accumulated first failure number of the above-mentioned PCI bridge link is greater than or equal to the above-mentioned failure threshold, and after obtaining the first adjusted transmission rate, clear the above-mentioned first failure number; a first recording module, which is used to re-record the number of failures of the above-mentioned PCI bridge link to obtain a second failure number.

[0032] In an exemplary embodiment, the above-mentioned device also includes: a first adjustment module, which is used to re-record the number of times the above-mentioned PCI bridge link fails, and after obtaining the second number of failures, when the above-mentioned second number of failures is greater than or equal to the above-mentioned failure threshold, continue to trigger the adjustment of the transmission rate of the above-mentioned PCI bridge link to obtain the second adjusted transmission rate; a first control module, which is used to control the operation of the above-mentioned PCI bridge link based on the above-mentioned second adjusted transmission rate.

[0033] In an exemplary embodiment, the above-mentioned device also includes: a first stop module, which is used to control the operation of the above-mentioned PCI bridge link based on the above-mentioned second adjusted transmission rate, and stop adjusting the transmission rate of the above-mentioned PCI bridge link when the above-mentioned second adjusted transmission rate is equal to the minimum rate of the above-mentioned PCI bridge link; a second trigger module, which is used to trigger the adjustment of the network bandwidth of the above-mentioned PCI bridge link to obtain the adjusted network bandwidth when the above-mentioned second adjusted transmission rate is equal to the minimum rate of the above-mentioned PCI bridge link and the third number of failures of the above-mentioned PCI bridge link recorded is greater than or equal to the above-mentioned failure threshold, wherein the above-mentioned third number of failures is the number of failures recorded during the operation of the above-mentioned PCI bridge link according to the above-mentioned second adjusted transmission rate.

[0034] In an exemplary embodiment, the device further includes: a first generating module, configured to trigger adjustment of the network bandwidth of the PCI bridge link when the second adjusted transmission rate is equal to the minimum rate of the PCI bridge link and the recorded third failure number of the PCI bridge link failure is greater than or equal to the failure threshold, and after obtaining the adjusted network bandwidth, generate a second fault event when the adjusted network bandwidth is equal to the minimum network bandwidth of the PCI bridge link, wherein the second fault event includes at least one of the following: a second fault event that allows repair, a second fault event that does not allow repair, a second fault event that causes the PCI bridge link to be unable to operate, and a second fault event that allows the PCI bridge link to continue to operate; a first sending module, configured to send the second fault event to the baseboard management controller in the server, wherein the baseboard management controller is configured to record the second fault event and generate the fault handling information, wherein the fault handling information is used to instruct replacement of the failed PCI Switch device and / or replacement of the EP device connected to the failed PCI Switch device.

[0035] In an exemplary embodiment, the above-mentioned device also includes: a second generating module, which is used to generate target information after adjusting the transmission rate of the above-mentioned PCI bridge link based on the above-mentioned fault threshold, and send the above-mentioned target information to the baseboard management controller deployed in the above-mentioned server, wherein the above-mentioned target information includes a target transmission rate, and the above-mentioned target transmission rate is the rate after adjusting the transmission rate of the above-mentioned PCI bridge link, and the above-mentioned target transmission rate is less than the transmission rate of the above-mentioned PCI bridge link before adjustment; a second recording module, which is used to record the above-mentioned target transmission rate through the above-mentioned baseboard management controller, and generate prompt information to prompt that the first failure number of the above-mentioned PCI bridge link is greater than the above-mentioned failure threshold.

[0036] In an exemplary embodiment, the above-mentioned first detection module includes: a first detection unit, used to start the above-mentioned fault handling system when starting the above-mentioned server, and detect N levels on the above-mentioned PCI bridge link, wherein the above-mentioned N is a natural number greater than or equal to 1; a first determination unit, used to determine the type of the above-mentioned PCI device in each of the above-mentioned levels.

[0037] According to another embodiment of the present application, a fault handling system is also provided. The fault handling system is arranged on a mainboard of a server. The fault handling system includes a target processor. The target processor is connected to a PCI bridge link deployed in the server. The target processor is used to implement the steps of the above method.

[0038] According to another embodiment of the present application, a server is provided, comprising: a PCI bridge link, and the fault handling system as described above, wherein a PCI device is connected to the PCI bridge link.

[0039] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0040] According to another embodiment of the present application, a computer non-volatile readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0041] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0042] Through the present application, the PCI device connected to the PCI bridge link is first detected, and then different fault handling methods are determined according to the different PCI devices detected, so as to handle the fault of the PCI device according to the fault handling method; wherein, when the PCI device connected to the PCI bridge link is only an EP device, the fault handling function of the EP device is started, and when the PCI device connected to the PCI bridge link includes a PCI Switch device, the fault threshold of the PCI Switch device is set, and the transmission rate of the PCI bridge link is adjusted based on the fault threshold. Therefore, the problem that the PCI device with a fault cannot be accurately determined in the related art, so that the accurate fault handling method cannot be determined, can be solved, thereby achieving the effect of improving the accuracy of handling PCI device faults. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a hardware structure block diagram of a mobile terminal of a PCI device fault handling method according to an embodiment of the present application;

[0044] Figure 2 is a flowchart of a method for handling a fault of a PCI device according to an embodiment of the present application;

[0045] Figure 3 This is a schematic diagram of the connection of a PCI device according to an embodiment of the present application. Figure 1 ;

[0046] Figure 4 This is a schematic diagram of the connection of a PCI device according to an embodiment of the present application. Figure 2 ;

[0047] Figure 5 This is a schematic diagram of the connection of a PCI device according to an embodiment of the present application. Figure 3 ;

[0048] Figure 6 is an interaction diagram of various devices for error information processing according to a specific embodiment of the present application;

[0049] Figure 7 is a flow chart of error information processing performed by BIOS according to a specific embodiment of the present application;

[0050] Figure 8 is a structural block diagram of a fault handling system according to an embodiment of the present application;

[0051] Fig. 9 is a structural block diagram of a server according to an embodiment of the present application;

[0052] Fig.10 is a structural block diagram of a fault handling device for a PCI device according to an embodiment of the present application;

[0053] Fig.11 is a schematic diagram of a computer non-volatile readable storage medium according to a method for handling a PCI device failure in an embodiment of the present application;

[0054] Fig.12 It is a schematic diagram of the hardware structure of an embodiment of an electronic device according to the PCI device fault handling method of an embodiment of the present application. DETAILED DESCRIPTION

[0055] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0056] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0057] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a PCI device fault handling method according to an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0058] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the fault handling method of the PCI device in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0059] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0060] In this embodiment, a PCI device fault processing method is provided, which is applied to a fault processing system. The fault processing system is arranged on a mainboard of a server, and the fault processing system is connected to a PCI bridge link deployed in the server. Figure 2 is a flowchart of a method for handling a PCI device failure according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:

[0061] Step S202, detecting a PCI device connected to the PCI bridge link, wherein the PCI device includes an EP device and / or a PCI Switch device, and the PCI Switch device is allowed to connect multiple EP devices;

[0062] Step S204, determining a fault handling method of the PCI device according to the detected PCI device, and handling the fault of the PCI device according to the fault handling method;

[0063] Among them, when the PCI device connected to the PCI bridge link is only the EP device, the fault handling function of the EP device is started, and the fault handling function is a function set in the EP device, and the fault handling function is used to handle the fault of the EP device; when the PCI device connected to the PCI bridge link includes the PCISwitch device, the fault threshold of the PCI Switch device is set, and the transmission rate of the PCI bridge link is adjusted based on the fault threshold, the fault threshold is used to represent the threshold for recording the number of failures of the PCI Switch device, and the fault handling method includes the fault handling function and the method of setting the fault threshold of the PCI Switch device.

[0064] Through the above steps, the PCI device connected to the PCI bridge link is first detected, and then different fault handling methods are determined according to the different PCI devices detected, so as to handle the fault of the PCI device according to the fault handling method; wherein, when the PCI device connected to the PCI bridge link is only an EP device, the fault handling function of the EP device is started, and when the PCI device connected to the PCI bridge link includes a PCI Switch device, the fault threshold of the PCI Switch device is set, and the transmission rate of the PCI bridge link is adjusted based on the fault threshold. Therefore, the problem that the PCI device with a fault cannot be accurately determined in the related art, so that the accurate fault handling method cannot be determined, can be solved, thereby achieving the effect of improving the accuracy of handling PCI device faults.

[0065] Optionally, the fault handling system may be a Basic Input Output System (BIOS) deployed in a server, or a device including a processor. BIOS is a firmware in a computer system, located on a motherboard of the computer. It is responsible for hardware initialization, self-test, and starting the operating system when the computer starts. BIOS provides an interface that enables the operating system and application programs to communicate with the computer's hardware.

[0066] Optionally, a PCI bridge link refers to a communication link connecting two or more PCI bridges. A PCI bridge is a device used to connect different PCI links, and it can transfer data from one PCI link to another PCI link. The PCI bridge link is responsible for transmitting data and control information between different PCI links to achieve communication and data exchange between different PCI devices.

[0067] Optionally, a PCI device refers to a device having a PCI interface. A PCI interface is an external expansion bus, which is a bus designed to connect devices outside a computer to the inside of the computer. A PCI device may be a network card, storage media card, accelerator card, GPU card, or other component having a PCI interface.

[0068] Optionally, a PCI Switch device is a device used to connect a computer system with external devices. A PCISwitch device can expand the PCI bus interface of a computer system so that it can connect more external devices, such as a network card, a graphics card, a storage device, etc. It connects multiple PCI bus interfaces together to achieve management and control of multiple external devices, thereby improving the scalability and flexibility of the system. Therefore, the PCI Switch device implements time-sharing multiplexing of the PCI bus, so that multiple PCI devices can communicate through the PCI bus at the same time, and can provide data flow control and routing functions, so that PCI devices can exchange and communicate data efficiently. PCI Switch chip devices are commonly used in servers, workstations, and other systems that require a large number of PCI devices to be connected.

[0069] The PCI Switch device has a fault threshold register for setting the fault threshold. When the number of faults reaches or exceeds the fault threshold, the corresponding fault handling method will be triggered. The fault threshold can include various types of faults, such as transmission faults, reception faults, clock faults, etc. By setting these fault thresholds, the device can be detected and handled to ensure the reliability and stability of the device.

[0070] Optionally, an EP (Endpoint) device refers to a device connected to a PCI Switch device or a device connected to a PCI link, such as a network card, a graphics card, a sound card, a storage controller, etc. The EP device communicates and transmits data through a PCI bus or a PCISwitch device motherboard or other devices.

[0071] Optionally, the fault handling function in the EP device includes, but is not limited to, an Advanced Error Reporting (AER) function, which is a function in a PCI device for reporting and handling device errors. The AER function allows PCI devices to generate error reports when errors occur and send them to the operating system or other management entity of the host system. These error reports may include the error type, error location, and other relevant information to help system administrators diagnose and handle device errors. The AER function can also notify the host system of link errors through the error reporting mechanism on the PCI link so that the system can take appropriate measures to handle the errors, such as resetting or reconfiguring the device, rerouting data streams, etc. This helps to improve the reliability and stability of the system and reduce the impact of errors on system performance and data integrity.

[0072] Optionally, the PCI device failure includes but is not limited to:

[0073] 1) Correctable faults or fault events that allow repair: refers to errors that can be corrected by error correction codes or other technologies, such as checksum errors in data transmission.

[0074] 2) Uncorrectable errors or failure events that do not allow for repair: refers to errors that cannot be corrected by error correction codes or other technologies, such as serious errors in data transmission.

[0075] 3) Fatal errors, or failure events that cause PCI devices to fail to operate: refers to errors that have a serious impact on device functions and cause the device to fail to work properly.

[0076] 4) Non-fatal errors, or failure events in which the PCI device can continue to operate: refers to errors that have a certain impact on the device function, but the device can still continue to work.

[0077] In an exemplary embodiment, when the only PCI device connected to the PCI bridge link is the EP device, starting the fault handling function of the EP device includes: when the only PCI device connected to the PCI bridge link is the EP device, setting the AER function of the EP device to an enabled state or a started state to start the fault handling function of the EP device, wherein the AER function includes the fault handling function.

[0078] Alternatively, the EP device may be a device in a server connected to multiple processors via a PCI link. Figure 3As shown, when the fault handling system includes BIOS, the devices connected to CPU0 and CPU1 only include EP devices. When BIOS scans all PCI devices in the current PCI link and finds only EP devices, BIOS enables the AER function settings of the EP devices of all PCI links.

[0079] Optionally, to enable or start the AER function of the EP device, follow these steps:

[0080] 1) After the BIOS system starts, enter the BIOS system setting interface;

[0081] 2) In the BIOS setup interface, find "PCI Device Configuration" or similar options;

[0082] 3) In the PCI device configuration menu, find "Advanced Error Reporting (AER)" or similar options;

[0083] 4) Set the Advanced Error Reporting (AER) option to Enable or Enable.

[0084] 5) Save the settings and exit the BIOS system setup interface;

[0085] 6. Make sure that the AER function of all PCI devices has been successfully enabled. You can use the corresponding tools or commands in the operating system to check.

[0086] In this embodiment, when the PCI device connected to the PCI bridge link is only the EP device, by setting the AER function of the EP device to an enabled state or a started state, the failure of the EP device can be accurately detected and processed.

[0087] In an exemplary embodiment, when the PCI device connected to the PCI bridge link is only the EP device, after starting the fault handling function of the EP device, the method further includes: monitoring a first fault event of the EP device, wherein the first fault event includes at least one of the following: a first fault event that allows repair, a first fault event that does not allow repair, a first fault event that causes the EP device to be unable to operate, and a first fault event that allows the EP device to continue to operate; when the first fault event is monitored, reporting the first fault event to a target operating system and a baseboard management controller in the server; wherein the target operating system is used to perform one of the following operations based on the first fault event: restart the server, perform a self-check operation, and generate a fault prompt message; the baseboard management controller is used to perform at least one of the following operations based on the first fault event: record the first fault event, perform a troubleshooting operation, and repair the first fault event.

[0088] Optionally, the first fault event that is allowed to be repaired includes a correctable error that occurs in the EP device, such as a checksum error in data transmission; the first fault event that is not allowed to be repaired includes an uncorrectable error that occurs in the EP device, such as a serious error in the data transmission process; the first fault event that causes the EP device to be unable to operate includes a fatal error that occurs in the EP device; the first fault event that the EP device can continue to operate includes a non-fatal error that occurs in the EP device. For example, when any of the correctable errors, uncorrectable errors, fatal errors, and non-fatal errors occur in the EP device connected to the PCI link in the server, the BIOS immediately reports the fault information to the target operating system and the baseboard management controller (BoardManagement Controller, referred to as BMC) end, notifying the target operating system and the baseboard management controller to perform the above-mentioned fault handling operations, or prompting to replace the EP device.

[0089] This embodiment monitors the fault events of the EP device and reports the fault events to the target operating system and the baseboard management controller in the server, so as to achieve the purpose of timely handling of the faults.

[0090] In an exemplary embodiment, when the PCI device connected to the PCI bridge link includes the PCISwitch device, setting the fault threshold of the PCI Switch device includes:

[0091] In the case that the PCI device connected to the PCI bridge link includes the PCI Switch device, a target register set in the PCI Switch device is determined, wherein the target register is used to record the number of failures of the PCISwitch device; and the failure threshold of the target register is set according to a preset condition.

[0092] Optionally, the target register is a fault threshold register set in the PCI Switch device, which is used to set a fault threshold. When the number of faults reaches or exceeds the fault threshold, a corresponding fault handling method is triggered. The target register includes a counter, which is used to accumulate the number of faults of the PCI Switch device.

[0093] Optionally, the PCI device connected to the PCI bridge link includes the PCI Switch device, including one of the following:

[0094] The PCI device connected to the PCI bridge link is only the PCI Switch device; for example, Figure 4As shown, CPU0 and CPU1 are both connected to PCI Switch devices.

[0095] The PCI device connected to the PCI bridge link is only the PCI Switch device, and one or more EP devices are connected to the PCISwitch device; for example, Figure 4 As shown, three EP devices are connected to the PCI Switch device in CPU0.

[0096] The PCI devices connected to the PCI bridge link include the PCI Switch device and the EP device, and the PCI Switch device is connected to the first processor in the server, and the EP device is connected to the second processor in the server; for example, Figure 5 As shown, CPU0 is connected to a PCI Switch device, and CPU1 is connected to an EP device.

[0097] The PCI devices connected to the PCI bridge link include the PCI Switch device and the EP device, and the PCI Switch device is connected to the first processor in the server, one or more other EP devices are connected to the PCI Switch device, and the EP device is connected to the second processor in the server. Figure 5 As shown, CPU0 is connected to a PCI Switch device, the PCI Switch device is connected to three EP devices, and CPU1 is connected to three EP devices.

[0098] It should be noted that there may be one or more PCI Switch devices, and each PCI Switch device may also be connected to multiple EP devices. This embodiment can accurately determine the fault handling method for each type of PCI device by detecting the type of the connected device.

[0099] Optionally, setting the fault threshold of the target register according to a preset condition includes: setting the fault threshold of the target register according to the preset condition and by at least one of the following operations:

[0100] Determine the operation information of the PCI Switch device, and set the fault threshold based on the operation information, wherein the operation information includes at least one of the following: operation environment, operation performance, operation safety performance, and operation stability performance;

[0101] For example, the operating environment: including the temperature range, humidity range, and other environmental conditions of the PCI Switch device. According to the stability performance of the device under different environmental conditions, the corresponding fault threshold can be set to ensure the reliability of the device in different environments.

[0102] Operation performance: including PCI Switch device data transmission speed, bandwidth utilization and other performance indicators. According to the performance of PCI Switch device under different performance requirements, corresponding fault thresholds can be set to ensure the stability of the device under different loads.

[0103] Operational security performance: including PCI Switch device security authentication, data encryption, access control and other security functions. According to the performance of the device under different security requirements, the corresponding fault threshold can be set to ensure the reliability of the PCI Switch device under different security threats.

[0104] Stable performance of operation: including the stability performance of PCI Switch devices under long-term operation, for example, whether disconnection, freezing, etc. will occur. According to the performance of PCI Switch devices under different stability requirements, corresponding fault thresholds can be set to ensure the reliability of the device under long-term operation.

[0105] Based on the above operation information, an appropriate fault threshold can be set according to the actual situation to ensure the stable operation of the PCI Switch device under different conditions.

[0106] Determine a first number of the PCI Switch devices and a second number of the EP devices connected to the PCI Switch device, and set the fault threshold based on the first number and the second number. In this embodiment, the fault threshold can be set according to the first number of the PCI Switch devices and the second number of the connected EP devices. For example, if there are 5 PCI Switch devices and 20 connected EP devices, an appropriate fault threshold (e.g., 100) can be set according to actual conditions to ensure the stability and reliability of the network. By monitoring and analyzing fault conditions in the network, an optimal fault threshold can be determined so that problems can be identified and resolved in a timely manner.

[0107] In an exemplary embodiment, after setting the fault threshold of the target register according to preset conditions, the method further includes: detecting the PCI Switch device and one or more EP devices connected to the PCI Switch device; when the PCI Switch device fails or any of the EP devices connected to the PCI Switch device fails, triggering the counter in the target register to perform a fault accumulation operation, wherein the fault accumulation operation is used to accumulate the number of times the PCI Switch device fails. In this embodiment, when the PCI Switch device or any EP device connected to it fails, the counter in the target register will be triggered to perform a fault accumulation operation. This means that the fault counter will record each fault event and accumulate it into the corresponding counter for subsequent analysis and troubleshooting. This helps to quickly identify the frequency and pattern of faults so that appropriate measures can be taken to repair the faults and improve the reliability and stability of the system.

[0108] In an exemplary embodiment, when the PCI device connected to the PCI bridge link includes the PCISwitch device, before setting the fault threshold of the PCI Switch device, the method further includes one of the following:

[0109] When one or more EP devices are connected to the PCI Switch device, a fault handling function of the EP device is enabled, and a result of the fault handling by the EP device according to the fault handling function is received through the PCI Switch device; for example, Figure 4 As shown in the figure, when three EP devices are connected to the PCI Switch device connected to CPU0, the fault handling function (AER function) of the three EP devices is enabled; the fault handling function of the EP device can also be enabled through the PCI Switch device; the fault handling function of the EP device can include automatic restart, fault alarm, error log recording and other functions. When the EP device handles the fault according to the fault handling function, the PCI Switch device can receive the processing results sent by the EP device, such as successful restart, alarm sending and other information. By receiving the processing results of the EP device, the PCI Switch device can timely understand the fault handling status of the EP device, helping the administrator to take corresponding measures in time to ensure the normal operation of the system.

[0110] When the PCI Switch device is connected to the first processor in the server and the EP device is connected to the second processor in the server, the fault handling function of the EP device is disabled; for example, Figure 5As shown in the figure, CPU0 is connected to a PCI Switch device, and CPU1 is connected to three EP devices, so the AER function of the three EP devices connected to CPU1 is disabled. Thus, the error handling mechanism of the PCI link can be implemented by setting the fault threshold of the PCI Switch device.

[0111] When the PCI Switch device is connected to the first processor in the server, one or more other EP devices are connected to the PCI Switch device, and the EP device is connected to the second processor in the server, the fault handling function of the EP device is turned off, other fault handling functions of the other EP devices are turned on, and the result of the other EP devices handling the fault according to the other fault handling functions is received through the PCI Switch device. For example, Figure 5 As described above, CPU0 is connected to a PCI Switch device, and there are three EP devices connected to the PCI Switch device, and CPU1 is connected to three EP devices, then the AER function of the three EP devices connected to CPU1 is turned off, and the AER function of the three EP devices connected to the PCI Switch device is turned on. By receiving the processing results of the EP devices, the PCI Switch device can timely understand the fault processing status of the EP devices, and help the administrator take corresponding measures in time to ensure the normal operation of the system.

[0112] In an exemplary embodiment, the transmission rate of the PCI bridge link is adjusted based on the fault threshold, including: when the accumulated first number of failures of the PCI bridge link is greater than or equal to the fault threshold, triggering adjustment of the transmission rate of the PCI bridge link to obtain a first adjusted transmission rate.

[0113] Optionally, adjusting the transmission rate may be to reduce the data transmission speed to reduce the link load, for example, adjusting from the original 32GT / s to 16GT / s, so as to promptly respond to link failures, reduce data transmission interruptions and delays, and improve the stability and reliability of the PCI bridge link.

[0114] Optionally, when the accumulated first number of failures of the PCI bridge link is greater than or equal to the failure threshold, triggering adjustment of the transmission rate of the PCI bridge link to obtain a first adjusted transmission rate includes at least one of the following:

[0115] When the first number of failures is greater than or equal to the failure threshold, triggering adjustment of the transmission rate of the PCISwitch device to obtain the first adjusted transmission rate;

[0116] When the first number of failures is greater than or equal to the failure threshold, the transmission rate of one or more EP devices connected to the PCISwitch device is adjusted to obtain the first adjusted transmission rate.

[0117] Optionally, the following methods can be used to trigger the adjustment of the transmission rate of the EP device connected to the PCI Switch device, or the transmission rate of the EP device: Software control: Using the management software or driver of the PCI Switch device or EP device, the transmission rate of the connected EP device can be adjusted by setting parameters or configuration files. Hardware control: Some PCI Switch devices or EP devices may have physical switches or buttons, which can be manually operated directly on the device to adjust the transmission rate of the connected EP device. Remote control: Through a network or remote connection, the PCI Switch device or EP device can be remotely controlled through a remote management tool or protocol to adjust the transmission rate of the connected EP device. Regardless of which method is used, it is necessary to ensure that the operation of adjusting the transmission rate can correctly identify and affect the PCISwitch device or EP device that needs to be adjusted, so as to ensure the accuracy and effectiveness of the transmission rate adjustment. The transmission rate after the first adjustment can be obtained in the above manner. It should be noted that the adjustment of the transmission rate may require the PCI Switch device to be restarted to take effect.

[0118] Optionally, when the accumulated first number of failures of the PCI bridge link is greater than or equal to the failure threshold, the transmission rate of the PCI bridge link is adjusted, and after obtaining the first adjusted transmission rate, the method further includes: clearing the first number of failures; re-recording the number of failures of the PCI bridge link to obtain the second number of failures. If the second number of failures is less than the failure threshold, the current transmission rate is kept unchanged; if the second number of failures is greater than or equal to the failure threshold, the transmission rate of the PCI bridge link is adjusted again. And so on, until the transmission rate stabilizes at a suitable value.

[0119] Optionally, after re-recording the number of times the PCI bridge link fails and obtaining the second number of failures, the method further includes: when the second number of failures is greater than or equal to the failure threshold, continuing to trigger adjustment of the transmission rate of the PCI bridge link to obtain a second adjusted transmission rate; and controlling the operation of the PCI bridge link based on the second adjusted transmission rate. If the second number of failures does not reach the failure threshold, the operating status of the PCI bridge link will continue to be monitored, and the operation of adjusting the transmission rate will be triggered when necessary. This ensures that the PCI bridge link can make corresponding adjustments in a timely manner when a failure occurs, so as to ensure the stable operation of the system.

[0120] Optionally, after controlling the operation of the PCI bridge link based on the second adjusted transmission rate, the method further includes: when the second adjusted transmission rate is equal to the minimum rate of the PCI bridge link, stopping the adjustment of the transmission rate of the PCI bridge link; when the second adjusted transmission rate is equal to the minimum rate of the PCI bridge link and the third number of failures of the PCI bridge link recorded is greater than or equal to the failure threshold, triggering the adjustment of the network bandwidth of the PCI bridge link to obtain the adjusted network bandwidth, wherein the third number of failures is the number of failures recorded during the operation of the PCI bridge link according to the second adjusted transmission rate. When the transmission rate after the second adjustment is equal to the minimum rate of the PCI bridge link and the number of PCI bridge link failures recorded is greater than or equal to the set failure threshold, the network bandwidth of the PCI bridge link will be triggered to be adjusted. This means that the system will automatically reallocate the bandwidth of the PCI bridge link to ensure the stability and reliability of network transmission. This automatic adjustment can help the system respond quickly when a failure occurs, thereby minimizing the impact on network performance.

[0121] Optionally, when the second adjusted transmission rate is equal to the minimum rate of the PCI bridge link, and the recorded third failure number of the PCI bridge link is greater than or equal to the failure threshold, triggering adjustment of the network bandwidth of the PCI bridge link, and after obtaining the adjusted network bandwidth, the method further includes: when the adjusted network bandwidth is equal to the minimum network bandwidth of the PCI bridge link, generating a second fault event, wherein the second fault event includes at least one of the following: a second fault event that allows repair, a second fault event that does not allow repair, a second fault event that causes the PCI bridge link to be unable to operate, and a second fault event that allows the PCI bridge link to continue to operate; sending the second fault event to the baseboard management controller in the server, wherein the baseboard management controller is used to record the second fault event and generate the fault handling information, wherein the fault handling information is used to indicate replacement of the failed PCI Switch device, and / or replacement of the EP device connected to the failed PCI Switch device.

[0122] Optionally, the second fault event that is allowed to be repaired refers to an error that can be corrected by error correction codes or other technologies, for example, a check error in data transmission. The second fault event that is not allowed to be repaired refers to an error that cannot be corrected by error correction codes or other technologies, for example, a serious error in the data transmission process. The second fault event that causes the PCI bridge link to be unable to operate refers to an error that has a serious impact on the function of the PCI bridge link, causing the device to be unable to work normally. The second fault event in which the PCI bridge link can continue to operate refers to an error that has a certain impact on the function of the device, but the device can still continue to work. The second fault event may be the interruption or loss of the network connection, resulting in the inability to complete data transmission or serious delays.

[0123] Optionally, the baseboard management controller will record detailed information of the second fault event, including the time, location, cause and impact of the fault. The baseboard management controller will then generate fault handling information, including handling measures for the fault, repair plan, responsible person and estimated completion time. This information can help managers and technicians better understand the fault situation, take timely countermeasures, and ensure timely repair of the fault.

[0124] In an exemplary embodiment, after adjusting the transmission rate of the PCI bridge link based on the fault threshold, the method further includes: generating target information and sending the target information to a baseboard management controller deployed in the server, wherein the target information includes a target transmission rate, the target transmission rate is the rate after adjusting the transmission rate of the PCI bridge link, and the target transmission rate is less than the transmission rate of the PCI bridge link before adjustment; recording the target transmission rate by the baseboard management controller, and generating prompt information to prompt that the first failure number of the PCI bridge link failure is greater than the failure threshold.

[0125] Optionally, the process of generating the target information includes determining a value of the target transmission rate, encapsulating the value into a data packet or a message, and then sending it to the server where the baseboard management controller is located through the network. The baseboard management controller can adjust the transmission rate of the PCI bridge link according to the received target information to achieve the required target transmission rate. This ensures that data transmission in the system can be carried out at a set rate to meet specific performance requirements.

[0126] Optionally, the baseboard management controller can record the target transmission rate and generate corresponding prompt information to help users monitor and manage the transmission rate. The prompt information may include but is not limited to:

[0127] 1) When the current transmission rate reaches or exceeds the preset threshold, the user is reminded that there may be network congestion or bandwidth limitation, and is advised to take corresponding measures to optimize the network environment.

[0128] 2) The current transmission rate is lower than expected, reminding the user that there may be device failure or network problems. It is recommended to check related devices and network connections to increase the transmission rate.

[0129] 3) For specific tasks or applications, based on the set target transmission rate, remind the user whether the current transmission rate meets expectations so that the user can adjust the settings or take other measures in a timely manner.

[0130] By recording and generating prompt information, the baseboard management controller can help users promptly discover and solve transmission rate problems, thereby improving transmission efficiency and user experience.

[0131] In an exemplary embodiment, detecting the PCI device connected to the PCI bridge link includes: when starting the server, starting the fault handling system, detecting N levels on the PCI bridge link, wherein N is a natural number greater than or equal to 1; and determining the type of the PCI device in each of the levels.

[0132] Optionally, when starting the server, the fault handling system is started to detect N layers on the PCI bridge link to ensure the stability and reliability of the connection.

[0133] Optionally, the type of the PCI device in each of the layers includes: Hardware layer: PCI device types may include graphics card, network card, sound card, RAID card, etc. Driver layer: PCI device types may include graphics driver, network driver, sound card driver, etc. Application layer: PCI device types may include graphics processor, network interface card, sound input and output device, etc.

[0134] The present application is described below in conjunction with specific embodiments:

[0135] This specific embodiment is described by taking the method of BIOS controlling PCI link error processing as an example. This specific embodiment mainly focuses on the method of processing error information when the CPU-side PCI bridge link is connected to different devices.

[0136] Because the PCI link bus can support both PCI terminal devices (i.e. EP devices) and PCI Switch chips (i.e. PCI Switch devices), but because PCI terminal devices only support the AER function to recover errors, unrecoverable errors, fatal errors, and non-fatal errors, the lower end of the PCI Switch chip can still support PCI terminal settings or PCI Switch chips. However, the PCI Switch chip itself is a bridge-type device, and can perform error repair on the devices at the terminal below the PCI Switch to set error threshold parameters. When the number of bridge errors of the PCI Switch reaches the threshold setting value, the PCI Switch chip will perform a speed reduction mechanism to reduce the number of errors. However, there may be three situations in the PCI link, namely, the first situation is that there is only a PCI terminal device without a PCI Switch chip; the second situation is that there is only a PCI Switch chip without a PCI terminal device; the third situation is that there are both PCI terminal devices and PCI Switch chips. For the first and second situations, it is easy to perform error mechanism processing for specific PCI link situations, but for the third situation, the error handling mechanism of the PCI terminal device will be turned off as a prerequisite, and the PCI will be turned on. The error handling mechanism flow of Switch has implemented the error handling mechanism of the PCI link. Because the number of PCI bridges supported by CPUs of different architectures is different, this specific embodiment only uses one PCI bridge link as the main body to illustrate the error information handling mechanism.

[0137] like Figure 6 As shown, it is an interaction diagram of various devices that perform error information processing in this specific embodiment, and the interaction process is as follows:

[0138] S601, the server is powered on and the BIOS starts;

[0139] S602, BIOS scans the PCI devices under the PCI bridge link to confirm whether there is a PCISwitch chip in the current link. If there is no PCI Switch chip, the AER function of the PCI terminal device under the current link is enabled and an error is reported. If the PCI Switch chip is detected, the AER function of the PCI terminal EP device under the non-Switch chip bridge is disabled, and only the AER function of the PCI terminal device under the current Switch chip bridge is enabled and an error threshold is set. When the error counter reaches the threshold, the link speed reduction and bandwidth reduction measures are adopted, and the SMI interrupt signal is used to notify the BMC end to record;

[0140] S603: The BMC receives error information reported by the BIOS and records information about link speed reduction and bandwidth reduction.

[0141] This embodiment takes different measures according to different link situations, effectively ensuring timely reporting of PCI device errors, and reduces the time loss caused by frequent replacement of PCI terminal devices on the server through the measures taken by the Switch chip bridge, thereby improving the security, reliability and stability of the server, and advantageously ensuring the cost-effectiveness of the server's RAS function.

[0142] like Figure 7 FIG. 1 is a flowchart of error information processing performed by the BIOS of this specific embodiment, including the following steps:

[0143] S701, BIOS determines that the server is powered on;

[0144] S702, BIOS scans and detects all PCI devices in the PCI bridge link, including all PCI devices such as PCI terminal devices and PCISwitch chip devices;

[0145] S703, BIOS determines whether the scanned PCI device is only an EP device;

[0146] S704, when the BIOS scans all PCI devices in the current PCI bridge link and finds only an EP device, the BIOS enables the AER function of the EP devices of all PCI bridge links;

[0147] S705, when any of the correctable error, uncorrectable error, fatal error, and non-fatal error of the EP device occurs, the BIOS immediately reports the fault information to the OS and the BMC, and notifies the OS and the BMC to replace or change the device;

[0148] S706, when the BIOS scans the first level of all PCI devices in the current PCI bridge link and finds only the PCI Switch chip, even if the downstream port of the PCI Switch chip is connected to the EP device, the AER function of the EP device is turned off, and at the same time, the error threshold register of the PCISwitch chip is set to a fault threshold, for example, the set fault threshold is 1000;

[0149] S707, when any AER error occurs in the EP device at the lower end of the PCI Switch chip, the fault threshold of the PCI Switch chip is increased by 1;

[0150] S708, determining whether the fault count of the threshold register of the PCI Switch chip reaches the fault threshold;

[0151] S709, when the count of the threshold register reaches the fault threshold or exceeds the fault threshold, the process goes to S710, the PCI bridge link automatically triggers a speed reduction function (for example, from 32GT / s->16GT / s), and the threshold register count is performed again;

[0152] S711, when S704 still exceeds the set fault threshold, go to S715, continue to reduce the speed until it reaches the minimum transmission rate of the current PCI link; when the minimum transmission rate still exceeds the set threshold, reduce the PCI link bandwidth (for example, from x16->x8) until the minimum speed and minimum bandwidth are reduced (for example, 2.5GT / s, x1), and continue to execute steps S704-S705;

[0153] S712, determining whether the PCI link bandwidth has dropped to the minimum bandwidth;

[0154] S713, BIOS will notify the BMC of the current PCI link speed reduction information through the SMI interrupt signal for recording, so as to inform the user that the error data that has occurred in the current PCI link exceeds the threshold setting;

[0155] S714, re-counting the threshold register.

[0156] It should be noted that when the BIOS scans the first level of all PCI devices in the current PCI link and there are both PCISwitch chips and EP devices, even if the downstream port of the PCI Switch chip is connected to the EP device, it is still necessary to turn off the AER function of the EP device, and only retain the error threshold of the PCI Switch and execute according to steps S706-S705.

[0157] In summary, in this specific embodiment, when the BIOS starts the server, the PCI devices under the PCI bridge link are scanned to confirm whether there is a PCI Switch chip bridge in the current link. If there is no PCI Switch chip bridge, the AER function of the PCI terminal device under the current link is enabled to report the error; if the PCI Switch chip is detected, the AER function of the PCI terminal EP device under the non-Switch chip bridge is turned off, and only the AER function of the PCI terminal device under the current Switch chip bridge is turned on and the error threshold is set. When the error counter reaches the threshold, the link speed reduction and bandwidth reduction measures are adopted, and the BIOS uses the SMI interrupt to notify the BMC end to record. This specific embodiment takes different measures in combination with different link situations, effectively ensuring the timely reporting of PCI device errors, and reducing the time loss caused by the frequent replacement of PCI terminal devices on the server through the measures taken by the Switch chip bridge. It can not only reduce the problem of frequent replacement of terminal devices by actively maintaining errors, but also ensure the reliability of the server, and provide great beneficial measures for the stability and security of the server, the operation and maintenance of the data center, and the service life of the server.

[0158] In this embodiment, a fault handling system is also provided. Figure 8 As shown, it is a structural block diagram of the fault handling system in this embodiment. The fault handling system is set on the mainboard of the server. The fault handling system includes a target processor. The target processor is connected to the PCI bridge link deployed in the server. The target processor is used to implement the steps of the above method.

[0159] In this embodiment, a server is also provided. Fig. 9 As shown, it is a structural block diagram of the server in this embodiment, including: a PCI bridge link, and the fault handling system as described above, wherein the PCI bridge link is connected to a PCI device.

[0160] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0161] In the present embodiment, a PCI device fault handling device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0162] Fig.10 : is a structural block diagram of a fault handling device for a PCI device according to an embodiment of the present application, which is applied to a fault handling system, wherein the fault handling system is arranged on a mainboard of a server, and the fault handling system is connected to a PCI bridge link deployed in the server, such as Fig.10 As shown, the device comprises:

[0163] The first detection module 1002 is used to detect the PCI device connected to the PCI bridge link, wherein the PCI device includes an EP device and / or a PCI Switch device, and the PCI Switch device allows connecting multiple EP devices; the first processing module 1004 is used to determine the fault handling method of the PCI device according to the detected PCI device, and handle the fault of the PCI device according to the fault handling method; wherein the first processing module includes: a first processing unit, used to start the fault handling function of the EP device when the PCI device connected to the PCI bridge link is only the EP device, the fault handling function is a function set in the EP device, and the fault handling function is used to handle the fault of the EP device; a second processing unit, used to set the fault threshold of the PCI Switch device when the PCI device connected to the PCI bridge link includes the PCI Switch device, and adjust the transmission rate of the PCI bridge link based on the fault threshold, the fault threshold is used to indicate the threshold for recording the number of faults of the PCISwitch device, and the fault handling method includes the fault handling function and the method of setting the fault threshold of the PCISwitch device.

[0164] In an exemplary embodiment, the above-mentioned first processing unit includes: a first setting subunit, which is used to set the AER function of the above-mentioned EP device to an enabled state or a started state when the above-mentioned PCI device connected to the above-mentioned PCI bridge link is only the above-mentioned EP device, so as to start the fault handling function of the above-mentioned EP device, wherein the above-mentioned AER function includes the above-mentioned fault handling function.

[0165] In an exemplary embodiment, the above-mentioned device also includes a first monitoring module, which is used to monitor the first fault event of the above-mentioned EP device after the fault handling function of the above-mentioned EP device is started when the above-mentioned PCI device connected to the above-mentioned PCI bridge link is the only one of the above-mentioned EP device, wherein the above-mentioned first fault event includes at least one of the following: a first fault event that is allowed to be repaired, a first fault event that is not allowed to be repaired, a first fault event that causes the above-mentioned EP device to be unable to run, and a first fault event that the above-mentioned EP device can continue to run; a first reporting module, which is used to report the above-mentioned first fault event to the target operating system and the baseboard management controller in the above-mentioned server when the above-mentioned first fault event is monitored; wherein the above-mentioned target operating system is used to perform one of the following operations based on the above-mentioned first fault event: restart the above-mentioned server, perform a self-check operation, and generate a fault prompt information; the above-mentioned baseboard management controller is used to perform at least one of the following operations based on the above-mentioned first fault event: record the above-mentioned first fault event, perform a troubleshooting operation, and repair the above-mentioned first fault event.

[0166] In an exemplary embodiment, the second processing unit includes: a first determining subunit, used to determine the target register set in the PCI Switch device when the PCI device connected to the PCI bridge link includes the PCI Switch device, wherein the target register is used to record the number of failures of the PCI Switch device; and a first setting subunit, used to set the failure threshold of the target register according to preset conditions.

[0167] In an exemplary embodiment, the PCI device connected to the PCI bridge link includes the PCISwitch device, including one of the following: the PCI device connected to the PCI bridge link is only the PCI Switch device; the PCI device connected to the PCI bridge link is only the PCI Switch device, and one or more EP devices are connected to the PCI Switch device; the PCI device connected to the PCI bridge link includes the PCISwitch device and the EP device, and the PCI Switch device is connected to the first processor in the server, and the EP device is connected to the second processor in the server; the PCI device connected to the PCI bridge link includes the PCI Switch device and the EP device, and the PCI Switch device is connected to the first processor in the server, one or more other EP devices are connected to the PCI Switch device, and the EP device is connected to the second processor in the server.

[0168] In an exemplary embodiment, the first setting subunit includes: a first setting submodule, used to set the fault threshold of the target register according to the preset conditions and through at least one of the following operations: determining the operation information of the PCI Switch device, and setting the fault threshold based on the operation information, wherein the operation information includes at least one of the following: the operation environment, the operation performance, the operation safety performance, and the operation stability performance; determining the first number of the PCI Switch devices and the second number of the EP devices connected to the PCI Switch device, and setting the fault threshold based on the first number and the second number.

[0169] In an exemplary embodiment, the above-mentioned device also includes: a first detection module, which is used to detect the above-mentioned PCI Switch device and one or more EP devices connected to the above-mentioned PCI Switch device after setting the above-mentioned fault threshold of the above-mentioned target register according to preset conditions; a first trigger module, which is used to trigger the counter in the above-mentioned target register to perform a fault accumulation operation when the above-mentioned PCI Switch device fails or any of the above-mentioned EP devices connected to the above-mentioned PCI Switch device fails, wherein the above-mentioned fault accumulation operation is used to accumulate the number of times the above-mentioned PCI Switch device fails.

[0170] In an exemplary embodiment, the apparatus further includes one of the following: a first enabling module, for enabling a fault handling function of the EP device when one or more EP devices are connected to the PCI Switch device before setting the fault threshold of the PCI Switch device when the PCI device connected to the PCI bridge link includes the PCI Switch device, and receiving a result of the EP device handling the fault according to the fault handling function through the PCI Switch device; a first shutting down module, for disabling the fault handling function of the EP device when the PCISwitch device is connected to the first processor in the server and the EP device is connected to the second processor in the server before setting the fault threshold of the PCI Switch device when the PCI device connected to the PCI bridge link includes the PCI Switch device; and a second processing module, for disabling the fault handling function of the EP device when the PCI device connected to the PCI bridge link includes the PCI Switch device before setting the fault threshold of the PCI Switch device when the PCI Switch device is connected to the first processor in the server and the PCI When one or more other EP devices are connected to the Switch device and the EP device is connected to the second processor in the server, the fault handling function of the EP device is turned off, other fault handling functions of the other EP devices are turned on, and the results of fault handling by the other EP devices according to the other fault handling functions are received through the PCI Switch device.

[0171] In an exemplary embodiment, the above-mentioned second processing unit includes: a first trigger sub-unit, which is used to trigger the adjustment of the transmission rate of the above-mentioned PCI bridge link when the accumulated first failure number of the above-mentioned PCI bridge link is greater than or equal to the above-mentioned failure threshold, so as to obtain a first adjusted transmission rate.

[0172] In an exemplary embodiment, the above-mentioned first trigger sub-unit includes at least one of the following: a first trigger sub-module, used to trigger the adjustment of the transmission rate of the above-mentioned PCISwitch device when the above-mentioned first number of failures is greater than or equal to the above-mentioned failure threshold, so as to obtain the above-mentioned first adjusted transmission rate; a second trigger sub-module, used to trigger the adjustment of the transmission rate of one or more of the above-mentioned EP devices connected in the above-mentioned PCI Switch device when the above-mentioned first number of failures is greater than or equal to the above-mentioned failure threshold, so as to obtain the above-mentioned first adjusted transmission rate.

[0173] In an exemplary embodiment, the above-mentioned device also includes: a first clearing module, which is used to trigger the adjustment of the transmission rate of the above-mentioned PCI bridge link when the accumulated first failure number of the above-mentioned PCI bridge link is greater than or equal to the above-mentioned failure threshold, and after obtaining the first adjusted transmission rate, clear the above-mentioned first failure number; a first recording module, which is used to re-record the number of failures of the above-mentioned PCI bridge link to obtain a second failure number.

[0174] In an exemplary embodiment, the above-mentioned device also includes: a first adjustment module, which is used to re-record the number of times the above-mentioned PCI bridge link fails, and after obtaining the second number of failures, when the above-mentioned second number of failures is greater than or equal to the above-mentioned failure threshold, continue to trigger the adjustment of the transmission rate of the above-mentioned PCI bridge link to obtain the second adjusted transmission rate; a first control module, which is used to control the operation of the above-mentioned PCI bridge link based on the above-mentioned second adjusted transmission rate.

[0175] In an exemplary embodiment, the above-mentioned device also includes: a first stop module, which is used to control the operation of the above-mentioned PCI bridge link based on the above-mentioned second adjusted transmission rate, and stop adjusting the transmission rate of the above-mentioned PCI bridge link when the above-mentioned second adjusted transmission rate is equal to the minimum rate of the above-mentioned PCI bridge link; a second trigger module, which is used to trigger the adjustment of the network bandwidth of the above-mentioned PCI bridge link to obtain the adjusted network bandwidth when the above-mentioned second adjusted transmission rate is equal to the minimum rate of the above-mentioned PCI bridge link and the third number of failures of the above-mentioned PCI bridge link recorded is greater than or equal to the above-mentioned failure threshold, wherein the above-mentioned third number of failures is the number of failures recorded during the operation of the above-mentioned PCI bridge link according to the above-mentioned second adjusted transmission rate.

[0176] In an exemplary embodiment, the device further includes: a first generating module, configured to trigger adjustment of the network bandwidth of the PCI bridge link when the second adjusted transmission rate is equal to the minimum rate of the PCI bridge link and the recorded third failure number of the PCI bridge link failure is greater than or equal to the failure threshold, and after obtaining the adjusted network bandwidth, generate a second fault event when the adjusted network bandwidth is equal to the minimum network bandwidth of the PCI bridge link, wherein the second fault event includes at least one of the following: a second fault event that allows repair, a second fault event that does not allow repair, a second fault event that causes the PCI bridge link to be unable to operate, and a second fault event that allows the PCI bridge link to continue to operate; a first sending module, configured to send the second fault event to the baseboard management controller in the server, wherein the baseboard management controller is configured to record the second fault event and generate the fault handling information, wherein the fault handling information is used to instruct replacement of the failed PCI Switch device and / or replacement of the EP device connected to the failed PCI Switch device.

[0177] In an exemplary embodiment, the above-mentioned device also includes: a second generating module, which is used to generate target information after adjusting the transmission rate of the above-mentioned PCI bridge link based on the above-mentioned fault threshold, and send the above-mentioned target information to the baseboard management controller deployed in the above-mentioned server, wherein the above-mentioned target information includes a target transmission rate, and the above-mentioned target transmission rate is the rate after adjusting the transmission rate of the above-mentioned PCI bridge link, and the above-mentioned target transmission rate is less than the transmission rate of the above-mentioned PCI bridge link before adjustment; a second recording module, which is used to record the above-mentioned target transmission rate through the above-mentioned baseboard management controller, and generate prompt information to prompt that the first failure number of the above-mentioned PCI bridge link is greater than the above-mentioned failure threshold.

[0178] In an exemplary embodiment, the above-mentioned first detection module includes: a first detection unit, used to start the above-mentioned fault handling system when starting the above-mentioned server, and detect N levels on the above-mentioned PCI bridge link, wherein the above-mentioned N is a natural number greater than or equal to 1; a first determination unit, used to determine the type of the above-mentioned PCI device in each of the above-mentioned levels.

[0179] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0180] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0181] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0182] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer non-volatile readable storage medium; a processor of a computer device reads the computer instructions from the computer non-volatile readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.

[0183] The present application also provides a computer non-volatile readable storage medium, which stores a computer program that executes a PCI device fault handling method when executed by a processor.

[0184] like Fig.11 As shown, it is a schematic diagram of an embodiment of a computer non-volatile readable storage medium of the PCI device fault handling method provided by the present application. Fig.11 Taking the computer non-volatile readable storage medium as an example, the computer non-volatile readable storage medium 1101 stores a computer program 1102 that performs the above method when executed by a processor.

[0185] like Fig.12 , which is a schematic diagram of the hardware structure of an electronic device of an embodiment of the PCI device fault handling method provided by the present application.

[0186] As Fig.12 Taking the device shown as an example, the device includes a processor 1201 and a memory 1202.

[0187] The processor 1201 and the memory 1202 may be connected via a bus or other means. Fig.12 The example of connecting through bus is taken in the following.

[0188] The memory 1202 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the PCI device fault handling method in the embodiment of the present application. The processor 1201 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 1202, that is, implementing the PCI device fault handling method.

[0189] The memory 1202 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of the fault handling method of the PCI device, etc. In addition, the memory 1202 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 1202 may optionally include a memory remotely arranged relative to the processor 1201, and these remote memories may be connected to the local module via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0190] Computer instructions 1203 corresponding to the fault handling method for one or more PCI devices are stored in the memory 1202. When executed by the processor 1201, the fault handling method for the PCI device in any of the above method embodiments is executed.

[0191] Any embodiment of a computer device that executes the above-mentioned PCI device fault handling method can achieve the same or similar effect as any corresponding embodiment of the above-mentioned method.

[0192] Finally, it should be noted that a person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the program of the PCI device fault handling method can be stored in a computer non-volatile readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the non-volatile readable storage medium of the program can be a disk, an optical disk, a read-only storage memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiment can achieve the same or similar effect as any corresponding method embodiment described above.

[0193] The above are exemplary embodiments disclosed in the present application, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present application as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present application may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.

[0194] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.

[0195] The serial numbers of the embodiments disclosed in the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0196] A person of ordinary skill in the art will appreciate that all or part of the steps for implementing the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer non-volatile readable storage medium, and the above-mentioned non-volatile readable storage medium may be a read-only memory, a disk or an optical disk, etc.

[0197] A person of ordinary skill in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present application (including the claims) is limited to these examples; under the idea of ​​the embodiments of the present application, the technical features in the above embodiments or different embodiments may also be combined, and there are many other changes in different aspects of the embodiments of the present application as above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.

Claims

1. A PCI device fault handling method, characterized in that: Applied to a fault handling system, the fault handling system is arranged on a mainboard of a server, the fault handling system is connected to a PCI bridge link deployed in the server, and the method comprises: Detecting a PCI device connected to the PCI bridge link, wherein the PCI device includes an EP device and / or a PCISwitch device, and the PCI Switch device allows connecting multiple EP devices; Determine a fault handling method for the PCI device according to the detected PCI device, and handle the fault of the PCI device according to the fault handling method; Among them, when the PCI device connected to the PCI bridge link is only the EP device, the fault handling function of the EP device is started, and the fault handling function is a function set in the EP device, and the fault handling function is used to handle the fault of the EP device; when the PCI device connected to the PCI bridge link includes the PCISwitch device, the fault threshold of the PCI Switch device is set, and the transmission rate of the PCI bridge link is adjusted based on the fault threshold, the fault threshold is used to represent the threshold for recording the number of failures of the PCI Switch device, and the fault handling method includes the fault handling function and the method of setting the fault threshold of the PCI Switch device.

2. The method according to claim 1, characterized in that In a case where the PCI device connected to the PCI bridge link is only the EP device, starting a fault handling function of the EP device includes: In the case that the PCI device connected to the PCI bridge link is only the EP device, the AER function of the EP device is set to an enabled state or a started state to start a fault handling function of the EP device, wherein the AER function includes the fault handling function.

3. The method according to claim 1, characterized in that: In the case that the PCI device connected to the PCI bridge link is only the EP device, after starting the fault handling function of the EP device, the method further includes: Monitoring a first fault event of the EP device, wherein the first fault event includes at least one of the following: a first fault event that allows repair, a first fault event that does not allow repair, a first fault event that causes the EP device to be unable to operate, and a first fault event that allows the EP device to continue to operate; In case the first fault event is detected, reporting the first fault event to a target operating system and a baseboard management controller in the server; Among them, the target operating system is used to perform one of the following operations based on the first fault event: restart the server, perform a self-check operation, and generate fault prompt information; the baseboard management controller is used to perform at least one of the following operations based on the first fault event: record the first fault event, perform a troubleshooting operation, and repair the first fault event.

4. The method according to claim 1, characterized in that: In a case where the PCI device connected to the PCI bridge link includes the PCI Switch device, setting a fault threshold of the PCI Switch device includes: In a case where the PCI device connected to the PCI bridge link includes the PCI Switch device, determining a target register set in the PCI Switch device, wherein the target register is used to record the number of failures of the PCI Switch device; The fault threshold of the target register is set according to a preset condition.

5. The method according to claim 4, characterized in that The PCI device connected to the PCI bridge link includes the PCI Switch device, including one of the following: The PCI device connected to the PCI bridge link is only the PCI Switch device; The PCI device connected to the PCI bridge link is only the PCI Switch device, and one or more EP devices are connected to the PCI Switch device; The PCI devices connected to the PCI bridge link include the PCI Switch device and the EP device, and the PCI Switch device is connected to the first processor in the server, and the EP device is connected to the second processor in the server; The PCI devices connected to the PCI bridge link include the PCI Switch device and the EP device, and the PCI Switch device is connected to the first processor in the server, one or more other EP devices are connected to the PCI Switch device, and the EP device is connected to the second processor in the server.

6. The method according to claim 4, characterized in that Setting the fault threshold of the target register according to a preset condition includes: The fault threshold of the target register is set according to the preset condition and by at least one of the following operations: Determine the operation information of the PCI Switch device, and set the fault threshold based on the operation information, wherein the operation information includes at least one of the following: operation environment, operation performance, operation safety performance, and operation stability performance; A first number of the PCI Switch devices and a second number of the EP devices connected to the PCI Switch device are determined, and the failure threshold is set based on the first number and the second number.

7. The method according to claim 4, characterized in that After setting the fault threshold of the target register according to a preset condition, the method further includes: Detecting the PCI Switch device and one or more EP devices connected to the PCI Switch device; When the PCI Switch device fails or any of the EP devices connected to the PCI Switch device fails, the counter in the target register is triggered to perform a fault accumulation operation, wherein the fault accumulation operation is used to accumulate the number of times the PCI Switch device fails.

8. The method according to claim 1, characterized in that In the case where the PCI device connected to the PCI bridge link includes the PCI Switch device, before setting the fault threshold of the PCI Switch device, the method further includes one of the following: When one or more of the EP devices are connected to the PCI Switch device, a fault handling function of the EP device is enabled, and a result of the fault handling by the EP device according to the fault handling function is received through the PCI Switch device; When the PCI Switch device is connected to the first processor in the server and the EP device is connected to the second processor in the server, disabling a fault handling function of the EP device; When the PCI Switch device is connected to the first processor in the server, one or more other EP devices are connected to the PCI Switch device, and the EP device is connected to the second processor in the server, a fault handling function of the EP device is turned off, other fault handling functions of the other EP devices are turned on, and results of fault handling by the other EP devices according to the other fault handling functions are received through the PCISwitch device.

9. The method according to claim 1, characterized in that: Adjusting the transmission rate of the PCI bridge link based on the fault threshold includes: When the accumulated first number of failures of the PCI bridge link is greater than or equal to the failure threshold, the transmission rate of the PCI bridge link is adjusted to obtain a first adjusted transmission rate.

10. The method according to claim 9, characterized in that When the accumulated first number of failures of the PCI bridge link is greater than or equal to the failure threshold, triggering adjustment of the transmission rate of the PCI bridge link to obtain a first adjusted transmission rate includes at least one of the following: When the first number of failures is greater than or equal to the failure threshold, triggering adjustment of the transmission rate of the PCI Switch device to obtain the first adjusted transmission rate; When the first number of failures is greater than or equal to the failure threshold, adjusting the transmission rate of one or more EP devices connected to the PCI Switch device is triggered to obtain the first adjusted transmission rate.

11. The method according to claim 9, characterized in that When the accumulated first number of failures of the PCI bridge link is greater than or equal to the failure threshold, triggering adjustment of the transmission rate of the PCI bridge link, and obtaining a first adjusted transmission rate, the method further includes: Clearing the first fault number; The number of times the PCI bridge link fails is re-recorded to obtain a second number of failures.

12. The method according to claim 11, characterized in that After re-recording the number of failures of the PCI bridge link to obtain a second number of failures, the method further includes: When the second number of failures is greater than or equal to the failure threshold, continue to trigger adjustment of the transmission rate of the PCI bridge link to obtain a second adjusted transmission rate; Operation of the PCI bridge link is controlled based on the second adjusted transfer rate.

13. The method according to claim 12, characterized in that After controlling the operation of the PCI bridge link based on the second adjusted transmission rate, the method further includes: When the second adjusted transmission rate is equal to the lowest rate of the PCI bridge link, stop adjusting the transmission rate of the PCI bridge link; When the second adjusted transmission rate is equal to the minimum rate of the PCI bridge link, and the third failure number recorded for the PCI bridge link is greater than or equal to the failure threshold, trigger adjustment of the network bandwidth of the PCI bridge link to obtain the adjusted network bandwidth, wherein the third failure number is the failure number recorded during the operation of the PCI bridge link at the second adjusted transmission rate.

14. The method according to claim 12, characterized in that When the second adjusted transmission rate is equal to the lowest rate of the PCI bridge link, and the recorded third failure number of the PCI bridge link failure is greater than or equal to the failure threshold, triggering adjustment of the network bandwidth of the PCI bridge link, and obtaining the adjusted network bandwidth, the method further includes: In the case where the adjusted network bandwidth is equal to the lowest network bandwidth of the PCI bridge link, a second fault event is generated, wherein the second fault event includes at least one of the following: a second fault event that allows repair, a second fault event that does not allow repair, a second fault event that causes the PCI bridge link to be unable to operate, and a second fault event that the PCI bridge link can continue to operate; The second fault event is sent to the baseboard management controller in the server, wherein the baseboard management controller is used to record the second fault event and generate the fault handling information, wherein the fault handling information is used to instruct replacement of the failed PCI Switch device and / or replacement of the EP device connected to the failed PCI Switch device.

15. The method according to claim 1, characterized in that After adjusting the transmission rate of the PCI bridge link based on the fault threshold, the method further includes: Generate target information, and send the target information to a baseboard management controller deployed in the server, wherein the target information includes a target transmission rate, the target transmission rate is the rate after the transmission rate of the PCI bridge link is adjusted, and the target transmission rate is less than the transmission rate before the PCI bridge link is adjusted; The target transmission rate is recorded by the baseboard management controller, and prompt information is generated to prompt that the first failure number of the PCI bridge link failure is greater than the failure threshold.

16. The method according to claim 1, characterized in that Detecting a PCI device connected to the PCI bridge link includes: When starting the server, starting the fault handling system to detect N levels on the PCI bridge link, wherein N is a natural number greater than or equal to 1; The type of the PCI device in each of the levels is determined.

17. A fault handling system, characterized in that: The fault handling system is arranged on a mainboard of the server, and the fault handling system comprises a target processor, and the target processor is connected to a PCI bridge link deployed in the server, and the target processor is used to implement the steps of the method described in any one of claims 1-16.

18. A server, characterized in that: include: A PCI bridge link, and a fault handling system as claimed in claim 17, wherein a PCI device is connected to the PCI bridge link.

19. A PCI device fault handling device, characterized in that: Applied to a fault handling system, the fault handling system is arranged on a mainboard of a server, the fault handling system is connected to a PCI bridge link deployed in the server, and the device comprises: A first detection module is used to detect a PCI device connected to the PCI bridge link, wherein the PCI device includes an EP device and / or a PCI Switch device, and a plurality of the EP devices are allowed to be connected to the PCI Switch device; A first processing module, configured to determine a fault processing method of the PCI device according to the detected PCI device, and process the fault of the PCI device according to the fault processing method; Among them, the first processing module includes: a first processing unit, which is used to start the fault handling function of the EP device when the PCI device connected to the PCI bridge link is only the EP device, and the fault handling function is a function set in the EP device, and the fault handling function is used to handle the fault of the EP device; a second processing unit, which is used to set the fault threshold of the PCI Switch device when the PCI device connected to the PCI bridge link includes the PCI Switch device, and adjust the transmission rate of the PCI bridge link based on the fault threshold, the fault threshold is used to represent the threshold for recording the number of failures of the PCI Switch device, and the fault handling method includes the fault handling function and the method of setting the fault threshold of the PCI Switch device.

20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 16 are implemented.

21. A computer non-volatile readable storage medium, characterized in that: The computer non-volatile readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 16 when executed by a processor.

22. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 16 are implemented.