Microprocessor that facilitates task switching between encrypted and unencrypted programs
First Claim
1. A microprocessor, comprising:
- an architected register, having a bit; and
a fetch unit;
wherein the microprocessor is configured to save a value of the bit, in response to receiving a request to interrupt a currently executing program, wherein the bit indicates whether the currently executing program is encrypted or unencrypted;
wherein the microprocessor is further configured to restore the saved value to the bit and to resume fetching the interrupted program as the currently executing program, in response to executing a return from interrupt instruction;
wherein if the restored value of the bit is set, the microprocessor is configured to restore decryption key values associated with the currently executing program, prior to resuming fetching the interrupted program, and to decrypt fetched instructions thereof using the restored decryption key values;
wherein to restore the decryption key values, the microprocessor is configured to load the decryption key values from a storage element to a register file, wherein the storage element is configured to store decryption key values associated with each of a plurality of encrypted programs;
wherein if the restored value of the bit is clear, the microprocessor is configured to refrain from decrypting the fetched instructions of the currently executing program.
1 Assignment
0 Petitions
Accused Products
Abstract
A microprocessor includes an architected register having a bit (may be x86 EFLAGS register reserved bit) set by the microprocessor. A fetch unit fetches encrypted instructions from an instruction cache and decrypts them (via XOR) prior to executing them, in response to the microprocessor setting the bit. The microprocessor saves the bit value to a stack in memory and then clears the bit in response to receiving an interrupt. The fetch unit fetches unencrypted instructions from the instruction cache and executes them without decrypting them after the microprocessor clears the bit. The microprocessor restores the saved value from the stack in memory to the bit in the architected register (and in one embodiment, also restores decryption key values) in response to executing a return from interrupt instruction. The fetch unit resumes fetching and decrypting the encrypted instructions in response to determining that the restored value of the bit is set.
-
Citations
10 Claims
-
1. A microprocessor, comprising:
-
an architected register, having a bit; and a fetch unit; wherein the microprocessor is configured to save a value of the bit, in response to receiving a request to interrupt a currently executing program, wherein the bit indicates whether the currently executing program is encrypted or unencrypted; wherein the microprocessor is further configured to restore the saved value to the bit and to resume fetching the interrupted program as the currently executing program, in response to executing a return from interrupt instruction; wherein if the restored value of the bit is set, the microprocessor is configured to restore decryption key values associated with the currently executing program, prior to resuming fetching the interrupted program, and to decrypt fetched instructions thereof using the restored decryption key values; wherein to restore the decryption key values, the microprocessor is configured to load the decryption key values from a storage element to a register file, wherein the storage element is configured to store decryption key values associated with each of a plurality of encrypted programs; wherein if the restored value of the bit is clear, the microprocessor is configured to refrain from decrypting the fetched instructions of the currently executing program. - View Dependent Claims (2, 3, 5)
-
-
4. A microprocessor, comprising:
-
an architected register, having a bit; and a fetch unit; wherein the microprocessor is configured to save a value of the bit, in response to receiving a request to interrupt a currently executing program, wherein the bit indicates whether the currently executing program is encrypted or unencrypted; wherein the microprocessor is further configured to restore the saved value to the bit and to resume fetching the interrupted program as the currently executing program, in response to executing a return from interrupt instruction; wherein if the restored value of the bit is set, the microprocessor is configured to restore decryption key values associated with the currently executing program, prior to resuming fetching the interrupted program, and to decrypt fetched instructions thereof using the restored decryption key values; wherein if the restored value of the bit is clear, the microprocessor is configured to refrain from restoring decryption key values and from decrypting the fetched instructions of the currently executing program; wherein to decrypt the fetched instructions using the restored decryption key values the microprocessor is configured to perform a Boolean exclusive-OR (XOR) operation of the fetched instructions with a decryption key derived from the decryption key values; and wherein to refrain from decrypting the fetched instructions the microprocessor is configured to perform a Boolean exclusive-OR (XOR) operation of the fetched instructions with zeroes.
-
-
6. A method for operating a microprocessor, the method comprising:
-
saving a value of a bit of the microprocessor, in response to receiving a request to interrupt a currently executing program, wherein the bit indicates whether the currently executing program is encrypted or unencrypted; in response to executing a return from interrupt instruction, restoring the saved value to the bit and resuming fetching the interrupted program as the currently executing program; if the restored value of the bit is set, restoring decryption key values associated with the currently executing program, prior to said resuming fetching the interrupted program, and decrypting fetched instructions thereof using the restored decryption key values; wherein said restoring decryption key values comprises loading the decryption key values from a storage element to a register file, wherein the storage element is configured to store decryption key values associated with each of a plurality of encrypted programs; and if the restored value of the bit is clear, refraining from decrypting the fetched instructions of the currently executing program. - View Dependent Claims (7, 8, 9)
-
-
10. A method for operating a microprocessor, the method comprising:
-
saving a value of a bit of the microprocessor, in response to receiving a request to interrupt a currently executing program wherein the bit indicates whether the currently executing program is encrypted or unencrypted; in response to executing a return from interrupt instruction, restoring the saved value to the bit and resuming fetching the interrupted program as the currently executing program; if the restored value of the bit is set, restoring decryption key values associated with the currently executing program, prior to said resuming fetching the interrupted program, and decrypting fetched instructions thereof using the restored decryption key values; if the restored value of the bit is clear, refraining from restoring decryption key values and from decrypting the fetched instructions of the currently executing program; wherein said decrypting the fetched instructions using the restored decryption key values comprises performing a Boolean exclusive-OR (XOR) operation of the fetched instructions with a decryption key derived from the decryption key values; and wherein said refraining from decrypting the fetched instructions comprises performing a Boolean exclusive-OR (XOR) operation of the fetched instructions with zeroes.
-
Specification