IP Library Granted Patent US 11,068,360
Granted Patent B2
US 11,068,360 · App. 17/038,428 · Granted Jul 20, 2021

Error recovery method and apparatus based on a lockup mechanism

Inventors: Dongjiu Geng (Shanghai, CN); Shuo Li (Beijing, CN); Yongxiang Liang (Beijing, CN); Qiangmin Lin (Hangzhou, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
G06F11/1687G06F11/1629G06F11/1641G06F2201/82
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,068,360
App. No.
17/038,428
Granted
Jul 20, 2021
Kind
B2
Abstract

An error recovery method and apparatus, and a system are disclosed. At least two CPUs in a lockstep mode can exit the lockstep mode when an error occurs in at least one CPU, and the CPU in which the error occurs and a type of the error are determined. When the error can be recovered, the CPU in which the error occurs can be recovered according to a correctly running CPU. This helps the at least two CPUs run again at a position at which a service program is interrupted.

Claims (59)

1. An error recovery method, comprising:

receiving an interrupt triggered by an error that occurs in a first central processing unit (CPU), when the first CPU and a second CPU are operating in a lockstep mode;

exiting, by the first CPU, the lockstep mode in response to the interrupt;

determining a type of the error; and

in response to determining that the error is a recoverable error, performing error recovery on the first CPU according to a state of the second CPU that is correctly running at a time of triggering the interrupt, including:

obtaining, through a hardware channel between the first CPU and the second CPU, a software-visible CPU context of the second CPU at the time of triggering the interrupt, and

updating, according to the software-visible CPU context of the second CPU, a software-visible CPU context of the first CPU, wherein the software-visible CPU context of the second CPU comprises a value of a system register and a value of a general purpose register.

2. The method according to claim 1 , further comprising:

after the software-visible CPU context of the first CPU is updated, resetting a respective software-invisible microarchitecture state of the first CPU and the second CPU, and

retaining the respective software-visible CPU context of the first CPU and the second CPU, so that the first CPU and the second CPU re-enter the lockstep mode.

3. The method according to claim 1 , wherein determining a type of the error comprises:

determining the type of the error according to an advanced configuration and power management interface (ACPI) table corresponding to the first CPU, wherein the ACPI table is used to record an error found when a status register of a reliability, availability, and serviceability (RAS) node of a CPU is polled; or

polling a status register of an RAS node of the first CPU to determine the type of the error.

4. The method according to claim 1 , wherein the interrupt is sent by an interrupt controller, and the interrupt controller sends the interrupt to the first CPU and the second CPU when a comparator circuit determines that outputs of the first CPU and the second CPU are inconsistent.

5. The method according to claim 4 , wherein the output of each of the first CPU and the second CPU comprises at least one of an internal bus output of the corresponding CPU, an external bus output of the corresponding CPU, or an L3 cache control logic output of the corresponding CPU.

6. The method according to claim 4 , wherein determining a type of the error comprises:

querying a status register of an RAS node corresponding to the comparator circuit to determine the type of the error.

7. The method according to claim 1 , further comprising:

stopping running the first CPU and the second CPU when the error is an unrecoverable error.

8. The method according to claim 1 , wherein the recoverable error is a non-uncontainable error or a system suspension.

9. An error recovery apparatus, comprising:

a first central processing unit (CPU); and

a second CPU, wherein

the first CPU is configured to:

receive an interrupt triggered by an error that occurs in the first CPU when the first CPU and the second CPU are operating in a lockstep mode;

exit the lockstep mode in response to the interrupt;

determine a type of the error; and

when the error is a recoverable error, perform error recovery according to a state of the second CPU at a time of triggering the interrupt; and

the second CPU is configured to receive the interrupt and exit the lockstep mode;

the first CPU is further configured to: obtain, through a hardware channel between the first CPU and the second CPU, a software-visible CPU context of the second CPU at the time of triggering the interrupt, and update, according to the software-visible CPU context of the second CPU, a software-visible CPU context of the first CPU, wherein the CPU context comprises a value of a system register and a value of a general purpose register.

10. The apparatus according to claim 9 , wherein

the first CPU is further configured to: after the software-visible CPU context is updated, reset a software-invisible microarchitecture state of the first CPU, and retain the software-visible CPU context of the first CPU, so that the first CPU re-enters the lockstep mode; and

the second CPU is further configured to: after the software-visible CPU context of the first CPU is updated, reset a software-invisible microarchitecture state of the second CPU, and retain the software-visible CPU context of the second CPU, so that the second CPU re-enters the lockstep mode.

11. The apparatus according to claim 9 , wherein the first CPU is configured to:

determine the type of the error according to an advanced configuration and power management interface (ACPI) table corresponding to the first CPU, wherein the ACPI table is used to record an error found when a status register of a reliability, availability, and serviceability (RAS) node of a CPU is polled; or

poll a status register of an RAS node of the first CPU to determine the type of the error.

12. The apparatus according to claim 9 , wherein

the interrupt is sent by an interrupt controller, and the interrupt controller sends the interrupt to the first CPU and the second CPU when a comparator circuit determines that outputs of the first CPU and the second CPU are inconsistent.

13. The apparatus according to claim 12 , wherein the output of each of the first CPU and the second CPU comprises at least one of an internal bus output of the corresponding CPU, an external bus output of the corresponding CPU, and an L3 cache control logic output of the corresponding CPU.

14. The apparatus according to claim 12 , wherein the first CPU is further configured to:

query a status register of an RAS node corresponding to the comparator circuit to determine the first CPU in which the error occurs and the type of the error.

15. The apparatus according to claim 9 , further comprising an interrupt controller and a comparator circuit, wherein

the comparator circuit is configured to obtain outputs of the first CPU and the second CPU and send a first signal to the interrupt controller to request the interrupt controller to send an interrupt to the first CPU and the second CPU, in response to determining that the outputs of the first CPU and the second CPU are inconsistent; and

the interrupt controller sends the interrupt to the first CPU and the second CPU according to the first signal.

16. The apparatus according to claim 9 , wherein the recoverable error is a non-uncontainable error or a system suspension.

17. An error recovery method, comprising:

receiving an interrupt triggered by an error that occurs in a first central processing unit (CPU), when the first CPU and a second CPU are operating in a lockstep mode;

exiting, by the first CPU, the lockstep mode in response to the interrupt;

determining a type of the error; and

in response to determining that the error is a recoverable error, performing following operations:

obtaining, from a memory, a software-visible CPU context of the second CPU at the time of triggering the interrupt, and

updating, according to the software-visible CPU context of the second CPU, a software-visible CPU context of the first CPU, wherein the software-visible CPU context of the second CPU comprises a value of a system register and a value of a general purpose register,

resetting a respective software-invisible microarchitecture state of the first CPU and the second CPU, and

retaining the respective software-visible CPU context of the first CPU and the second CPU, so that the first CPU and the second CPU re-enter the lockstep mode.

18. The method according to claim 17 , wherein the recoverable error is a non-uncontainable error or a system suspension.

19. The method according to claim 17 , wherein determining a type of the error comprises:

determining the type of the error according to an advanced configuration and power management interface (ACPI) table corresponding to the first CPU, wherein the ACPI table is used to record an error found when a status register of a reliability, availability, and serviceability (RAS) node of a CPU is polled; or

polling a status register of an RAS node of the first CPU to determine the type of the error.

20. The method according to claim 17 , wherein an output of each of the first CPU and the second CPU comprises at least one of an internal bus output of the corresponding CPU, an external bus output of the corresponding CPU, or an L3 cache control logic output of the corresponding CPU.

Assignments (3)
CHANGE OF NAME Recorded Apr 28, 2026
From: SHENZHEN YINWANG INTELLIGENT TECHNOLOGIES CO., LTD.
To: YINWANG INTELLIGENT TECHNOLOGIES CO., LTD.
Reel/Frame 075485/0524 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 12, 2024
From: HUAWEI TECHNOLOGIES CO., LTD.
To: SHENZHEN YINWANG INTELLIGENT TECHNOLOGIES CO., LTD.
Reel/Frame 069335/0872 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 30, 2020
From: GENG, DONGJIU; LI, SHUO; LIANG, YONGXIANG; LIN, QIANGMIN
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 054223/0223 →