# US 2013/0254612 A1 · Transparent recovery from hardware memory errors

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2013/0254612 A1
- Document ID: US20130254612A1
- Status: Published application
- Kind: A1
- Application number: 13/893,465
- Filed: 2013-05-14
- Published: 2013-09-26
- Earliest claimed: 2009-12-11
- Assignees: VMware, Inc.
- Applicants: VMware, Inc.
- Inventors: Carl A. WALDSPURGER; Dilpreet BINDRA; Gregory HARM; Patrick TULLMANN
- Web page: https://patentgrep.com/patent/US20130254612A1

## CPC

- G06F 11/08: Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F 11/141: {for bus or memory accesses}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method is provided for recovering from an uncorrected memory error located at a memory address as identified by a memory device. A stored hash value for a memory page corresponding to the identified memory address is used to determine the correct data. Because the memory device specifies the location of the corrupted data, and the size of the window where the corruption occurred, the stored hash can be used to verify memory page reconstruction. With the known good part of the data in hand, the hashes of the pages using possible values in place of the corrupted data are calculated. It is expected that there will be a match between the previously stored hash and one of the computed hashes. As long as there is one and only one match, then that value, used in the place of the corrupted data, is the correct value. The corrupt data, once replaced, allows operation of the memory device to continue without needing to interrupt or otherwise affect a system's operation.

## Claims

### Claim 1

A computer program product stored on a non-transitory computer readable medium and configured to perform a computer-implemented method of recovering from a data corruption event in a memory device in a virtualized computer system, the virtualized computer system running a guest operating system on hardware, the virtualized system comprising a virtual machine monitor (VMM) maintaining page table information, the method comprising:
the VMM receiving information from the memory device regarding a first memory address and a corruption window having a window length of n data bits starting at the first memory address;
the VMM identifying, in the maintained page table information, a first page of memory corresponding to the first memory address, the first memory page storing data including the corrupted data;
the VMM identifying a stored hash of the data of the first memory page generated prior to the data corruption event;
the VMM retrieving all data from the corresponding first page of memory, including the data at the first memory address and the corrupt n data bits;
the VMM generating, up to a predetermined number, a plurality of different possible replacement values for the corrupt n data bits; and
the VMM identifying one and only one replacement value for the corrupt n data bits that, when inserted in place of the corrupt n data bits, results in the first page of memory having a hash value that is equal to the stored hash value.

### Claim 2 (depends on 1)

The computer program product of claim 1, wherein the generating the plurality of different possible replacement values comprises:
generating 2n different data values comprising all possible combinations of data within the corruption window.

### Claim 3 (depends on 1)

The computer program product of claim 1, wherein the generating the plurality of different possible replacement values comprises:
generating (n*(n−1)/2) different data values comprising all possible combinations of 2-bit data flips within the corruption window.

### Claim 4 (depends on 1)

The computer program product of claim 1, wherein the generating the plurality of different possible replacement values comprises:
generating n different data values comprising all possible combinations of 1-bit data flips within the corruption window.

### Claim 5 (depends on 1)

The computer program product of claim 1, further comprising:
copying the data of the retrieved first memory page to a newly allocated second memory page in memory, wherein the generating the plurality of different possible replacement values is performed on the data stored in the second memory page.

### Claim 6 (depends on 5)

The computer program product of claim 5, further comprising:
replacing all mappings to the first memory page with mappings to the second memory page.

### Claim 7 (depends on 6)

The computer program product of claim 6, further comprising:
making the first memory page unavailable to any process in the system.

### Claim 8

A computer system including a storage device storing computer instructions configured to perform a computer-implemented method of recovering from a data corruption event in a memory device in the computer system, the computer system further including one or more central processing units for executing the computer instructions, the computer system running a virtual machine monitor (VMM), the VMM supporting operation of a guest operating system and maintaining page table information, the method comprising:
the VMM receiving information from the memory device regarding a first memory address and a corruption window having a window length of n data bits starting at the first memory address;
the VMM identifying, in the maintained page table information, a first page of memory corresponding to the first memory address, the first memory page storing data including the corrupted data;
the VMM identifying a stored hash of the data of the first memory page generated prior to the data corruption event;
the VMM retrieving all data from the corresponding first page of memory, including the data at the first memory address and the corrupt n data bits;
the VMM generating, up to a predetermined number, a plurality of different possible replacement values for the corrupt n data bits; and
the VMM identifying one and only one replacement value for the corrupt n data bits that, when inserted in place of the corrupt n data bits, results in the first page of memory having a hash value that is equal to the stored hash value.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein the generating the plurality of different possible replacement values comprises:
generating 2n different data values comprising all possible combinations of data within the corruption window.

### Claim 10 (depends on 8)

The computer program product of claim 8, wherein the generating the plurality of different possible replacement values comprises:
generating (n*(n−1)/2) different data values comprising all possible combinations of 2-bit data flips within the corruption window.

### Claim 11 (depends on 8)

The computer program product of claim 8, wherein the generating the plurality of different possible replacement values comprises:
generating n different data values comprising all possible combinations of 1-bit data flips within the corruption window.

### Claim 12 (depends on 8)

The computer program product of claim 8, further comprising:
copying the data of the retrieved first memory page to a newly allocated second memory page in memory, wherein the generating the plurality of different possible replacement values is performed on the data stored in the second memory page.

### Claim 13 (depends on 12)

The computer program product of claim 12, further comprising:
replacing all mappings to the first memory page with mappings to the second memory page.

### Claim 14 (depends on 13)

The computer program product of claim 13, further comprising:
making the first memory page unavailable to any process in the system.

### Claim 15

A computer system including a storage device storing computer instructions configured to perform a computer-implemented method of correcting corrupted data in a corruption window of length n at a first location in a memory device in the computer system, the computer system further including one or more central processing units for executing the computer instructions, the method comprising:
retrieving a stored hash HS of data stored in a first machine memory page containing the first location prior to corruption;
generating a plurality of data values;
for each respective data value from the plurality of generated data values:
replacing the corrupted data in the corruption window with the respective data value;
generating a hash HC of the first machine memory page with the respective data value in the corruption window;
comparing the calculated hash value HC to the stored hash value HS; and
if HC=HS, identifying the corresponding data value as a replacement data value; and
if one and only one replacement data value has been identified after all data values from the plurality of data values have been inserted, replacing the data in the corruption window of the first memory page with the identified replacement data value.

### Claim 16 (depends on 15)

The computer system of claim 15, wherein generating the plurality of data values comprises:
generating all unique possible values for the data in the corruption window.

### Claim 17 (depends on 15)

The computer system of claim 15, wherein generating the plurality of data values comprises:
generating all unique 1-bit data flip values for the corruption window.

### Claim 18 (depends on 15)

The computer system of claim 15, wherein generating the plurality of data values comprises:
generating all unique 2-bit data flip values for the corruption window.

### Claim 19 (depends on 15)

The computer system of claim 15, further comprising:
copying the data of the first memory page to a newly allocated second memory page in memory, wherein the generating the plurality of data values is performed on the data stored in the second memory page.

### Claim 20 (depends on 19)

The computer system of claim 19, further comprising:
replacing all mappings to the first memory page with mappings to the second memory page.

### Claim 21 (depends on 20)

The computer system of claim 20, further comprising:
making the first memory page unavailable to any process in the system.
