IP Library Granted Patent US 10,691,594
Granted Patent B2
US 10,691,594 · App. 16/023,717 · Granted Jun 23, 2020

Selective execution of cache line flush operations

Inventors: Vadim Sukhomlinov (Santa Clara, CA); Kshitij Doshi (Tempe, AZ)
Assignee: Intel Corporation
G06F12/0804G06F12/0875G06F12/0891G06F2212/1032G06F2212/1052G06F2212/452G06F2212/502
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 10,691,594
App. No.
16/023,717
Granted
Jun 23, 2020
Kind
B2
Abstract

The present disclosure is directed to systems and methods that include cache operation storage circuitry that selectively enables/disables the Cache Line Flush (CLFLUSH) operation. The cache operation storage circuitry may also selectively replace the CLFLUSH operation with one or more replacement operations that provide similar functionality but beneficially and advantageously prevent an attacker from placing processor cache circuitry in a known state during a timing-based, side channel attack such as Spectre or Meltdown. The cache operation storage circuitry includes model specific registers (MSRs) that contain information used to determine whether to enable/disable CLFLUSH functionality. The cache operation storage circuitry may include model specific registers (MSRs) that contain information used to select appropriate replacement operations such as Cache Line Demote (CLDEMOTE) and/or Cache Line Write Back (CLWB) to selectively replace CLFLUSH operations.

Claims (54)

1. A CPU Cache instruction substitution system, comprising:

processor circuitry

processor cache circuitry coupled to the processor circuitry;

cache operation storage circuitry;

a non-transitory storage device that includes machine-readable instructions that, when executed, cause the processor circuitry to, upon receipt of a cache line flush (CLFLUSH) operation from a kernel executed by the processor circuitry:

determine whether the kernel requesting the CLFLUSH operation is in a trusted execution mode; and

based on the detected execution mode of the requestor of the CLFLUSH operation, cause an execution of at least one of:

the CLFLUSH operation responsive to a determination that the kernel requesting the CLFLUSH operation is in a trusted execution mode; or

one or more alternative operations selected from the cache operation storage circuitry in place of the CLFLUSH operation responsive to a determination that the kernel requesting the CLFLUSH operation is not in a trusted execution mode.

2. The system of claim 1 wherein the machine-readable instructions that cause the processor circuitry to cause an execution of one or more alternative operations selected from the cache operation storage circuitry in place of the CLFLUSH operation responsive to a determination that the kernel requesting the CLFLUSH operation is not in a trusted execution mode cause the processor circuitry to:

execute at least one of: a no operation (NOP); a cache line write back (CLWB) operation; or a CLWB operation combined with a cache line demote (CLDEMOTE) operation responsive to a determination that a host kernel requesting the CLFLUSH operation is not in a trusted execution mode.

3. The system of claim 1 wherein the machine-readable instructions that cause the processor circuitry to cause an execution of one or more alternative operations selected from the cache operation storage circuitry in place of the CLFLUSH operation responsive to a determination that the processor circuitry is not in a trusted execution mode cause the processor circuitry to:

execute at least one of: a no operation (NOP); a cache line write back (CLWB) operation; a CLWB operation combined with a cache line demote (CLDEMOTE) operation; a CLFLUSH operation on a trusted platform that includes the processor circuitry; or a CLFLUSH operation on a defined portion of the processor cache circuitry responsive to a determination that a kernel in a guest virtual machine requesting the CLFLUSH operation is not in a trusted execution mode.

4. A CPU Cache instruction substitution method, comprising:

determining, by processor circuitry, whether a kernel executed by the processor circuitry and requesting a CLFLUSH operation is in a trusted execution mode; and

selectively executing by the processor circuitry, based on the detected execution mode of the requestor of the CLFLUSH operation, at least one of:

the CLFLUSH operation responsive to a determination that the kernel requesting the CLFLUSH operation is in a trusted execution mode; or

one or more alternative operations in place of the CLFLUSH operation the one or more alternative operations selected from cache operation storage circuitry coupled to the processor circuitry responsive to a determination that the kernel requesting the CLFLUSH operation is not in a trusted execution mode.

5. The method of claim 4 wherein executing the one or more alternative operations in place of the CLFLUSH operation based on the detected requestor of the CLFLUSH operation comprises:

executing, by the processor circuitry, at least one of: a no operation (NOP); a cache line write back (CLWB) operation; or a CLWB operation combined with a cache line demote (CLDEMOTE) operation responsive to a determination that a host kernel requesting the CLFLUSH operation is not in a trusted execution mode.

6. The method of claim 4 wherein executing the one or more alternative operations in place of the CLFLUSH operation based on the detected requestor of the CLFLUSH operation comprises:

executing, by the processor circuitry, at least one of: a no operation (NOP); a cache line write back (CLWB) operation; a CLWB operation combined with a cache line demote (CLDEMOTE) operation; a CLFLUSH operation on a trusted platform that includes the processor circuitry; or a CLFLUSH operation on a defined portion of the processor cache circuitry responsive to a determination that a guest kernel requesting the CLFLUSH operation is not in a trusted execution mode.

7. A CPU Cache instruction substitution system, comprising:

means for determining whether a kernel executed by processor circuitry and requesting a CLFLUSH operation is in a trusted execution mode; and

means for selectively executing, based on the detected execution mode of the requestor of the CLFLUSH operation, at least one of:

the CLFLUSH operation responsive to a determination that the kernel requesting the CLFLUSH operation is in a trusted execution mode; or

one or more alternative operations in place of the CLFLUSH operation the one or more alternative operations selected from cache operation storage circuitry coupled to the processor circuitry responsive to a determination that the kernel requesting the CLFLUSH operation is not in a trusted execution mode.

8. The system of claim 7 wherein the means for selectively executing the one or more alternative operations in place of the CLFLUSH operation based on the detected execution mode of the requestor of the CLFLUSH operation comprises:

means for selectively executing at least one of: a no operation (NOP); a cache line write back (CLWB) operation; or a CLWB operation combined with a cache line demote (CLDEMOTE) operation responsive to a determination that a host kernel requesting the CLFLUSH operation is not in a trusted execution mode.

9. The system of claim 7 wherein the means for selectively executing the one or more alternative operations in place of the CLFLUSH operation based on the detected execution mode of the requestor of the CLFLUSH operation comprises:

means for selectively executing at least one of: a no operation (NOP); a cache line write back (CLWB) operation; a CLWB operation combined with a cache line demote (CLDEMOTE) operation; a CLFLUSH operation on a trusted platform that includes the processor circuitry; or a CLFLUSH operation on a defined portion of the processor cache circuitry responsive to a determination that a guest kernel requesting the CLFLUSH operation is not in a trusted execution mode.

10. A non-transitory machine-readable storage medium containing instructions that, when executed by processor circuitry, cause the processor circuitry to:

determine whether a kernel executed by the processor circuitry and requesting a CLFLUSH operation is in a trusted execution mode; and

selectively execute, based on the detected execution mode of the requestor of the CLFLUSH operation, at least one of:

the CLFLUSH operation responsive to a determination that the kernel requesting the CLFLUSH operation is in a trusted execution mode; or

one or more alternative operations in place of the CLFLUSH operation the one or more alternative operations selected from cache operation storage circuitry coupled to the processor circuitry responsive to a determination that the kernel requesting the CLFLUSH operation is not in a trusted execution mode.

11. The non-transitory machine-readable storage medium of claim 10 wherein the instructions that cause the processor circuitry to selectively execute the one or more alternative operations in place of the CLFLUSH operation based on the detected execution mode of the requestor of the CLFLUSH operation cause the processor circuitry to:

selectively execute at least one of: a no operation (NOP); a cache line write back (CLWB) operation; or a CLWB operation combined with a cache line demote (CLDEMOTE) operation responsive to a determination that a host kernel requesting the CLFLUSH operation is not in a trusted execution mode.

12. The non-transitory machine-readable storage medium of claim 10 wherein the instructions that cause the processor circuitry to selectively execute the one or more alternative operations in place of the CLFLUSH operation based on the detected execution mode of the requestor of the CLFLUSH operation cause the processor circuitry to:

selectively execute at least one of: a no operation (NOP); a cache line write back (CLWB) operation; a CLWB operation combined with a cache line demote (CLDEMOTE) operation; a CLFLUSH operation on a trusted platform that includes the processor circuitry; or a CLFLUSH operation on a defined portion of the processor cache circuitry responsive to a determination that a guest kernel requesting the CLFLUSH operation is not in a trusted execution mode.

13. An electronic device, comprising:

a printed circuit board;

processor circuitry coupled to the printed circuit board;

processor cache circuitry coupled to the processor circuitry;

cache control instruction storage circuitry;

a non-transitory storage device that includes machine-readable instructions that, when executed, cause the processor circuitry to, upon receipt of a cache line flush (CLFLUSH) operation from a kernel executed by the processor circuitry:

determine whether the kernel requesting the CLFLUSH operation is in a trusted execution mode; and

based on the detected execution mode of the requestor of the CLFLUSH operation, cause an execution of at least one of:

the CLFLUSH operation responsive to a determination that the kernel requesting the CLFLUSH operation is not in a trusted execution mode; or

one or more alternative operations selected from the cache operation storage circuitry in place of the CLFLUSH operation responsive to a determination that a guest kernel requesting the CLFLUSH operation is not in a trusted execution mode.

14. The electronic device of claim 13 wherein the machine-readable instructions that cause the execution of one or more alternative operations selected from the cache operation storage circuitry in place of the CLFLUSH operation cause the processor circuitry to:

execute of at least one of: a no operation (NOP); a cache line write back (CLWB) operation; or a CLWB operation combined with a cache line demote (CLDEMOTE) operation responsive to a determination that a guest kernel requesting the CLFLUSH operation is not in a trusted execution mode.

15. The electronic device of claim 13 wherein the machine-readable instructions that cause the execution of one or more alternative operations selected from the cache operation storage circuitry in place of the CLFLUSH operation cause the processor circuitry to:

execute of at least one of: a no operation (NOP); a cache line write back (CLWB) operation; a CLWB operation combined with a cache line demote (CLDEMOTE) operation; a CLFLUSH operation on a trusted platform that includes the processor circuitry; or a CLFLUSH operation on a defined portion of the processor cache circuitry responsive to a determination that a guest kernel requesting the CLFLUSH operation is in a trusted execution mode.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 29, 2018
From: SUKHOMLINOV, VADIM; DOSHI, KSHITIJ
To: INTEL CORPORATION
Reel/Frame 046241/0185 →
Continuity (1)
Related Publication 20190042417A1 · Feb 7, 2019