ISA-accessible, physically non-replicable functions
PUF-generated encryption keys and the TD architecture enhance security by protecting sensitive information from hardware attacks and isolating customer workloads, addressing vulnerabilities in existing encryption and virtualization systems.
Patent Information
- Application Number
- JP2022108029
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-09-25
- Filing Date
- 2022-07-04
- Publication Date
- 2026-11-11
- Estimated Expiration
- 2042-07-04
AI Technical Summary
Existing encryption schemes are vulnerable to hardware attacks and side-channel attacks, compromising the security of sensitive information stored on computers, and traditional virtualization systems fail to isolate customer workloads from the tenant's trusted computing base (TCB) effectively.
Implementing a physically unclonable function (PUF) to generate unique encryption keys for securing sensitive information and using a Trusted Domain (TD) architecture to isolate customer workloads, which includes memory encryption, resource management, and execution state isolation, thereby reducing the TCB and enhancing security in virtualized systems.
The PUF-based encryption provides robust protection against hardware attacks and side-channel attacks, while the TD architecture ensures secure isolation of customer workloads from CSP software, reducing the TCB and maintaining security and functionality in virtualized environments.
Smart Images

Figure 0007947701000010 
Figure 0007947701000011 
Figure 0007947701000012
Abstract
Description
BACKGROUND ART
[0001] A physically unclonable function (PUF) is a physical object that provides a physically defined output (response) that functions as a unique identifier for a semiconductor device (e.g., a processor) in response to a given input and condition (challenge). An exemplary PUF is an array of transistor devices, the response of which is based on inherent physical variations that occur naturally during semiconductor manufacturing. Due to this inherent response, the PUF provides platform-specific entropy that can be used to generate an unclonable cryptographic key. For example, it is the same value generated across boots. Since the PUF-generated entropy is unique to a platform (e.g., a desktop computer, a laptop computer, a tablet computer, etc.), the same PUF circuit used on different platforms will generate different entropy, making the cryptographic key generated by the PUF unclonable. BRIEF DESCRIPTION OF THE DRAWINGS
[0002] Various embodiments according to the present disclosure are described with reference to the following drawings.
[0003] [Figure 1] 1 is a schematic block diagram of a computing system that provides isolation in a virtualization system using TD, according to one implementation of the present disclosure.
[0004] [Figure 2(A)] Illustrates an example of using a PUF to generate and use keys for wrapping and unwrapping data, according to the present embodiment.
[0005] [Figure 2(B)] Illustrates an exemplary process for wrapping and unwrapping a secret, according to the present embodiment.
[0006] [Figure 2(C)]This embodiment demonstrates another exemplary process for wrapping and unwrapping a secret.
[0007] [Figure 2(D)] This document presents an overall flow that enables the generation of transferable blobs, maximizing the use of PUF, through several embodiments.
[0008] [Figure 3] This shows a hardware embodiment for processing instructions such as SV-PUF instructions.
[0009] [Figure 4] This is a functional block diagram showing bit vectors representing the platform / processor configuration into which the wrapped data is combined.
[0010] [Figure 5] This describes one embodiment of a method executed by a processor to process WRP instructions.
[0011] [Figure 6(A)] This embodiment describes a method for executing a wrap (WRP) instruction. [Figure 6(B)] This embodiment describes a method for executing a wrap (WRP) instruction.
[0012] [Figure 7] This shows an embodiment of pseudocode for executing the WRP instruction.
[0013] [Figure 8] This document illustrates an embodiment for processing UNWRP instructions.
[0014] [Figure 9(A)] This embodiment describes the method performed by the processor to execute the unwrap (UNWRP) instruction. [Figure 9(B)]illustrates a method performed by a processor to execute an UNWRP (unwrap) instruction according to the present embodiment.
[0015] [Figure 10] illustrates an embodiment of pseudo code for executing the UNWRP instruction.
[0016] [Figure 11] illustrates an embodiment of a signature data structure used to define which signature algorithm to use during execution of UNWRPMAC.
[0017] [Figure 12] illustrates an embodiment of processing the UNWRPMAC instruction.
[0018] [Figure 13(A)] illustrates a method 1302 performed by a processor to process the UNWRPMAC instruction according to the present embodiment. [Figure 13(B)] illustrates a method 1302 performed by a processor to process the UNWRPMAC instruction according to the present embodiment.
[0019] [Figure 14] illustrates an embodiment of pseudo code for executing the UNWRPMAC instruction.
[0020] [Figure 15] illustrates an example of configuring a protection domain using configuration instructions.
[0021] [Figure 16] illustrates an exemplary configuration for KEYID_CTRL to be stored in one of the "other" registers.
[0022] [Figure 17] illustrates an embodiment of processing the PCONFIG instruction.
[0023] [Figure 18(A)]This embodiment describes how the processor executes encryption key programming instructions to program the target. [Figure 18(B)] This embodiment describes how the processor executes encryption key programming instructions to program the target.
[0024] [Figure 19] An embodiment of pseudocode for executing the PCONFIG instruction is shown.
[0025] [Figure 20] This is a functional block diagram showing the hardware of an exemplary system for processing instructions according to this embodiment.
[0026] [Figure 21] This is a functional block diagram showing the processor according to this embodiment.
[0027] [Figure 22(A)] This is a functional block diagram illustrating both an exemplary in-order pipeline and an exemplary out-of-order issue / execution pipeline for register renaming according to this embodiment.
[0028] [Figure 22(B)] This is a functional block diagram showing both an exemplary in-order architecture core and an exemplary out-of-order issue / execution architecture core for register renaming, which are included in the processor according to this embodiment.
[0029] [Figure 23] This is a functional block diagram showing the execution unit circuit according to this embodiment.
[0030] [Figure 24] This is a functional block diagram showing the register architecture according to this embodiment.
[0031] [Figure 25] This is a functional block diagram showing the instruction format according to this embodiment.
[0032] [Figure 26] This is a functional block diagram showing the details of the addressing fields in the instruction format of Figure 25 according to this embodiment.
[0033] [Figure 27] This is a functional block diagram showing the details of the first exemplary prefix of the instruction format in Figure 25 according to this embodiment.
[0034] [Figure 28(A)] This is a functional block diagram showing how the R, X, and B fields of the first exemplary prefix in Figure 27 are used according to this embodiment. [Figure 28(B)] This is a functional block diagram showing how the R, X, and B fields of the first exemplary prefix in Figure 27 are used according to this embodiment. [Figure 28(C)] This is a functional block diagram showing how the R, X, and B fields of the first exemplary prefix in Figure 27 are used according to this embodiment. [Figure 28(D)] This is a functional block diagram showing how the R, X, and B fields of the first exemplary prefix in Figure 27 are used according to this embodiment.
[0035] [Figure 29(A)] This is a functional block diagram showing details of a second exemplary prefix in the instruction format of Figure 25 according to this embodiment. [Figure 29(B)] This is a functional block diagram showing details of a second exemplary prefix in the instruction format of Figure 25 according to this embodiment.
[0036] [Figure 30]This is a functional block diagram showing details of a third exemplary prefix in the instruction format of Figure 25 according to this embodiment.
[0037] [Figure 31] This is a functional block diagram illustrating the use of a software instruction converter to convert binary instructions in a source instruction set to binary instructions in a target instruction set, according to this embodiment.
[0038] [Figure 32] This document illustrates an embodiment for processing the virtual encryption key programming (PCONFIG.VPUF_KEYREG_PROGRAM) instruction.
[0039] [Figure 33] This embodiment describes how the processor executes the virtual encryption key programming (PCONFIG.VPUF_KEYREG_PROGRAM) instruction to program the VPUF register target.
[0040] [Figure 34] An embodiment of pseudocode for executing the PCONFIG instruction is shown. [Modes for carrying out the invention]
[0041] This disclosure relates to a method, apparatus, system, and non-temporary computer-readable storage medium for storing instructions for encrypting data using a key generated by a physically unreplicable function (PUF). Encryption is the process of encoding information and is a tool used to protect the security or privacy of sensitive information (e.g., passwords) stored on a computer. The encryption process converts the original representation of information, known as plaintext, into an alternative form known as ciphertext. Encryption schemes typically use a pseudo-random encryption key generated by an algorithm. An authorized party possessing the key can easily decrypt the encoded information. While it is possible to decrypt encoded information without the key, a well-designed encryption scheme requires considerable computational resources and skill.
[0042] Therefore, to maintain the secrecy of encoded information, it is crucial to prevent unauthorized parties from accessing the encryption key. One way to protect encryption keys (or any sensitive information such as passwords) when stored on a computer is to store the sensitive information using electronic fuses. While fuses have long been considered secure, recent research has shown that a serious hardware attacker can scan the fuse and recover the sensitive information. In this embodiment, this problem is solved by protecting the sensitive information with a PUF-generated encryption key. PUFs offer advantageous protection from scanning, and the PUF circuit is also resistant to side-channel attacks (e.g., attacks using EM radiation).
[0043] According to some embodiments, a software-visible PUF (SV-PUF) exposes PUF functionality to software via instructions. One or more of these instructions include the SV-PUF ISA or ISA extension (throughout this description, SV-PUF ISA is the term used, but the following text applies to the ISA extension). This embodiment discloses the use of SV-PUF to wrap secrets and bind them to the platform using PUF-derived keys. This wrapping (encryption and integrity protection) protects secrets such as passwords, keys, and cookies while they are not in use, and allows the plaintext secrets to be unwrapped / retrieved when in use. Secrets protected using PUF-derived keys can then be returned to the software or used to program a cryptographic engine on the platform (e.g., Multi-Key Total Memory Encryption (MKTME), available from Intel Corporation (Santa Clara, California)). When programming a cryptographic engine, the secrets are advantageously never exposed in plaintext after initial provisioning for the entire lifetime of the platform, but instead are programmed directly into the desired cryptographic engine via an interface using the instructions of this embodiment.
[0044] This embodiment advantageously allows for the binding of secrets to the platform using PUF-derived keys to protect them. Furthermore, secrets can be associated with the configuration of the platform (e.g., whether a platform firmware verification program such as Intel Boot Guard is enabled) and the processor (e.g., the secret is wrapped inside an enclave or trust domain). In addition, since the same key is generated by the PUF each time the system reboots, the secret is preserved across boots.
[0045] As construed in this disclosure, embodiments include a processor security capability called Trusted Domain Extension (TDX) to meet enhanced security objectives through the use of memory encryption and integrity via a memory controller engine. As used in TDX, a Trusted Domain (TD) is a protected VM.
[0046] The embodiment includes an additional extended page table (EPT) structure called a secure extended page table (SEPT) used by the processor for TD private page walks. The SEPT is a per-TD EPT (i.e., each TD has its own SEPT) managed by a trusted domain resource manager (TDRM) only through special instructions newly added to the processor's instruction set architecture (ISA). The TDRM cannot modify the SEPT without using these instructions, otherwise an integrity failure is reported by the processor. In other embodiments, all or part of the SEPT may be access-controlled using processor-range register protection.
[0047] In a typical VM implementation, the processor supports one EPT pointer (EPTP) for each virtual memory control structure (VMCS). A VMCS is an in-memory data structure, one for each VM, and the VM is managed by the VMM. With each change in the execution context between different VMs, the VMCS of the current VM is restored, thereby defining the state of the VM's virtual processor. The VMM manages the EPTs referenced by the EPTPs. In embodiments, the VM may be encapsulated by a TD, and the VMCS may be replaced by a similar control structure called a trusted domain control structure (TDCS) that manages the guest state of the TD.
[0048] This paper describes an architecture that provides isolation to virtualized systems using Trust Domains (TDs). The current trend in computing is to place data and enterprise workloads in the cloud by utilizing hosting services provided by Cloud Service Providers (CSPs). As a result of hosting data and enterprise workloads in the cloud, CSP customers (referred to herein as tenants) are demanding better security and isolation solutions for those workloads. In particular, customers are seeking solutions that allow CSP-provided software to operate outside the tenant's TCB. A system's TCB refers to a set of hardware, firmware, and / or software components that have the ability to influence trust in the overall operation of the system.
[0049] In the implementations of this disclosure, the TD architecture and instruction set architecture (ISA) extensions for the TD architecture (referred to herein as TD extensions (TDX)) are provided to provide confidentiality (and integrity) of customer (tenant) software running on an untrusted CSP infrastructure. The TD architecture, which can be a system-on-chip (SoC) function, provides isolation between TD workloads and CSP software such as the CSP's virtual machine manager (VMM). Components of the TD architecture may include 1) memory encryption via the MK-Total Memory Encryption (MKTME) engine, 2) resource management capabilities referred herein as the Trusted Domain Resource Manager (TDRM) (TDRM may be a software extension of the virtual machine monitor (VMM)), and 3) execution state and memory isolation capabilities in the processor provided via the CPU-managed memory ownership table (MOT) and CPU access control TD control structures. The TD architecture provides the processor's ability to deploy TDs that leverage the MK-TME engine, MOT, and access control TD control structures for the secure operation of TD workloads.
[0050] In one implementation, tenant software runs on an architectural concept known as a TD. A TD (also called a tenant TD) refers to a tenant's workload (for example, an operating system (OS) alone, along with other Ring 3 applications running on the OS, or a virtual machine (VM) running on a VMM, along with other Ring 3 applications). Each TD operates independently of other TDs in the system and uses one or more logical processors, memory, and I / O allocated by the TDRM on the platform. Each TD is cryptographically isolated in memory using at least one exclusive encryption key of the MK-TME engine to encrypt the memory (holding code and / or data) associated with the trust domain.
[0051] In the implementations of this disclosure, the TDRM of the TD architecture acts as a host for the TDs, maintaining complete control over the core and other platform hardware. The TDRM allocates software within the TDs using one or more logical processors. However, the TDRM cannot access the execution state of the TDs on the allocated logical processors. Similarly, while the TDRM allocates physical memory and I / O resources to the TDs, it cannot access the memory state of the TDs due to the use of separate encryption keys enforced by the processors for each TD, as well as other integrity and reclaim control over memory. Software running on the TDs operates in a reduced-privilege state so that the TDRM can retain control over platform resources. However, the TDRM cannot affect the confidentiality or integrity of the TD state in memory or CPU structures under specified circumstances.
[0052] Traditional systems for providing isolation in virtualized systems do not completely extract CSP software from the tenant's TCB. Furthermore, traditional systems can significantly increase the TCB using separate chipset subsystems, which the implementation of this disclosure avoids. The TD architecture of the implementation of this disclosure isolates customer (tenant) workloads from CSP software by explicitly reducing the TCB by removing the CSP software from the TCB. The implementation provides a technical improvement over traditional systems by providing secure isolation of the CSP customer workload (tenant TD), enabling the removal of CSP software from the customer's TCB while meeting the security and functionality requirements of the CSP. Furthermore, the TD architecture is scalable to multiple TDs and can support workloads for multiple tenants. In addition, the TD architecture described herein is general-purpose and can be applied to any dynamic random access memory (DRAM) or storage class memory (SCM) based memory such as non-volatile dual in-line memory modules (NV-DIMM). Thus, the implementation of this disclosure enables software to take advantage of performance benefits such as NVDIMM direct access storage (DAS) mode for SCM without compromising platform security requirements.
[0053] Figure 1 is a schematic block diagram of a computing system 100 that provides isolation in a virtualization system using TD, according to one implementation of the present disclosure. The virtualization system 100 includes a virtualization server 110 that supports several client devices 101A-101C. The virtualization server 110 includes at least one processor 112 (also referred to as a processing device) that runs TDRM 180. TDRM 180 may include a VMM (which may also be referred to as a hypervisor) that can instantiate one or more TDs 190A-190C accessible by client devices 101A-101C via a network interface 170. Client devices 101A-101C include, but are not limited to, desktop computers, tablet computers, laptop computers, netbooks, notebook computers, personal digital assistants (PDAs), servers, workstations, mobile phones, mobile computing devices, smartphones, internet appliances, or any other type of computing device.
[0054] A TD can refer to a tenant's (e.g., customer's) workload. A tenant's workload may include, for example, only an OS along with other Ring 3 applications running on the OS, or a VM running on a VMM along with other Ring 3 applications. In the implementations of this disclosure, each TD may be cryptographically isolated in memory using a separate exclusive key to encrypt the memory associated with the TD (which holds the code and data).
[0055] The processor 112 may include one or more cores 120 (also referred to as processing cores 120), range registers 130, a memory management unit (MMU) 140, and one or more output ports 150. The processor 112 can be used in systems including, but are not limited to, desktop computers, tablet computers, laptop computers, netbooks, notebook computers, PDAs, servers, workstations, mobile phones, mobile computing devices, smartphones, internet appliances, or any other type of computing device. In another implementation, the processor 112 can be used in SoC systems.
[0056] Computing system 100 represents a processing system based on a microprocessing device available from Intel Corporation (Santa Clara, Calif.), however, other systems (including PCs, engineering workstations, set-top boxes, etc., with other microprocessing devices) may also be used. In one implementation, sample system 100 runs a version of the WINDOWS® operating system available from Microsoft Corporation (Redmond, Wash.), but other operating systems (e.g., UNIX® and Linux®), embedded software, and / or graphical user interfaces may also be used. Therefore, the implementations of this disclosure are not limited to any particular combination of hardware circuitry and software.
[0057] One or more processing cores 120 execute system instructions. The processing cores 120 include, but are not limited to, prefetch logic for fetching instructions, decode logic for decoding instructions, and execution logic for executing instructions. In one implementation, the computing system 100 includes components such as a processor 112 for using execution units that include logic for executing algorithms for processing data.
[0058] The virtualization server 110 includes main memory 114 and secondary storage 118 for storing program binaries and OS driver events. The data in the secondary storage 118 may be stored in blocks called pages, each page may correspond to a set of physical memory addresses. The virtualization server 110 can use virtual memory management in which applications running on one or more cores 120, such as TD190A~190C, use virtual memory addresses mapped to guest physical memory addresses, and the guest physical memory addresses are mapped to host / system physical addresses by the MMU 140.
[0059] Core 120 can run the MMU 140 to load pages from secondary storage 118 into main memory 114 (including volatile and / or non-volatile memory) for faster access by software running on processor 112 (e.g., on the core). When one of TD190A~190C attempts to access the virtual memory address corresponding to the physical memory address of a page loaded into main memory 114, the MMU 140 returns the requested data. Core 120 can run the VMM portion of TDRM180 to translate guest physical addresses to host physical addresses in main memory and provide protocol parameters that enable Core 120 to read, walk, and interpret these mappings.
[0060] In one implementation, the processor 112 implements the TD architecture and the ISA extension for the TD architecture (TDX). The TD architecture provides isolation between TD workloads 190A-190C and from CSP software (e.g., TDRM180 and / or CSP VMM (e.g., root VMM180)) running on the processor 112. Components of the TD architecture may include 1) memory encryption via the MK-ME engine (memory encryption engine (MEE) or memory protection controller) 145 or other encryption engines, 2) resource management capabilities referred to herein as TDRM180, and 3) execution state and memory isolation capabilities within the processor 112 provided via MOT160 and access control TD control structures (i.e., TDCS124 and TDTCS128). The TDX architecture provides the ability of processor 112 to deploy TD190A-190C, leveraging the MK-TME engine 145, MOT160, and access control TD control structures (i.e., TDCS124 and TDTCS128) for secure operation of TD workloads 190A-190C.
[0061] The physically unreplicable function (PUF) circuit 146 provides a unique value in response to a challenge. Note that although the PUF circuit 146 is shown as part of the processor 112, it may also be located outside of the processor 112. In some embodiments, it is part of the MMU 140. In some embodiments, it is part of one or more cores 120.
[0062] In the implementation of this disclosure, TDRM180 functions as a host, having complete control over Core 120 and other platform hardware. TDRM180 allocates software within TD190A-190C using one or more logical processors. However, TDRM180 cannot access the execution state of TD190A-190C on the allocated logical processors. Similarly, TDRM180 allocates physical memory and I / O resources to TD190A-190C, but cannot access the memory state of TD190A due to separate encryption keys and other integrity and replay controls on memory.
[0063] With respect to separate encryption keys, the processor can use the MK-TME engine 145 to encrypt (and decrypt) the memory used during execution. Total Memory Encryption (TME) allows any memory access by software running on core 120 to be encrypted in memory using the encryption key. MK-TME is an extension of TME that enables the use of multiple encryption keys (the number of supported keys depends on the implementation). The processor 112 can use the MKTME engine 145 to encrypt different pages using different MK-TME keys. The MK-TME engine 145 can be used in the TD architecture described herein to support one or more encryption keys for each TD190A-190C to help achieve encryption isolation between different CSP customer workloads. For example, when the MK-TME engine 145 is used in the TD architecture, the CPU implements by default that the TD (all pages) are encrypted using a TD-specific key. Furthermore, the TD can further select specific TD pages to be encrypted using different ephemeral keys that are plaintext or opaque to the CSP software. The MK-TME engine 145 may include storage for one or more keys. In some embodiments, there is at least one fuse key on the die.
[0064] Each TD190A-190C is a software environment that supports a software stack consisting of a VMM (e.g., using Virtual Machine Extensions (VMX)), an OS, and / or application software (hosted by the OS). Each TD190A-190C operates independently of other TD190A-190Cs and uses one or more logical processors, memory, and I / O allocated by the TDRM180 on the platform. The software running on the TD190A-190Cs operates in a reduced privilege state so that the TDRM180 can retain control of the platform resources. However, the TDRM cannot affect the confidentiality or integrity of the TD190A-190Cs under specified circumstances.
[0065] The implementations of this disclosure are not limited to computer systems. Alternative implementations of this disclosure can be used in other devices, such as handheld devices and embedded applications. Some examples of handheld devices include mobile phones, Internet Protocol devices, digital cameras, personal digital assistants (PDAs), and handheld PCs. Embedded applications may include microcontrollers, digital signal processing devices (DSPs), systems on a chip, network computers (NetPCs), set-top boxes, network hubs, wide area network (WAN) switches, or any other system capable of executing one or more instructions according to at least one implementation.
[0066] One implementation can be described in the context of a single-processing-device desktop or server system, but alternative implementations may be included in a multi-processing-device system. Computing system 100 may be an example of a “hub” system architecture. Computing system 100 includes a processor 112 for processing data signals. Examples of processors 112 for illustrative purposes include a composite instruction set computer (CISC) microprocessing device, a reduced instruction set computing (RISC) microprocessing device, a very long instruction word (VLIW) microprocessing device, a processing device that implements a combination of instruction sets, or any other processing device such as a digital signal processing device. The processor 112 is coupled to a processing device bus that transmits data signals between the processor 112 and other components in computing system 100, such as main memory 114 and / or secondary storage 118 that store instructions, data, or any combination thereof. Other components of computing system 100 may include a graphics accelerator, a memory controller hub, an I / O controller hub, a wireless transceiver, a flash BIOS, a network controller, an audio controller, a serial expansion port, and an I / O controller. These elements perform their conventional functions, which are well known to those skilled in the art.
[0067] In one implementation, the processor 112 includes level 1 (L1) internal cache memory. Depending on the architecture, the processor 112 may have a single internal cache or multiple levels of internal caches. Other implementations may include a combination of both internal and external caches, depending on the specific implementation and requirements. The register file stores various types of data in various registers, including integer registers, floating-point registers, vector registers, bank registers, shadow registers, checkpoint registers, status registers, configuration registers, and instruction pointer registers.
[0068] It should be noted that the execution unit may or may not have a floating-point unit. In one implementation, the processor 112 includes a microcode (ucode) ROM for storing microcode, which, when executed, executes algorithms for specific macro instructions or handles complex scenarios. Here, the microcode is potentially updatable to handle logical bugs / fixes of the processor 112.
[0069] Alternative implementations of the execution unit may also be used in microcontrollers, embedded processing devices, graphics devices, DSPs, and other types of logic circuits. System 100 includes main memory 114 (which may also be referred to as memory 114). Main memory 114 includes DRAM devices, static random access memory (SRAM) devices, flash memory devices, or other memory devices. Main memory 114 stores data represented by instructions and / or data signals executed by processor 112. Processor 112 is coupled to main memory 114 via a processing device bus. System logic chips, such as a memory controller hub (MCH), can be coupled to the processing device bus and main memory 114. The MCH can provide a high-bandwidth memory path to main memory 114 for storing instructions and data, as well as graphics commands, data, and textures. The MCH can be used, for example, to direct data signals between processor 112, main memory 114, and other components in system 100, and to bridge data signals between the processing device bus, memory 114, and system I / O. The MCH can be coupled to memory 114 via a memory interface. In some implementations, the system logic chip can provide a graphics port for coupling to a graphics controller via an Accelerated Graphics Port (AGP) interconnect.
[0070] The computing system 100 may also include an I / O controller hub (ICH). The ICH can provide direct connectivity to several I / O devices via a local I / O bus. The local I / O bus is a high-speed I / O bus for connecting peripherals to memory 114, the chipset, and the processor 112. Some examples include an audio controller, a firmware hub (flash BIOS), a wireless transceiver, data storage, legacy I / O controllers including user input and keyboard interfaces, serial expansion ports such as Universal Serial Bus (USB), and a network controller. Data storage devices may include hard disk drives, floppy disk drives, CD-ROM devices, flash memory devices, or other mass storage devices.
[0071] In another implementation of the system, the instructions executed by the processing device core 120 described above can be used on a system-on-chip. One implementation form of the system-on-chip comprises a processing device and memory. The memory for one such system is flash memory. The flash memory can be located on the same die as the processing device and other system components. Furthermore, other logical blocks, such as a memory controller or a graphics controller, can also be located on the system-on-chip.
[0072] Figure 2(A) shows an example of using a PUF to generate and use keys for wrapping and unwrapping data according to this embodiment. Generally, the execution of a wrapping instruction according to this embodiment receives data that should be kept secure (which may be referred to herein as “secrets”). Secrets may be any information, such as, but not limited to, passwords or encryption keys. The wrapping instruction receives the secret as part of the input and encrypts it using a key derived from the PUF. The input is updated and wrapped (e.g., encrypted and integrity protected). In some embodiments, the output of the secret wrapping process (which may be referred to herein as a “blob” or “wrapped blob”) is associated with a specific use. For example, a blob may be generated to protect a secret that software intends to retrieve at a later point in time. In another example, a blob may be generated to protect a key for programming an encryption engine. As an example of this use, an MKTME key for persistent memory can be protected using this ISA.
[0073] To use the secrets available in the wrapped blob, this embodiment further provides the execution of an unwrapping instruction from the software, which receives the wrapped blob as an input operand, unwraps the blob (e.g., decrypts and verifies its integrity), and decrypts the secrets using a PUF-derived key. The retrieved secrets are then returned to the software or programmed into the cryptographic engine, depending on the intended use indicated in the instruction by the software at the time of wrapping. In some embodiments, the wrapping instruction allows the platform and processor configuration to be included in the wrapping, thereby allowing the unwrapping instruction to unwrap the blob only if the platform and processor configuration desired at the time of wrapping is active at the time of unwrapping.
[0074] Referring further to Figure 2(A), the software requests the SV-PUF wrapping instruction of the SV-PUF ISA 2(A)02 according to this embodiment to perform secret encryption using the PUF-derived key 2(A)04. In addition to providing the secret for encryption, the software also provides a challenge 2(A)06, which is used to generate the PUF-derived key 2(A)04 from the root PUF key (described later). In some embodiments, as will be described in more detail below, the challenge 2(A)06 is a 256-bit random value selected by the software, which must be provided for both secret wrapping and secret unwrapping. The execution circuit that executes the wrapping instruction of the SV-PUF ISA (described in more detail below) receives input provided by the software in a memory structure and uses the challenge 2(A)06 provided by the software to excite the PUF circuit 2(A)08 to obtain the PUF-derived key 2(A)04 used to encrypt the secret. After obtaining key 2(A)04 from PUF circuit 2(A)08, the execution of the wrapping instruction encrypts the secret using key 2(A)04, protects the integrity of the data structure containing the encrypted secret, and generates a wrapped blob. The wrapped blob is then returned to the software at a memory location provided by the software.
[0075] Subsequently, when the software needs to use a secret, it requests the unwrapping instruction of SV-PUF ISA 2(A)02 to unwrap the secret contained within the blob. In some embodiments, SV-PUF ISA 2(A)02 has multiple instructions for unwrapping, and the specific instruction called for a given unwrap request from the software depends on the use of the secret in that instance. In a first example where the software needs to retrieve a secret, the first unwrapping instruction of SV-PUF ISA 2(A)02 receives the wrapped blob as an input operand and unwraps the secret by checking the integrity of the blob and decrypting it. The retrieved secret is then returned to the software. In addition to providing a blob to unwrap, the software also provides a challenge 2(A)06, which is used to generate a PUF-derived key 2(A)04 from the root PUF key (described later) to unwrap the blob.
[0076] In the second example, when a secret is used to program a cryptographic engine, such as when a persistent memory key is programmed into the MKTME engine using a wrapped blob, the second unwrapping instruction of SV-PUF ISA 2(A)02 receives the wrapped blob as an input operand, unwraps the data structure by checking the integrity of the blob and decrypting the secret data, but does not return the retrieved one or more keys to the software. Instead, the keys are programmed directly into the target cryptographic engine via the interface, thereby not exposing one or more keys in plaintext in memory. In addition to providing the blob to unwrap, the software also provides Challenge 2(A)06, which is used to generate a PUF-derived key 2(A)04 from the root PUF key (described later) to unwrap the blob. In this use, once unwrapped, the secret retrieved from the wrapped blob is programmed into the desired cryptographic engine without ever being exposed into memory.
[0077] Finally, the third use provides protection and proof of device identity. In this use, the unwrapping step also includes signing an identity challenge received from the IT server. The client is expected to sign this with a device key and return to the server for verification to prove knowledge of the device key. On the server, if the guest VM is hosting a customer workload, the guest VM is allowed to use the SV-PUF ISA without any restrictions. This works for clients where there is no requirement to migrate workloads even if a hypervisor may be running, but not for servers where customer workload / VM migration is a minimum requirement. To support migration while maximizing the security benefits of PUF, the present invention introduces the concept of a virtual PUF key. To generate a migratable blob, the VMM programs a virtual PUF key in the core and uses execution control to force guest execution of SV-PUF instructions to use the virtual PUF key instead of the actual hardware key. The ISA support introduced herein can be summarized as follows: VPUF_KEYREG, a WRP target, enables wrapping of virtual PUF keys destined for the virtual PUF register; VPUF_KEYREG_PROGRAM, a PCONFIG leaf, enables programming to the virtual PUF key register using the wrapped blob; and VMCS.SVPUF_USE_VIRTPUF, a field within VMCS, provides single-bit execution control. When set, instructions use the virtual PUF key programmed into the virtual PUF key register, i.e., the blob is not generated using the PUF generation hardware key. This has no effect unless the SVPUF_ENABLE opt-in control is clear and it is not indicated to the guest that no actual hardware was used to generate the blob. This avoids instruction emulation by the VMM / TDX module (without access to guest memory) and is migrated with a VM that is encrypted and integrity protected for TD.
[0078] In some embodiments, the VMCS includes several controls, such as VMCS.SVPUF_ENABLE, which provides WRP / UNWRP / UNWRPMAC opt-in and single-bit execution control (if 0, guest execution of WRP / UNWRP / UNWRPMAC causes an undefined failure; otherwise, guest execution of WRP / UNWRP / UNWRPMAC functions according to SVPUF_EXITING). VMCS.SVPUF_EXITING allows the VMM to hook into WRP / UNWRP / UNWRPMAC and provides single-bit execution control. The VMM emulates instructions using a software wrapping key and generates a migrateable blob. In this option, the blob is not generated using PUF hardware.
[0079] Figure 2(B) shows an exemplary process 2(B)02 for wrapping and unwrapping a secret according to this embodiment. In 2(B)S04, software 2(B)06 that requires the secret to be protected calls an instruction, wraps it (WRP described later), and passes the data to be wrapped along with the challenge 2(A)06 to the SV-PUF instruction 2(A)02 as an input operand. In 2(B)S08, the WRP instruction of the SV-PUF instruction 2(A)02 uses the challenge 2(A)06 as input to the PUF circuit 2(A)08 to generate a unique PUF-derived key 2(A)04. In some embodiments, the PUF root key is mixed with the challenge 2(A)06 using a standard key derivation function (KDF). Furthermore, in some embodiments, the PUF circuit 2(A)08 itself can provide multiple root keys for different applications. For example, there may be one root key derived for standard platform use (e.g., fuse protection) and another root key for SV-PUF use. The WRP instruction of the SV-PUF ISA 2(A)02 uses challenge 2(A)06 to obtain the PUF-derived key 2(A)04, and uses the PUF-derived key 2(A)04 to encrypt the secret in 2(B)S08 and protect its integrity. In 2(B)S10, the SV-PUF instruction 2(A)02 provides a wrapped blob as the output of the WRP instruction at a memory location specified by software 2(B)06 and provided as input to the WRP instruction. Software 2(B)06 retains the blob in memory when the secret to be protected is not being used.
[0080] Referring further to Figure 2(B), in 2(B)S12, when software 2(B)06 needs to access a secret contained within the blob, software 2(B)06 calls another instruction unwrap (UNWRP) (described below) and passes the wrapped blob along with challenge 2(A)06 to SV-PUF instruction 2(A)02 as an input operand. In 2(B)S14, the UNWRP instruction of SV-PUF instruction 2(A)02 uses challenge 2(A)06 along with the blob as input to the PUF circuit 2(A)08 to obtain the unique PUF-derived key 2(A)04 used to wrap the blob. The UNWRP instruction of SV-PUF ISA 2(A)02 then uses the PUF-derived key 2(A)04 to decode the wrapped blob and verifies its integrity in 2(B)S14. The integrity check succeeds only if the wrapped blob passed by software 2(B)06 in 2(B)S12 is not modified compared to the wrapped blob provided to software 2(B)06 by the SV-PUF instruction 2(A)02 in 2(B)S10. If the integrity check is successful, the unwrapped data is returned to the software in 2(B)S16.
[0081] Figure 2(C) shows another exemplary process for wrapping and unwrapping a secret according to this embodiment. In the embodiment of Figure 2(C), software 2(B)06 programs an encryption key to a hardware block on the platform. One non-limiting example of such use is a programming key for persistent memory to the MKTME engine. In this use, during the provisioning phase, which may occur when a user receives a computer provided by their employer in the IT center of a corporate environment, the key used for persistent memory encryption is encrypted using a PUF-derived key, similar to the embodiment described above with reference to Figure 2(B). Operations 2(C)S04, 2(C)S08, and 2(C)S10 use the WRP instruction as described above with reference to steps 2(B)S04, 2(B)S08, and 2(B)S10, respectively.
[0082] Referring further to Figure 2(C), in 2(C)S12, if software 2(C)06 wants to program a key (for example, to set a persistent memory key at each reboot), software 2(C)06 calls another instruction PCONFIG (described below) and passes the wrapped blob along with challenge 2(A)06 to SV-PUF ISA 2(A)02 as an input operand. In 2(C)S14, the PCONFIG instruction of SV-PUF instruction 2(A)02 unwraps and verifies the integrity of the blob, as described above in 2(B)S14. However, in this embodiment, instead of returning the decrypted secret to software 2(C)06, in 2(C)S16, the key is programmed to key programming target 2(C)18 (for example, the cryptographic engine) via the interface. In this way, the key has the advantage that it is never exposed in memory beyond the provisioning phase, which typically occurs only once during the lifetime of the platform. In 2(B)S20, the SV-PUF instruction 2(A)02 returns a programming success / failure response to the requesting software 2(C)06.
[0083] Figure 2(D) shows the overall flow that enables the generation of a migratory blob that maximizes the use of PUF, according to several embodiments. During virtual PUF key generation and protection, the VMM generates a virtual PUF key in 2(D)02. To minimize the exposure of this key, the VMM wraps this key with a PUF-derived key using a WRP instruction (blob 1 is generated by WRP (VPUF_KEY, target=WRP_DATA)) in 2(D)04. The VMM also generates a blob wrapped with a new WRP target, VPUF_KEYREG (blob 2 is generated by WRP (VPUF_KEY, target=VPUF_KEYREG)) in 2(D)06. This blob is used by the VMM to program the virtual PUF key on the core that is used by the VM to generate the wrapped blob.
[0084] In the virtual PUF key setup / programming phase, the VMM sets up a virtual PUF key for use by the VM before starting / restarting the VM execution. This is done using a new leaf VPUF_KEYREG_PROGRAM for PCONFIG. This leaf receives a virtual PUF key blob (blob 2), unwraps it to obtain the virtual PUF key, and programs it into the virtual PUF key register storage in the core. Once the key is set up, the VM is started / restarted at 2(D)14. Here, when SV-PUF instructions are executed from the VM started on this core, the virtual PUF key is used, if the VMM also sets the SVPUF_USE_VIRTPUF control for the running VM.
[0085] In the virtual PUF key migration phase, when the VMM migrates a VM, in 2(D)10, the virtual PUF key is retrieved from blob 1 and migrated to the other machine along with the VM image. The VMM on the receiving machine can repeat the virtual PUF key protection and programming steps to enable the migrated blob to be used by the VM on the new machine.
[0086] In some embodiments, the presence of virtual PUF key support is enumerated using CPUID. CPUID.PCONFIG_LEAF enumerates VPUF_KEYREG as a supported PCONFIG target if SVPUF is supported on the platform. The presence of this target implies support for the VPUF_KEYREG_PROGRAM leaf.
[0087] Figure 3 shows a hardware embodiment for processing instructions such as SV-PUF instructions. As shown, the storage device 303 stores the SV-PUF instruction 301 to be executed.
[0088] Instruction 301 is received by the decoding circuit 305. For example, the decoding circuit 305 receives this instruction from the fetch logic / circuit. The instruction includes fields for the opcode, first and second sources, and destination. In some embodiments, the sources and destinations are registers, and in other embodiments, one or more are memory locations. In some embodiments, the opcode details which arithmetic operation should be performed.
[0089] More detailed embodiments of at least one instruction format will be described later. The decoding circuit 305 decodes the instruction into one or more operations. In some embodiments, this decoding includes generating a number of microoperations to be performed by an execution circuit (e.g., execution circuit 309). The decoding circuit 305 also decodes the instruction prefix.
[0090] In some embodiments, the register renaming, register assignment, and / or scheduling circuit 307 provides one or more functions of: 1) renaming logical operand values to physical operand values (e.g., a register alias table in some embodiments); 2) assigning status bits and flags to decoded instructions; and 3) scheduling decoded instructions from an instruction pool for execution by an execution circuit (e.g., using a reservation station in some embodiments).
[0091] Registers (register files) and / or memory 308 store data as operands for instructions operated by the execution circuit 309. Exemplary register types include packed data registers, general-purpose registers, and floating-point registers.
[0092] The execution circuit 309 executes the decoded instruction (e.g., an SV-PUF instruction). Exemplary detailed execution circuits are shown in other figures, including at least Figure 22. Execution of a decoded SV-PUF instruction causes the execution circuit to perform one or more operations indicated by the instruction's opcode. For some instructions, the execution circuit 309 interacts with the SV-PUF circuit 310 (if that circuit is not included in the execution circuit 309). In some embodiments, the SV-PUF circuit 310 is part of the core. In some embodiments, the SV-PUF circuit 310 is outside the core.
[0093] In some embodiments, the retirement / writeback circuit 311 architecturally commits the destination register to a register or memory 308, thereby retiring the instruction.
[0094] In some embodiments, the ISA (e.g., WRP, UNWRP, UNWRPMAC, PCONFIG) is executed by one or more execution clusters 2260 of the execution engine 2250 of the processor core 2290 (Figure 22(B)). For example, the execution unit circuit 2262 can execute the ISA to communicate with the PUF circuit 2280, pass challenge 2(A)06 to the PUF circuit 2280, and receive the PUF-derived key 2(A)04 from the PUF circuit 2280. In some embodiments, the PUF circuit 2280 may be part of the execution engine 2250, while in other embodiments, the PUF circuit 2280 may be outside the execution engine 2250.
[0095] The first instruction in the SV-PUF ISA is the Wrapping Instruction (WRP). Execution of a WRP instruction encrypts data using a key generated by the SV-PUF. In some embodiments, the WRP instruction is associated with the most privileged protection ring (e.g., ring 0). Therefore, when software invokes a WRP instruction, it may need to verify that the software has the necessary authority before completing the wrapping process. To invoke a WRP instruction, the software passes the SV-PUF WRP instruction the input memory buffer location, the output memory buffer location, and a challenge to be provided to the PUF to generate the wrapping key. The WRP instruction can specify target-specific data by operating with a BIND_STRUCT (described below) as an input / output structure. In some embodiments, the WRP instruction identifies three operands: The source operand stores the location of the source (input) BIND_STRUCT. The first destination operand stores the operational status of the WRP instruction execution. The second destination operand stores the location of the destination (output) BIND_STRUCT.
[0096] In some embodiments, one or more of the identified operands are registers (e.g., RAX, RBC, RCX, etc.). In some embodiments, one or more of the identified operands are memory locations. In some embodiments, the location of a structure is provided by an address. For example, the first source operand stores the address of an input structure, etc. The WRP instruction affects the following flags or condition codes in some embodiments: the zero flag, carry flag, parity flag, overflow flag, adjustment flag, and / or sign flag. The zero flag (ZF) is cleared on a successful wrap and otherwise set to 1, while CF, PF, AF, OF, and SF are always cleared.
[0097] The WRP instruction includes one or more fields used to encode an opcode. The opcode indicates that the execution circuit encrypts at least the cryptographic secrets from the input data structure using a PUF-generated wrapping key, combines the wrapped secrets with a target, updates the input data structure, generates a MAC for the updated data structure, stores the MAC in the input data structure to generate an output data structure, and stores the output data structure containing the wrapped secrets and a target instruction, according to the use of the instruction's second destination operand. The operational status may also be updated.
[0098] The table below shows the structure of BIND_STRUCT, and the fields of BIND_STRUCT are listed immediately below the table. [Table 1] BIND_STRUCT
[0099] It should be noted that the MAC is generated on a data structure having a generated SEQID, encrypted BTENCDATA (or a portion of that data), BTDATA, and reserved fields whose integrity is not protected (it provides that protection). In some embodiments, the MAC is generated using the GHASH function.
[0100] MAC: This field is the message authentication code for the data structure generated by the WRP instruction. Software does not input anything into this field. Therefore, on the input side, this field may be empty.
[0101] A Message Authentication Code (MAC) is a cryptographic checksum on data that uses a session key to detect both accidental and intentional alterations to the data. A MAC requires two inputs: the message itself and a secret key known only to the message's sender and its intended one or more recipients. This allows the message recipient to verify the message's integrity and authenticate that the message sender possesses the shared secret key. If the sender does not know the secret key, the hash value will be different, informing the recipient that the message was not from the original sender.
[0102] BTID: This field is the target of the wrapping and is entered by the software. The target of use in this embodiment may be one or more. Examples include the CPU (or core), the memory encryption engine, etc. By linking the wrapped data to a specific use, the security of the data wrapping process is enhanced, as further described below.
[0103] Figure 4 is a functional block diagram showing bit vectors representing platform / processor configurations to which wrapped data is bound, according to several embodiments. Fields in bit vector 402 indicate whether the corresponding program is active or inactive, and the state of the bit positions collectively represents the platform / processor configuration. In some embodiments, the WRP instruction microcode uses this bit vector 402 during the wrapping process and binds the blob to the configuration indicated by bit vector 402 by including it in a MAC generated on the output BIND_STRUCT (Table 1). In some embodiments, the execution of the WRP instruction does not perform any checks, but the unwrapping instructions (e.g., UNWRP, UNWRPMAC, and / or PCONFIG) check the platform / processor configuration and only allow unwrapping if the configuration provided by the software (as part of BTDATA in BIND_STRUCT (details below)) is active at the time of unwrapping. Thus, the software checks the current platform / processor configuration before requesting binding to ensure that secrets are not bound to configurations that are inactive on the platform. A binding made to an inactive configuration results in a blob that cannot be unwrapped to retrieve one or more secrets. For example, if a platform firmware verification program (e.g., Intel Boot Guard) is not enabled during wrapping, and the software requests coupling without first verifying that Boot Guard is enabled, the UNWRP instruction will not allow unwrapping of the blob if Boot Guard is not enabled during unwrapping.
[0104] In another exemplary embodiment, the WRP instruction allows wrapping to software identifiers (e.g., process identifiers, enclave measurements, virtual machine / trust domain measurements). Execution of the WRP instruction, when requested to bind to software identifiers, selects identifiers from hardware and includes them in the generated MAC. During unwrapping, execution of the unwrapping instruction verifies the MAC using the hardware identifiers. Unwrapping fails if the software unwrapping the blob does not own the blob.
[0105] SEQID: This field is an initialization vector used for authenticated encryption performed by the WRP instruction. In some embodiments, the microcode randomly generates this vector and uses it for encryption and MAC generation. This field is later used during the unwrapping process to decrypt and verify the MAC.
[0106] BTENCDATA: This field carries the data (secret) that the software is requesting to wrap. For example, in the case of MKTME key programming, this field carries two keys: a data encryption key and a fine-tuning key to be used for encryption using the Advanced Encryption Standard (AES) in XTS mode (a fine-tuning codebook mode based on XEX with ciphertext leakage). In some embodiments, each key can be up to 256b in size. Advantageously, the software can cryptographically protect any amount of data using the keys, and then protect any large amount of data with SV-PUF by protecting the keys using the current SV-PUF ISA.
[0107] BTDATA: This field carries information such as the challenge to be used by the PUF circuit to generate the key, and a configuration vector to indicate the platform and processor configuration to be included with the data wrapping in the WRP instruction. In some embodiments, this field may include one or more subfields that control the data wrapping using the PUF-derived key. For example, there may be two subfields, as shown in the table below: 1) the challenge used to generate the PUF-derived key, and 2) a bit vector for carrying the platform / processor configuration to which the wrapped data is joined. [Table 2] BTDATA
[0108] Figure 5 shows one embodiment of how a processor performs a WRP instruction. For example, a processor core shown in Figure 22(B), a detailed pipeline, etc., performs this method. In 501, a single WRP instruction is fetched. For example, a WRP instruction is fetched. The WRP instruction includes fields for an opcode, a first destination operand which stores the operational status of the execution of the WRP instruction, a source operand which stores or encodes the location (e.g., address) of an input / source BIND_STRUCTS, and a destination operand which stores or encodes the location (e.g., address) of an output / destination location. Note that in some embodiments, one or more BIND_STRUCTS are stored in one or more registers. In some embodiments, the WRP instruction further includes fields for a write mask. In some embodiments, the WRP instruction is fetched from the instruction cache. The opcode indicates that the execution circuit encrypts at least the encrypted secret information from the input data structure using a PUF generation encryption key or a virtual PUF key, combines the wrapped secret information with the target, updates the input data structure, generates a MAC for the updated data structure, stores the MAC in the input data structure to generate a wrapped output data structure, and stores the wrapped output data structure containing the encrypted secret information and the target instruction, according to the use of the instruction's second destination operand. Furthermore, the execution status is stored in the identified first destination operand.
[0109] In some embodiments, the execution circuit encrypts data from an input data structure using a key generated by the PUF, stores the encrypted data in an output data structure, finds a challenge in the input data structure to excite the PUF, and stores the operation status in an identified first destination operand. In some embodiments, encryption is performed using the generated key and a temporary value used as the initial vector for the encryption engine. In some embodiments, the MAC is computed using the PUF-generated key for the entire input data structure (including updates to the SEQID and encrypted data) and stored in the output data structure (which is the updated input data structure). Note that in some embodiments, the entire input data structure is copied to the output data structure before other operations (however, some fields may be overwritten).
[0110] In some embodiments, in 502, the fetched single instruction is translated into one or more instructions of a different instruction set architecture before decoding. Executing one or more instructions of a different instruction set architecture is functionally equivalent to executing them according to the opcode of the single instruction.
[0111] The fetched single instruction (or converted instruction) is decoded in 503. For example, a fetched WRP instruction is decoded by a decoding circuit as detailed herein.
[0112] In step 505, data values related to the source operands of the decoded instruction are retrieved. For example, if one or more of the source operands are memory operands, data is retrieved from the indicated memory location.
[0113] In 507, the decoded instruction (or translated instruction) is executed by an execution circuit (hardware) as detailed herein. In the case of a WRP instruction, execution causes the execution circuit to execute the decoded instruction according to the opcode to at least encrypt sensitive information from an input data structure using a PUF generation encryption key or a virtual PUF key, combine the wrapped sensitive information with a target, update the input data structure, generate a MAC for the updated data structure, store the MAC in the input data structure to generate a wrapped output data structure, and store the wrapped output data structure having the encrypted sensitive information and the target instruction according to the use of the instruction's second destination operand.
[0114] In some embodiments, the execution circuit encrypts data from an input data structure using a key generated by the PUF, stores the encrypted data in the input data structure (which becomes the output data structure), finds a challenge in the input data structure to excite the PUF, and stores the operation status in the identified first destination operand. In some embodiments, encryption is performed using the generated key and a temporary value used as an initialization vector as input to the encryption engine. The initialization vector is stored in the output data structure as SEQID. In some embodiments, MAC is computed using the PUF-generated key for the entire data structure and stored in the output data structure. Note that in some embodiments, the entire input data structure is copied to the output data structure before other operations (however, some fields such as SEQID, MAC, and BTENCDATA may be overwritten).
[0115] In some embodiments, the instruction is committed or retired at 509.
[0116] Figure 6 shows a method for executing a wrap-around pattern (WRP) instruction according to this embodiment. Note that execution may be performed by the execution circuit and / or the SV-PUF circuit. At 600, a determination is made as to whether SV-PUF is supported. In some embodiments, this is set in a model-specific register (MSR). If it is determined that SV-PUF is not supported, execution is stopped at 602 due to an undefined instruction.
[0117] In step 604, it is determined whether the processor (or core) is not in non-root virtualization mode and whether SV-PUF is enabled. If the processor (or core) is not in non-root virtualization mode (executed by guest software (virtual machine)) and SV-PUF is not enabled, the instruction is undefined in step 606.
[0118] However, if the processor (or multiple cores) is not in non-root virtualization mode and SV-PUF is determined not to be enabled, execution proceeds to 607, where it is determined whether the software requesting the wrapping has privileges (e.g., ring 0). If the software requesting the wrapping is determined not to have privileges, execution terminates at 608 due to a general protection failure.
[0119] However, if the software requesting the wrapping is determined to have privileges, execution proceeds to 609, where it is determined whether the processor (or core) is in non-root virtualization mode and whether SV_PUF mode has been terminated. If this determination is true, at 610, the termination reason set in the Virtual Machine Control Structure (VMCS) is set to SV-PUF, the termination eligibility is set to XBIND (cannot be bound), and VMExit is delivered. If the determination is false, at 612, it is determined whether the contents of the source register and destination register are aligned. If it is determined that the contents of the source register and destination register are not aligned, the process terminates at 614 due to a general protection failure. However, if it is determined that the contents of the source register and the second destination register are aligned, the process proceeds to 616, where it is determined whether the contents of the source register and destination register are duplicates. If it is determined that the contents of the source register and destination register are duplicates, the process terminates at 618 due to a general protection failure. However, if it is determined that the contents of the source register and destination register do not overlap, the process proceeds to 620, where the input structure identified by the address information stored in the source operand (e.g., RBX) is loaded into memory. The process then proceeds to 622.
[0120] In step 622, it is determined whether any reserved fields are set in the input structure identified by the address information stored in the source operand. If it is determined that reserved fields are set in the input structure identified by the address information stored in the source operand, the process terminates in step 624 due to a general protection failure. However, if it is determined that no reserved fields are set in the input structure identified by the address information stored in the source operand, the process proceeds to step 626, where a temporary seed for encryption is generated (for example, using a hardware number generator). The process then proceeds to step 628.
[0121] At step 628, it is determined whether the temporary seed has sufficient entropy (randomness). If it is determined that the temporary seed does not have sufficient entropy, the process proceeds to 630, where the 0 flag is set to 1 to indicate that the data was not wrapped, and the status register (e.g., RAX) is set to indicate an entropy error. However, if it is determined that the temporary seed has sufficient entropy, the process proceeds to 632, where the wrapping key is obtained from the PUF or from the virtual PUF key register using the challenge stored in the BTDATA field of the BIND_STRUCT. The process then proceeds to 634.
[0122] In 634, the data from the BTENDCDATA field of the input BIND_STRUCT is encrypted using the wrapping key and temporary seed from the SEQID field of the input BIND_STRUCT. The encrypted data is then written to the BTENDCDATA field of the output BIND_STRUCT, which is identified by the address information stored in a second destination operand (e.g., RCX).
[0123] In 636, the MAC is calculated using the wrapping key for the encrypted data, and then the MAC is written to the MAC field of the output BIND_STRUCT.
[0124] In step 638, the target (BTID) and challenge (BTDATA) to be wrapped are copied from their respective fields in the input BIND_STRUCT to their respective fields in the output BIND_STRUCT.
[0125] In version 640, the seed value in the output BIND_STRUCT is populated with the generated temporary seed value.
[0126] In 642, the 0 flag is set to 0, indicating that the data wrapping was successful, and the destination register (e.g., RAX) is set to indicate success.
[0127] At 644, all other flags are cleared.
[0128] Figure 7 shows an embodiment of pseudocode for executing the WRP instruction.
[0129] Generally, the UNWRP instruction enables the decryption of data contained within a wrapped blob generated by a WRP instruction. The UNWRP instruction receives the wrapped blob, unwraps it (e.g., verifying the MAC is correct), and returns the decrypted secret. If software passes a different unwrapping target (indicated by the BTID in BIND_STRUCT) to the UNWRP instruction, the unwrapping process fails. Fortunately, at wrapping time, the BTID is included as part of the MAC. Therefore, untrusted software cannot alter the BTID to use the blob for a purpose different from the one specified at wrapping time. In other words, the WRP instruction ensures that the wrapped data is bound to the target.
[0130] In some embodiments, the UNWRP instruction is associated with the most privileged protection ring (e.g., ring 0). Therefore, when software invokes the UNWRP instruction, the SV-PUF ISA can verify that the software has the necessary authority before completing the wrapping process. To invoke the UNWRP instruction, the software passes a wrapped blob generated using the WRP instruction, a pointer to an output buffer to receive the unwrapped data, and a challenge provided to the PUF to generate the unwrapping key. The UNWRP instruction can specify target-specific data by operating with a BIND_STRUCT (described above) as its input structure.
[0131] The UNWRP instruction can specify target-specific data by operating with BIND_STRUCT (described below) as an input / output structure. In some embodiments, the UNWRP instruction identifies three operands. The source operand stores the location of the wrapped BIND_STRUCT of the source (input). The second destination operand stores the location of the unwrapped BIND_STRUCT of the destination (output). The first destination operand stores the operational status of the execution of the UNWRP instruction. The UNWRP instruction affects the following flags: ZF is cleared on successful unwrapping and set to 1 otherwise, and CF, PF, AF, OF, and SF are always cleared.
[0132] Figure 8 shows an embodiment of processing UNWRP instructions. Processing utilizes one or more of the execution circuit, PUF circuit, encryption circuit, and / or MAC circuit.
[0133] In 801, a single UNWRP instruction is fetched. For example, an UNWRP instruction is fetched. The UNWRP instruction includes fields for an opcode, a first destination operand which stores the operational status of the execution of the UNWRP instruction, a source operand which stores or encodes the location (e.g., address) of an input / source BIND_STRUCT, and a destination operand which stores or encodes the location (e.g., address) of an output / destination location. Note that in some embodiments, one or more BIND_STRUCTS are stored in one or more registers. In some embodiments, the UNWRP instruction further includes fields for a write mask. In some embodiments, the UNWRP instruction is fetched from the instruction cache. The opcode indicates that the execution circuit decrypts sensitive information from the input data structure using a PUF generation / decryption key or a virtual PUF key, and stores the decrypted sensitive information (for example, in a memory location provided by the second destination operand, or in the second destination operand itself) according to the use of a second destination operand for the instruction. Furthermore, the operational status of the execution is stored in the identified first destination operand.
[0134] In some embodiments, the execution circuit decrypts data from an input data structure using a key generated by the PUF, stores the decrypted data in an output data structure, finds a challenge in the input data structure to excite the PUF, and stores the operation status in an identified first destination operand. In some embodiments, decryption is performed by providing the generated key and sequence ID from the input data structure to the cryptographic engine. In some embodiments, the input data structure is first validated using MAC comparison. For example, the MAC is computed by removing the MAC from the input data structure and then generating a MAC for the remaining data. The MAC of the input data structure is then compared with the generated MAC to determine whether any data in the wrapped blob has changed. Note that in some embodiments, the entire input data structure is copied to the output data structure before any other operations.
[0135] In some embodiments, in the 802, a fetched single instruction is translated into one or more instructions of a different instruction set architecture before decoding. Executing one or more instructions of a different instruction set architecture is functionally equivalent to executing them according to the opcode of the single instruction.
[0136] A fetched single instruction (or a converted instruction) is decoded by the 803. For example, a fetched UNWRP instruction is decoded by a decoding circuit as detailed herein.
[0137] In 805, data values related to the source operands of the decoded instruction are retrieved. For example, if one or more of the source operands are memory operands, data is retrieved from the indicated memory location.
[0138] In 807, the decoded instruction (or translated instruction) is executed by an execution circuit (hardware) as detailed herein. In the case of a UNWRP instruction, execution causes the execution circuit to execute the decoded instruction according to the opcode, thereby decrypting at least the secret information from the input data structure using a PUF generation / decryption key or a virtual PUF key, and storing the decrypted secret information (for example, in a memory location provided by the second destination operand, or in the second destination operand itself) according to the use of a second destination operand for the instruction. Furthermore, the operational status of execution is stored in an identified first destination operand.
[0139] In some embodiments, the execution circuit decrypts data from an input data structure using a key generated by the PUF, stores the decrypted data in an output data structure, finds a challenge in the input data structure to excite the PUF, and stores the operation status in an identified first destination operand. In some embodiments, decryption is performed by providing the generated key and sequence ID from the input data structure to the cryptographic engine. In some embodiments, the input data structure is first validated using MAC comparison. For example, the MAC is computed by removing the MAC from the input data structure and then generating a MAC for the remaining data. The MAC of the input data structure is then compared with the generated MAC to determine whether any data in the wrapped blob has changed. Note that in some embodiments, the entire input data structure is copied to the output data structure before any other operations.
[0140] In some embodiments, the instruction is committed or retired at 809.
[0141] Figure 9 shows the method executed by the processor to perform an unwrap (UNWRP) instruction according to this embodiment. Note that an SV-PUF circuit may be involved in key generation. At 900, a determination is made as to whether SV-PUF is supported. In some embodiments, this is set in a model-specific register (MSR). If it is determined that SV-PUF is not supported, execution stops at 902 due to an undefined instruction.
[0142] In step 904, it is determined whether the processor (or core) is not in non-root virtualization mode and whether SV-PUF is enabled. If the processor (or core) is not in non-root virtualization mode (executed by guest software (virtual machine)) and SV-PUF is not enabled, the instruction is undefined in step 906.
[0143] However, if the processor (or multiple cores) is not in non-root virtualization mode and SV-PUF is determined not to be enabled, execution proceeds to 907, where it is determined whether the software requesting the wrapping has privileges (e.g., ring 0). If the software requesting the wrapping is determined not to have privileges, execution terminates at 608 due to a general protection failure.
[0144] However, if the software requesting the wrapping is determined to have privileges, execution proceeds to 909, where it is determined whether the processor (or core) is in non-root virtualization mode and whether SV_PUF mode has been terminated. If this determination is true, at 910, the reason for termination set in the virtual machine control structure (VMCS) is set to SV-PUF, the termination eligibility is set to unwrap, and VMExit is delivered. If the determination is false, the process proceeds to 912, where it is determined whether the contents of the source registers are aligned. If it is determined that the contents of the source registers are not aligned, the process terminates at 914 due to a general protection failure. However, if it is determined that the contents of the source registers are aligned, the process proceeds to 916, where it is determined whether the contents of the second destination register are aligned.
[0145] If the contents of the source register are determined to be misaligned, the process terminates at step 918 due to a general protective fault. However, if the contents of the destination register are determined to be misaligned, the process proceeds to step 920, where it is determined whether the contents of the source register and the second destination register are duplicates.
[0146] If it is determined that the contents of the source register and destination register are duplicates, the process terminates at 922 due to a general protective fault. However, if it is determined that the contents of the source register and destination register are not duplicates, the process proceeds to 924, where the input structure identified by the address information stored in the first source operand (e.g., RBX) is loaded into memory. The process then proceeds to 926.
[0147] At step 926, it is determined whether any reserved fields are set in the input structure identified by the address information stored in the first source operand. If it is determined that a reserved field is set in the input structure identified by the address information stored in the first source operand, the process terminates at step 928 due to a general protective fault. However, if it is determined that no reserved field is set in the input structure identified by the address information stored in the first source operand, the process proceeds to step 930, where it is determined whether the unwrapping target (e.g., indicated by BTID in BIND_STRUCT) is software. If it is determined that the unwrapping target is not software, the process proceeds to step 932, where the 0 flag is set to 1 to indicate that the data was not unwrapped, and the status register (the first destination, such as RAX) is set to indicate an invalid target error. However, if it is determined that the unwrapping target is software, the process proceeds to step 934, where the unwrapping key is retrieved from the PUF or virtual PUF key register using the challenge stored in the BTDATA field of BIND_STRUCT. The process then proceeds to 936.
[0148] In step 936, the data from the BTENDCDATA field of the input BIND_STRUCT is decoded using the unwrapping key and SEQID field of the input BIND_STRUCT. The process then proceeds to step 938.
[0149] At step 938, it is determined whether the unwrapping was successful. If it is determined that the unwrapping was unsuccessful (for example, due to a MAC mismatch), the process proceeds to 940, where the 0 flag is set to 1 to indicate that the data was not unwrapped, and the status register (e.g., RAX) is set to indicate unwrapping failure. However, if it is determined that the unwrapping was successful (for example, due to a MAC match), the process proceeds to 942, where the unwrapped data is written to an output buffer identified by the address information stored in the second source operand (e.g., RCX), the 0 flag is set to 0 to indicate that the data was successfully unwrapped, and the destination register (e.g., RAX) is set to indicate success. The process then proceeds to 944, where all other flags are cleared.
[0150] Figure 10 shows an embodiment of pseudocode for executing UNWRP instructions.
[0151] In some embodiments, the unwrapping instruction includes a method for pointing to something wrapped with device identification information / key and includes an identifier for 64 bot inputs that can be used to provide an identification challenge received from the server. In addition, this unwrapping instruction (using the opcode mnemonic UNWRPMAC) also receives input to control the signature algorithm.
[0152] If a different use blob (indicated by its BTID) is passed to UNWRPMAC, unwrapping will fail. Note that, since the BTID is included as part of the MAC during wrapping, untrusted software cannot simply change the BTID to use a blob for one use or another. In other words, the WRP instruction ensures that it is bound to the target / use. The output of the UNWRPMAC instruction is a signed response.
[0153] In some embodiments, the UNWRPMAC instruction is a ring 0 instruction. In some embodiments, the UNWRPMAC instruction utilizes the following four operands: 1) a source / destination operand that provides an identification challenge for the SV-PUF circuit to generate a key as the source and stores the post-execution operational status as the destination; 2) a first source that provides instructions for the signature algorithm to use (note that this source may be a register, memory location, or encoded immediate value); 3) a second source that stores or encodes the location (e.g., a register or memory location) of the input structure that holds the (un)wrapping key to be used during execution; and 4) a destination operand that stores or encodes the location (e.g., a register or memory location) where the signed response generated during execution will be placed. Execution of the UNWRPMAC instruction can clear the ZF if successful (or otherwise set to 1) and clear any other flags in the condition code or flag register.
[0154] Figure 11 shows an embodiment of a signature data structure used to define which signature algorithm to use during UNWRPMAC execution. As illustrated, this signature control data structure is a bit vector where each bit position represents a signature function (e.g., a MAC generation function). In this example, there are four SHA-3 based MAC functions with varying output sizes (e.g., 224 bits to 512 bits). In some embodiments, the generated output is padded to 512 bits. In some embodiments, the signature control data structure is stored in a register as an MSR or GPR. In some embodiments, the signature control data structure is encoded immediately after the instruction. In some embodiments, the signature control data structure is stored in a memory location.
[0155] Figure 12 shows an embodiment of processing a UNWRPMAC instruction. In 1201, a single UNWRPMAC instruction is fetched. For example, a UNWRPMAC instruction is fetched. The UNWRPMAC instruction includes one or more fields for the opcode, one or more fields for identifying a source / destination operand that provides an identification information challenge for the SV-PUF circuit to generate a key as the source and stores the post-execution operational status as the destination, one or more fields for identifying a first source operand which provides instructions for the signature algorithm to use, one or more fields for identifying a second source operand which stores or encodes the location of an input data structure that holds the (un)wrapping key and the data to be decoded to be used during execution, and one or more fields for identifying a destination operand which stores or encodes the location where the signed response generated during execution will be located. The opcode indicates that the execution circuit decrypts the secret information from the input data structure of the second source operand using a PUF-generated wrapping key, generates a signed response of the unwrapped secret information using the identification challenge of the source / destination operand according to the signing algorithm indicated by the first source operand, and stores the signed response in the identified destination. Furthermore, the execution status is stored in the identified source / destination operand.
[0156] In some embodiments, in 1202, a fetched single instruction is translated into one or more instructions of a different instruction set architecture before decoding. Executing one or more instructions of a different instruction set architecture is functionally equivalent to executing them according to the opcode of the single instruction.
[0157] The fetched single instruction (or converted instruction) is decoded in 1203. For example, the fetched UNWRPMAC instruction is decoded by a decoding circuit as detailed herein.
[0158] In step 1205, data values related to the source operands of the decoded instruction are retrieved. For example, if one or more of the source operands are memory operands, data is retrieved from the indicated memory location.
[0159] In 1207, the decoded instruction (or translated instruction) is executed by an execution circuit (hardware) as detailed herein. In the case of the UNWRPMAC instruction, execution indicates that the execution circuit will execute the decoded instruction according to the opcode to decode at least the secret information from the input data structure of the second source operand with the PUF generation key, generate a signed response of the decoded secret information using the identification challenge of the source / destination operand according to the signing algorithm indicated by the first source operand, and store the signed response in the identified destination. Furthermore, the operational status of the execution is stored in the identified source / destination operand.
[0160] In some embodiments, decryption is performed by providing the generated key and sequence ID from the input data structure to the cryptographic engine. In some embodiments, the input data structure is first validated using MAC comparison. For example, the MAC is computed by removing the MAC from the input data structure and then generating a MAC for the remaining data. The MAC of the input data structure is then compared with the generated MAC to determine whether any of the data in the wrapped blobs has changed. Note that in some embodiments, the entire input data structure is copied to the output data structure before any other operations.
[0161] In some embodiments, the instruction is committed or retired at 1209.
[0162] Figure 13 shows a method 1302 executed by the processor to process the unwrapmac instruction according to this embodiment. Note that an SV-PUF circuit may be involved in key generation.
[0163] At 1300, a determination is made as to whether SV-PUF is supported. In some embodiments, this determination is set in a model-specific register (MSR). If it is determined that SV-PUF is not supported, execution stops at 1302 due to an undefined instruction.
[0164] In step 1304, it is determined whether the processor (or core) is not in non-root virtualization mode and whether SV-PUF is enabled. If the processor (or core) is not in non-root virtualization mode (executed by guest software (virtual machine)) and SV-PUF is not enabled, the instruction is undefined in step 1306.
[0165] However, if the processor (or multiple cores) is not in non-root virtualization mode and SV-PUF is determined not to be enabled, execution proceeds to 1307, where it is determined whether the software requesting the wrapping has privileges (e.g., ring 0). If the software requesting the wrapping is determined not to have privileges, execution terminates at 608 due to a general protection failure.
[0166] However, if the software requesting the wrapping is determined to have privileges, execution proceeds to 1309, where it is determined whether the processor (or core) is in non-root virtualization mode and whether SV_PUF mode has been terminated. If this determination is true, at 1310, the reason for termination set in the virtual machine control structure (VMCS) is set to SV-PUF, the termination eligibility is set to unwrap, and VMExit is delivered. However, if the determination is false, the software requesting the wrapping is determined to have privileges, and the process proceeds to 1312, where it is determined whether the contents of the second source register are aligned. If the contents of the source register are determined to be misaligned, the process terminates at 1314 due to a general protective fault. However, if the contents of the source register are determined to be aligned, the process proceeds to 1316, where it is determined whether the contents of the destination register are aligned.
[0167] If the contents of the source register are determined to be misaligned, the process terminates at 1318 due to a general protective fault. However, if the contents of the destination register are determined to be misaligned, the process proceeds to 1320, where it is determined whether the contents of the second source register and destination register are duplicates.
[0168] If it is determined that the contents of the source register and destination register are duplicates, the process terminates at 1322 due to a general protective fault. However, if it is determined that the contents of the source register and destination register are not duplicates, the process proceeds to 1324, where the input structure identified by the address information stored in the second source operand (e.g., RBX) is loaded into memory. The process then proceeds from 1302 to 1326.
[0169] At 1326, it is determined whether any reserved fields are set in the input structure identified by the address information stored in the first source operand. If it is determined that reserved fields are set in the input structure identified by the address information stored in the first source operand, the process terminates at 1328 due to a general protective fault. However, if it is determined that no reserved fields are set in the input structure identified by the address information stored in the first source operand, the process proceeds to 1330, where it is determined whether the unwrapping target (e.g., indicated by BTID in BIND_STRUCT) is software. If it is determined that the unwrapping target is not software, the process proceeds to 1331, where the 0 flag is set to 1 to indicate that the data was not unwrapped, and the source / destination (e.g., status registers such as RAX) is set to indicate an invalid target error. However, if it is determined that the unwrapping target is software, the process proceeds to 1332, where it is determined whether multiple algorithms are set in the first source operand. If more algorithms are set, the 0 flag is set to 1, and the status in source / destination is set to invalid signature. If only one algorithm is set, the flow proceeds to 1334, where the unwrapping key is retrieved from the PUF or virtual PUF key register using the challenge stored in the BTDATA field of BIND_STRUCT as the challenge. Process 1302 then proceeds to 1336.
[0170] In step 1336, the data from the BTENDCDATA field of the input BIND_STRUCT is decoded using the unwrapping key and SEQID field of the input BIND_STRUCT. Then, process 1302 proceeds to step 1338.
[0171] At step 1338, it is determined whether the unwrapping was successful. If it is determined that the unwrapping was unsuccessful (e.g., due to a MAC mismatch), the process proceeds to step 1340, where the 0 flag is set to 1 to indicate that the data was not unwrapped, and the source / destination (e.g., RAX) is set to indicate unwrapping failure. However, if it is determined that the unwrapping was successful (e.g., due to a MAC match), the process proceeds to step 1342, where a signed response is generated using the key generated by the identification challenge of the source / destination, according to the algorithm indicated by the first source. Note that the key may be generated by providing an identification challenge to the SV-PUF.
[0172] The signed response is input to the destination indicated in 1343. In some embodiments, the signed response is padded to a size of 512 bits.
[0173] After that, process 1302 proceeds to 1344, and all other flags are cleared.
[0174] Figure 14 shows an embodiment of pseudocode for executing the UNWRPMAC instruction.
[0175] In some embodiments, a protection domain may be defined and / or configured using a processor instruction implemented by the processor, such as the “Platform Configuration” (PCONFIG) instruction described in relation to Figure 15 and throughout this disclosure. The PCONFIG instruction may be used to define and / or configure a protection domain, for example, by programming a new entry into a key table in the security engine's memory, or by modifying an existing entry. The key table includes a key ID, a key, and instructions for the use of the key (or lack thereof). In this way, a protection domain can be defined and configured programmatically (for example, by management software) using the PCONFIG instruction.
[0176] Figure 15 shows an example of configuring a protection domain using processor instructions. In some embodiments, for example, the processor may implement instructions that can be used to configure a protection domain associated with a memory protection system. For example, the processor instructions may be "Platform Configuration" (PCONFIG) instructions, "Trusted Platform Action Administrator" (TPAS) instructions, and / or any other suitable type of instruction.
[0177] The "Platform Configuration" (PCONFIG) instruction can be used to define and / or configure protection domains, for example, by programming new entries into the domain key table of a memory protection controller (e.g., the domain key table of a memory encryption engine) or by modifying existing entries. In this way, protection domains can be programmatically defined and configured using the PCONFIG instruction. Once a protection domain is configured using the PCONFIG instruction, the memory addresses associated with the protection domain are protected in the manner specified by the protection domain's configuration. For example, when using encryption protection, data is encrypted before being written to memory addresses within the protection domain, and data read from memory addresses within the protection domain is decrypted before being returned to the requesting processor.
[0178] In some embodiments, the PCONFIG instruction may require a specific privilege level or privilege ring. For example, a processor may support a hierarchy of privilege levels or privilege rings to restrict access to specific resources. In some embodiments, privilege ring 0 may be the lowest level of restriction, while privilege rings with higher numbers may become increasingly restrictive. For example, privilege ring 0 may be used by system administration software (e.g., the operating system kernel and device drivers), while privilege ring 3 may be used by userland applications. Thus, in some embodiments, the PCONFIG instruction may be a ring 0 instruction that can only be used by software running in the highest privilege ring (e.g., administration software used to configure a protection domain). Alternatively or additionally, the PCONFIG instruction may be a ring 3 instruction that can be used by any userland application to configure its own protection domain.
[0179] The opcode of the PCONFIG instruction indicates that the execution circuit is intended to execute one or more functions to constitute platform functionality. In some embodiments, there are explicit operands for the PCONFIG instruction, but there are also several implicit operands. In particular, a first register (e.g., EAX) stores the instruction for the leaf function to be called, and one or more other registers (e.g., RBX, RCX, and / or RDX) are used for leaf-specific purposes. It should be noted that a single instruction allows a leaf to execute different functions based on the values of these registers.
[0180] For the purposes of the following explanation, the PCONFIG function to be executed is intended to support MKTME key programming using wrapped blobs, or other cryptographic engine programming using wrapped blobs. In some embodiments, the first register is set to a value other than 0 or 1. In some embodiments, one of the "other" registers (e.g., RBX) indicates the key ID control value, and another of these registers (e.g., RCX) provides the address of the wrapped BIND_STRUCT. The key ID control value is used.
[0181] The illustrated example identifies the call flow between software 1510, which performs domain configuration using the PCONFIG instruction, and the memory security engine 145. The memory security engine 145 may include any engine, controller, or other component that provides encrypted memory protection. Software 1510 may include any software used to configure the domain protected by the memory security engine, such as a virtual machine manager and / or other management software. The illustrated call flow begins with software 1510 selecting a key programming mode for programming the encryption key for a particular domain (call 1502a). For example, as will be further described below, software 1510 may directly specify the key for the domain, or it may request that a random key be generated. Software 1510 can then call the PCONFIG processor instruction to perform domain configuration (call 1502b). When the PCONFIG instruction is called, the memory security engine is programmed for the key and protection mode for the particular domain (call 1502c). The memory security engine then returns a status code to software 1510 (call 1502d), which is then processed by software 1510 (call 1502e).
[0182] In some embodiments, the PCONFIG instruction may support various leaf functions for configuring and managing protection domains. When the PCONFIG instruction is executed, a specific leaf function to be called may be specified in a hardware register (e.g., the EAX register). In some embodiments, parameters used by a specific leaf function may also be specified in hardware registers (e.g., the RBX / RCX / RDX registers).
[0183] The table below shows examples of PCONFIG leaf encodings that can be used to enable support for multiple leaf functions. Although only one leaf function (KEY_PROGRAM leaf) is defined, additional leaf functions can be defined using reserved leaf encodings to extend the functionality of the PCONFIG instruction. PCONFIG leaf function encoding [Table 3]
[0184] The key program leaf function (KEY_PROGRAM) of the PCONFIG instruction can be used to program a key for a protection domain. In some embodiments, the parameters used by the key program leaf function may be specified within a key program structure (KEY_PROGRAM_STRUCT), and the address of the key program structure may be specified within a hardware register (e.g., an RBX register). The following table shows exemplary embodiments of the key program structure (KEY_PROGRAM_STRUCT). Key Program Structure (KEY_PROGRAM_STRUCT) [Table 4]
[0185] As illustrated, the key program structure identifies the key ID of the specific domain being programmed and also specifies the key programming commands. In some embodiments, for example, a key program leaf function may support multiple key programming commands, and the desired commands may be specified in the key program structure. Furthermore, in some embodiments, the key program structure may also include one or more reserved fields that can be used for subsequent extensions to the key program leaf function.
[0186] The following table shows examples of key programming commands that can be supported by key programming leaf functions. Keyprogramming Commands [Table 5]
[0187] After a key program leaf function has been executed, a return value or status code may be specified in a hardware register to indicate whether the key program function was successful. The following table shows examples of status codes that can be returned by a key program leaf function. Status code returned by the key program leaf function (KEY_PROGRAM) [Table 6]
[0188] The illustrated embodiment uses PCONFIG processor instructions to perform domain configuration, but other embodiments may use alternative and / or additional techniques for domain configuration. For example, in some embodiments, hardware registers can be used to perform domain configuration. For instance, a PCONFIG model-specific register (MSR) may be implemented to perform domain configuration, allowing software to invoke PCONFIG operations by writing to the PCONFIG MSR (e.g., executing a WRMSR instruction with an index for the PCONFIG MSR passed in a register such as the ECX register). Furthermore, specific parameters for PCONFIG operations (and their associated leaf functions and commands) may be passed in hardware registers. For example, the address of a key program structure (KEY_PROGRAM_STRUCT) may be passed in a hardware register such as the EDX register, the EAX register, or both of those registers (e.g., for a 64-bit memory address). The PCONFIG operation may then be performed in a manner similar to that described above.
[0189] Furthermore, in some embodiments, the PCONFIG operation can utilize a wrapped blob for domain key programming. In this way, domain keys can be programmed without exposing the keys to management software. In some embodiments, additional PCONFIG leaf functions may be implemented, for example, to allow keys to be wrapped and then unwrapped before being programmed to the memory security engine.
[0190] In some embodiments, a memory encryption capability register (ME_CAPABILITY_MSR) may be used to allow software to discover memory encryption capabilities. For example, software can read ME_CAPABILITY_MSR (e.g., using the read MSR (RDMSR) instruction) to identify supported encryption types and / or algorithms, the maximum number of encryption keys that can be used simultaneously, the maximum number of bits used for key IDs, etc. ME_CAPABILITY_MSR can be used to identify supported encryption algorithms, the maximum number of key IDs, the maximum number of keys, etc.
[0191] The Memory Encryption Activation Register (ME_ACTIVATE_MSR) can be used to activate encrypted memory protection (e.g., MKTME). This MSR may include fields for engaging a read-only lock (at least locking this register), enabling memory encryption, selecting a key for default encryption, specifying what happens to the default key when resuming from standby, identifying the default encryption algorithm to use, identifying the number of bits to use for the key ID, and restricting the available encryption algorithms.
[0192] An example of pseudocode for implementing the PCONFIG instruction is provided below. / / #UD (Undefined Opcode Exception) if PCONFIG is not enumerated, or is in VM86, or CPL > 0 if(CPUID.7.0:ECX[PCONFIG]==0 OR RFLAGS.VM==1 OR CPL > 0)#UD; if (VMX is in non-root mode) { if(VMCS.PCONFIG) { if((EAX > 62 AND VMCS.PCONFIG_EXITING
[63] ==1)OR (EAX < 63 AND VMCS.PCONFIG_EXITING[EAX]==1)) { Set VMCS.EXIT_REASON=PCONFIG; / / No exit qualification Deliver VMEXIT; } } else { #UD } } / / #GP(0) (general protection fault) for unsupported leaf if(EAX !=0)#GP(0) / / KEY_PROGRAM leaf flow if(EAX==0) { / / #GP(0) when ME_ACTIVATE_MSR is not locked, or memory encryption (ME) is not enabled, or multiple keys are not enabled if(ME_ACTIVATE_MSR.LOCK !=1 OR ME_ACTIVATE_MSR.ENABLE !=1 OR ME_ACTIVATE_MSR.ME_KEYID_BITS==0)#GP(0) / / Check that KEY_PROGRAM_STRUCT is 256B aligned if(DS:RBX is not 256B aligned)#GP(0); / / Check that KEY_PROGRAM_STRUCT is read-accessible <<DS:RBX must be readable>> / / Copy KEY_PROGRAM_STRUCT to temporary variable TMP_KEY_PROGRAM_STRUCT=DS:RBX.*; / / Check RSVD fields if(TMP_KEY_PROGRAM_STRUCT.RSVD !=0)#GP(0); if(TMP_KEY_PROGRAM_STRUCT.USUPP_KEYID_KEY.BYTES[63:16] !=0)#GP(0); if(TMP_KEY_PROGRAM_STRUCT.USUPP_KEYID_TWEAK_KEY.BYTES[63:16] !=0) #GP(0); / / Check for valid commands if (TMP_KEY_PROGRAM_STRUCT.KEYID_CMD.COMMAND is not a valid command) { RFLAGS.ZF=1; RAX=INVALID_PROG_CMD; goto EXIT; } / / Check that the KEYID being manipulated is a valid KEYID. if(TMP_KEY_PROGRAM_STRUCT.KEYID > 2^ME_ACTIVATE_MSR.ME_KEYID_BITS-1 OR TMP_KEY_PROGRAM_STRUCT.KEYID > ME_CAPABILITY_MSR.ME_MAX_KEYS OR TMP_KEY_PROGRAM_STRUCT.KEYID==0) { RFLAGS.ZF=1; RAX=INVALID_KEYID; goto EXIT; } / / Check that only one algorithm is requested for the KEYID domain, and that it is one of the activated algorithms. if(NUM_BITS(TMP_KEY_PROGRAM_STRUCT.KEYID_CMD.ENC_ALG)!=1 || (TMP_KEY_PROGRAM_STRUCT.KEYID_CMD.ENC_ALG& ME_ACTIVATE_MSR.ME_ALG_ENABLE==0)) { RFLAGS.ZF=1; RAX=INVALID_ENC_ALG; goto EXIT; } / / Attempt to acquire an exclusive lock if(NOT KEY_TABLE_LOCK.ACQUIRE(WRITE)) { / / PCONFIG failure RFLAGS.ZF=1; RAX=DEVICE_BUSY; goto EXIT; } / / The lock is acquired. switch(TMP_KEY_PROGRAM_STRUCT.KEYID_CMD.COMMAND) { case KD_SET_KEY_DIRECT: <<Write KEY=TMP_KEY_PROGRAM_STRUCT.USUPP_KEYID_KEY, TWEAK_KEY=TMP_KEY_PROGRAM_STRUCT.USUPP_KEYID_TWEAK_KEY, KEY_CONTROL=2'b01, Go to the ME key table for index TMP_KEY_PROGRAM_STRUCT.KEYID >> / / Read to ensure previous writes are complete. <<Read the KEY_CONTROL bit of index TMP_KEY_PROGRAM_STRUCT.KEYID>> break; case KD_SET_KEY_RANDOM: TMP_RND_KEY=<<Generate random key using RDSEED>> if(NOT ENOUGH ENTROPY) { RFLAGS.ZF=1; RAX=ENTROPY_ERROR; goto EXIT; } TMP_RND_TWEAK_KEY=<<Generate random key using RDSEED>> if(NOT ENOUGH ENTROPY) { RFLAGS.ZF=1; RAX=ENTROPY_ERROR; goto EXIT; } / / Mix the entropy supplied by the user to the data key and the tweak key TMP_RND_KEY=TMP_RND_KEY XOR TMP_KEY_PROGRAM_STRUCT.USUPP_KEYID_KEY.BYTES[15:0]; TMP_RND_TWEAK_KEY=TMP_RND_TWEAK_KEY XOR TMP_KEY_PROGRAM_STRUCT.USUPP_KEYID_TWEAK_KEY.BYTES[15:0]; <<Write KEY=TMP_RND_KEY, TWEAK_KEY=TMP_RND_TWEAK_KEY, KEY_CONTROL=2'b01, to the ME_KEY_TABLE at index TMP_KEY_PROGRAM_STRUCT.KEYID >> / / Perform a read to ensure completion of the previous write <<Read the KEY_CONTROL bits at index TMP_KEY_PROGRAM_STRUCT.KEYID>> break; case KD_CLEAR_KEY: <<Write KEY='0, TWEAK_KEY='0, KEY_CONTROL=2'b00, The index TMP_KEY_PROGRAM_STRUCT.KEYID is set to ME_KEY_TABLE. >> / / Read to ensure previous writes are complete. <<Read the KEY_CONTROL bit of index TMP_KEY_PROGRAM_STRUCT.KEYID>> break; case KD_NO_KEY: <<Write KEY_CONTROL=2'b11, Go to the ME key table for index TMP_KEY_PROGRAM_STRUCT.KEYID >> / / Read to ensure previous writes are complete. <<Read the KEY_CONTROL bit of index TMP_KEY_PROGRAM_STRUCT.KEYID>> break; } RAX=0; RFLAGS.ZF=0; / / Unlock KEY_TABLE_LOCK(RELEASE); EXIT: RFLAGS.CF=0; RFLAGS.PF=0; RFLAGS.AF=0; RFLAGS.OF=0; RFLAGS.SF=0; }
[0193] Figure 16 shows an exemplary configuration for KEYID_CTRL, which should be stored in one of the "other" registers (e.g., RBX). This control provides the cryptographic algorithm and key ID used to determine whether the MKTME engine can be programmed.
[0194] Figure 17 shows an embodiment of processing the PCONFIG instruction. The processing utilizes one or more of the execution circuit, PUF circuit, encryption circuit, and / or MAC circuit.
[0195] In 1701, a single PCONFIG instruction is fetched. For example, the PCONFIG instruction is fetched. The PCONFIG instruction includes a field for an opcode to indicate that the memory protection controller should be programmed according to a leaf operation, the first implicit operand providing instructions for the leaf operation, the second implicit operand providing instructions for a key identifier (key ID) and the encryption algorithm, the third implicit operand providing the location of the input data structure, the opcode to indicate that the execution circuit decrypts encrypted data from the input data structure using an unwrapping key generated by a physically non-replicable function (PUF), and the decrypted data, including the concatenation key, to program the memory protection controller using the concatenation key (e.g., a data key and one or more fine-tuning keys) based on the key ID based on the indicated encryption algorithm to set the operational status.
[0196] In some embodiments, the execution circuit decrypts data from an input data structure using a key generated by the PUF, stores the decrypted data in an output data structure, finds a challenge in the input data structure to excite the PUF, and stores the operation status in an identified first destination operand. In some embodiments, decryption is performed by providing the generated key and sequence ID from the input data structure to the cryptographic engine. In some embodiments, the input data structure is first validated using MAC comparison. For example, the MAC is computed by removing the MAC from the input data structure and then generating a MAC for the remaining data. The MAC of the input data structure is then compared with the generated MAC to determine whether any data in the wrapped blob has changed. Note that in some embodiments, the entire input data structure is copied to the output data structure before any other operations.
[0197] In some embodiments, in 1702, a fetched single instruction is translated into one or more instructions of a different instruction set architecture before decoding. Executing one or more instructions of a different instruction set architecture is functionally equivalent to executing them according to the opcode of the single instruction.
[0198] A fetched single instruction (or a converted instruction) is decoded in 1703. For example, a fetched PCONFIG instruction is decoded by a decoding circuit as detailed herein.
[0199] In step 1705, data values related to the source operands of the decoded instruction are retrieved. For example, if one or more of the source operands are memory operands, data is retrieved from the indicated memory location.
[0200] In 1707, the decoded instruction (or converted instruction) is executed by an execution circuit (hardware) as detailed herein. In the case of the PCONFIG instruction, execution causes the execution circuit to execute the decoded instruction according to the opcode as described above.
[0201] In some embodiments, the execution circuit decrypts data from an input data structure using a key generated by the PUF, stores the decrypted data in an output data structure, finds a challenge in the input data structure to excite the PUF, and stores the operation status in an identified first destination operand. In some embodiments, decryption is performed by providing the generated key and sequence ID from the input data structure to the cryptographic engine. In some embodiments, the input data structure is first validated using MAC comparison. For example, the MAC is computed by removing the MAC from the input data structure and then generating a MAC for the remaining data. The MAC of the input data structure is then compared with the generated MAC to determine whether any data in the wrapped blob has changed. Note that in some embodiments, the entire input data structure is copied to the output data structure before any other operations.
[0202] In some embodiments, the instruction is committed or retired in 1709.
[0203] Figure 18 illustrates how, according to this embodiment, the processor executes an encryption key programming (PCONFIG) instruction to program a target. Generally, the PCONFIG instruction allows software to program an encryption key and other target-specific information into a desired target. More specifically, the target identifies the encryption engine in which the key should be programmed. For example, the target may be an instance of MKTME (Multi-Key Total Memory Encryption, available from Intel Corporation (Santa Clara, California)) running on the platform.
[0204] At 1804, it is determined whether SV-PUF is supported. In some embodiments, this is set in a model-specific register (MSR). If it is determined that SV-PUF is not supported, the process terminates at 1806 due to a general protective fault. However, if it is determined that SV-PUF is supported, the process proceeds to 1808, where it is determined whether the software-identified target (e.g., a cryptographic engine) is currently active, and other target-specific checks are performed. For example, if the target is a cryptographic engine, the PCONFIG instruction may check whether the software-provided KEYID is within range. If it is determined that the software-identified target is not currently active, the process terminates at 1810 due to a general protective fault. However, if it is determined that the software-identified target is currently active, the process proceeds to 1812, where it is determined whether the contents of the source registers are aligned. If it is determined that the contents of the source registers are not aligned, the process terminates at 1814 due to a general protective fault. However, if it is determined that the contents of the source registers are aligned, the process proceeds to 1816.
[0205] At 1816, the input structure identified by the address information stored in the second source operand (e.g., RCX) is loaded into memory. The process then proceeds to 1818. At 1818, the temporary key ID control is set to equal the value identified by the address information stored in the first source operand (e.g., RBX). The process then proceeds to 1820.
[0206] At 1820, it is determined whether an arbitrary reserved field is set in the input structure identified by the address information stored in the first source operand. If it is determined that a reserved field is set in the input structure identified by the address information stored in the first source operand, the process terminates at 1822 due to a general protective fault. However, if it is determined that no reserved field is set in the input structure identified by the address information stored in the first source operand, the process proceeds to 1824, where it is determined whether an arbitrary reserved field is set in the temporary key ID control identified by the address information stored in the first source operand. If it is determined that a reserved field is set in the temporary key ID control identified by the address information stored in the first source operand, the process terminates at 1826 due to a general protective fault. However, if it is determined that no reserved field is set in the temporary key ID control identified by the address information stored in the first source operand, the process proceeds to 1828.
[0207] At 1828, it is determined whether an unwrapping target (e.g., indicated by a BTID in BIND_STRUCT) is a cryptographic engine (or another target specified by software during the WRP process). If it is determined that the unwrapping target is not the cryptographic engine, the process proceeds to 1830, where the zero flag is set to 1 to indicate that the data was not unwrapped, and the destination register (e.g., EAX) is set to indicate an invalid target error. However, if it is determined that the unwrapping target is the cryptographic engine, the process proceeds to 1832, where it is determined whether temporary key ID control is enabled. For example, is the value of the temporary key ID control found in KEY_PROGRAM_STRUCT (is the key ID and the cryptographic algorithm the same)?
[0208] If it is determined that the temporary key ID control is not enabled, the process proceeds to 1834, where the zero flag is set to 1 to indicate that the data was not unwrapped, and the destination register (e.g., EAX) is set to indicate an invalid key ID error. However, if it is determined that the temporary key ID control is enabled, the process proceeds to 1836, where it is determined whether the target is active. If it is determined that the target is not active, the process proceeds to 1838, where the zero flag is set to 1 to indicate that the data was not unwrapped, and the destination register (e.g., EAX) is set to indicate an inactive target error. However, if it is determined that the target is active, the process proceeds to 1840.
[0209] At 1840, the unwrapping key is obtained from a PUF or virtual PUF key register using the challenge stored in the BTDATA field of the BIND_STRUCT. The process then proceeds to 1842, where data from the BTENDCDATA field of the input BIND_STRUCT is decrypted using the unwrapping key and the SEQID field of the input BIND_STRUCT. The process then proceeds to 1844.
[0210] At 1844, it is determined whether unwrapping has succeeded. If it is determined that unwrapping has not succeeded (e.g., due to a MAC mismatch), the process proceeds to 1846, where the zero flag is set to 1 to indicate that the data was not unwrapped, and the destination register (e.g., EAX) is set to indicate an unwrapping failure. However, if it is determined that unwrapping has succeeded (e.g., due to a MAC match), the process proceeds to 1848, where it is determined whether the key table is locked. If it is determined that there is no lock, the process proceeds to 1850, where the zero flag is set to 1 to indicate that the data was not unwrapped, and the destination register (e.g., EAX) is set to indicate a device busy error. However, if it is determined that a lock is present, the process proceeds to 1852, where one or more fine-tuning keys for the unwrapped data and the key ID are programmed into the target cryptographic engine, the zero flag is set to 0 to indicate that the data unwrapping succeeded, the destination register (e.g., EAX) is set to indicate success, and the lock is released. The process then proceeds to 1854, where all other flags are cleared.
[0211] Figure 19 illustrates an embodiment of pseudocode for executing a PCONFIG instruction.
[0212] Figure 32 shows an embodiment of processing the virtual encryption key programming (PCONFIG.VPUF_KEYREG_PROGRAM) instruction. The processing utilizes one or more of the execution circuit, PUF circuit, encryption circuit, and / or MAC circuit.
[0213] In 3201, a single PCONFIG.VPUF_KEYREG_PROGRAM instruction is fetched. For example, the PCONFIG.VPUF_KEYREG_PROGRAM instruction is fetched. PCONFIG.VPUF_KEYREG_PROGRAM has one or more fields for an opcode to indicate the programming of a virtual PUF key according to a leaf operation, the first implicit operand providing instructions for the leaf operation, the second implicit operand providing the location of the input data structure, the opcode to indicate that the execution circuit uses fields from the input data structure to determine whether a virtual PUF key is supported, retrieves a wrapping key from the PUF or virtual PUF key register, and decrypts secret information from the input data structure using a PUF generation / decryption key or virtual PUF key, the secret information including a key to be stored in the virtual PUF key register, the key is stored in the virtual PUF key register to program the virtual PUF key and, in some embodiments, set a status flag.
[0214] In some embodiments, in the 3202, a fetched single instruction is translated into one or more instructions of a different instruction set architecture before decoding. Executing one or more instructions of a different instruction set architecture is functionally equivalent to executing them according to the opcode of the single instruction.
[0215] The fetched single instruction (or converted instruction) is decoded by the 3203. For example, the fetched PCONFIG.VPUF_KEYREG_PROGRAM instruction is decoded by a decoding circuit as detailed herein.
[0216] In 3205, data values related to the source operands of the decoded instruction are retrieved. For example, if one or more of the source operands are memory operands, data is retrieved from the indicated memory location.
[0217] In 3207, the decoded instruction (or converted instruction) is executed by an execution circuit (hardware) as detailed herein. In the case of the PCONFIG.VPUF_KEYREG_PROGRAM instruction, execution causes the execution circuit to execute the decoded instruction according to the opcode as described above.
[0218] In some embodiments, the instruction is committed or retired at 3209.
[0219] Figure 33 illustrates how, according to this embodiment, the processor executes the virtual encryption key programming (PCONFIG.VPUF_KEYREG_PROGRAM) instruction to program the VPUF register target. Generally, the virtual encryption key programming instruction allows software to program the virtual PUF key.
[0220] In step 3302, it is determined whether SV-PUF is supported. In some embodiments, this is set in a model-specific register (MSR). If it is determined that SV-PUF is not supported, the process terminates in step 3304 due to a general protective fault. However, if it is determined that SV-PUF is supported, the process proceeds to step 3306, where it is determined whether the contents of the source registers are aligned. If it is determined that the contents of the source registers are not aligned, the process terminates in step 3308 due to a general protective fault. However, if it is determined that the contents of the source registers are aligned, the process proceeds to step 3308.
[0221] In step 3308, the input structure identified by the address information stored in the second source operand (e.g., RCB) is loaded into memory. Next, in step 3310, it is determined whether the input structure is properly formatted. If it is not properly formatted, in step 3312, a general protective fault is generated.
[0222] Once the input structure is properly formatted, 3314 determines whether the input structure has a suitable ID to support the virtual PUF. If not, the 0 flag is set, an invalid target is indicated, and the instruction terminates at 3316.
[0223] In step 3318, the unwrapping key is retrieved from the PUF or virtual PUF key register using the challenge stored in the BTDATA field of the BIND_STRUCT. The process then proceeds to step 3320, where the data from the BTENDCDATA field of the input BIND_STRUCT is decoded using the unwrapping key and SEQID field of the input BIND_STRUCT. The process then proceeds to step 3344.
[0224] In step 3322, it is determined whether the unwrapping was successful. If it is determined that the unwrapping was unsuccessful (for example, due to a MAC mismatch), the process proceeds to step 3335, where the 0 flag is set to 1 to indicate that the data was not unwrapped, and the destination register (e.g., EAX) is set to indicate unwrapping failure. However, if it is determined that the unwrapping was successful (for example, due to a MAC match), the process proceeds to step 3326, where the VPUF key register is programmed.
[0225] Figure 34 shows an embodiment of pseudocode for executing the PCONFIG instruction.
[0226] The above instructions can be implemented in multiple architectures, systems, and formats, examples of which are described in detail below. Furthermore, in some embodiments, one or more of the fields for identifying operands within an instruction are implicit. That is, the instruction itself does not encode operand identification information; rather, the operands are implied by the opcode. Note that the use of fields, such as those used to facilitate understanding, is not limited.
[0227] Exemplary computer architecture Exemplary computer architectures are described in detail below. Other system designs and configurations known in the art are also suitable for laptops, desktops, and handheld PCs, portable information terminals, engineering workstations, servers, network devices, network hubs, switches, embedded processors, digital signal processors (DSPs), graphics devices, video game devices, set-top boxes, microcontrollers, mobile phones, portable media players, handheld devices, and various other electronic devices. Generally, a wide variety of systems or electronic devices that can incorporate the processors and / or other execution logic disclosed herein are generally suitable.
[0228] Figure 20 shows an exemplary system embodiment. The multiprocessor system 2000 is a point-to-point interconnect system and includes multiple processors, including a first processor 2070 and a second processor 2080, coupled via a point-to-point interconnect 2050. In some embodiments, the first processor 2070 and the second processor 2080 are homogeneous. In some embodiments, the first processor 2070 and the second processor 2080 are heterogeneous.
[0229] Processors 2070 and 2080 are each shown including integrated memory controller (IMC) circuits 2072 and 2082, respectively. Processor 2070 also includes point-to-point (P-P) interfaces 2076 and 2078 as part of its interconnect controller unit. Similarly, the second processor 2080 includes P-P interfaces 2086 and 2088. Processors 2070, 2080 may exchange information via a point-to-point (P-P) interconnect 2050 using P-P interfaces 2078, 2088. The IMCs 2072 and 2082 couple processors 2070, 2080 to respective memories, namely memory 2032 and memory 2034, which may be portions of main memory locally attached to the respective processors.
[0230] Processors 2070, 2080 may each exchange information with chipset 2090 via individual P-P interfaces 2052, 2054 using P-P interfaces 2076, 2094, 2086, 2098. Chipset 2090 may optionally exchange information with coprocessor 2038 via a high-performance interface 2092. In some embodiments, coprocessor 2038 is a dedicated processor such as, for example, a high-throughput MIC processor, a network or communications processor, a compression engine, a graphics processor, a GPGPU, or an embedded processor.
[0231] A shared cache (not shown) may be included in either of processors 2070, 2080 or external to both processors, and further connected to the plurality of processors via a P-P interconnect, such that local cache information for either or both processors may be stored in the shared cache when the processors are placed into a low power mode.
[0232] The chipset 2090 can be coupled to a first interconnect 2016 via interface 2096. In some embodiments, the first interconnect 2016 may be an interconnect of Peripheral Component Interconnects (PCI), or an interconnect such as a PCI Express interconnect or another I / O interconnect. In some embodiments, the first interconnect 2016 is coupled to a power control unit (PCU) 2017, which may include circuitry, software, and / or firmware, that performs power management operations related to processors 2070, 2080, and / or coprocessor 2038. The PCU 2017 provides control information to a voltage regulator (not shown) to cause the voltage regulator to generate an appropriate regulated voltage. The PCU 2017 also provides control information to control the generated operating voltage. In various embodiments, the PCU 2017 may include various power management logic units (e.g., circuitry) to perform hardware-based power management. Such power management may be entirely processor-controlled (for example, controlled by various processor hardware and triggered by workload and / or power, heat, or other processor constraints), and / or power management may be performed in response to an external source (such as a platform or power management source or system software).
[0233] The PCU2017 is shown as existing as logic separate from the processor 2070 and / or processor 2080. In other cases, the PCU2017 may run on a given one or more cores (not shown) of the processor 2070 or 2080. In some cases, the PCU2017 may be implemented as a microcontroller (dedicated or general-purpose) or other control logic configured to run its own dedicated power management code, referred to as P-code. In yet another embodiment, the power management operations performed by the PCU2017 may be implemented externally to the processor by a separate power management integrated circuit (PMIC) or another component located outside the processor. In yet another embodiment, the power management operations performed by the PCU2017 may be implemented within the BIOS or other system software.
[0234] Various I / O devices 2014 may be coupled to the first interconnect 2016 together with an interconnect (bus) bridge 2018 that connects the first interconnect 2016 to the second interconnect 2020. In some embodiments, one or more additional processors 2015, such as a coprocessor, a high-throughput MIC processor, a GPGPU, an accelerator (e.g., a graphics accelerator or a digital signal processing (DSP) unit), a field-programmable gate array (FPGA), or any other processor, are coupled to the first interconnect 2016. In some embodiments, the second interconnect 2020 may be a low-pin-count (LPC) interconnect. Various devices, such as a keyboard and / or mouse 2022, a communication device 2027, and a storage unit circuit 2028, may be coupled to the second interconnect 2020. In some embodiments, the storage unit circuit 2028 may be a disk drive or other mass storage device that can contain instructions / code and data 2030. Furthermore, audio I / O 2024 may be coupled to a second interconnect 2020. It should be noted that architectures other than the point-to-point architecture described above are possible. For example, instead of a point-to-point architecture, systems such as the multiprocessor system 2000 may implement a multidrop interconnect or other such architectures.
[0235] Exemplary core architectures, processors, and computer architectures Processor cores may be implemented in different forms and for different purposes in different processors. For example, such core implementations may include 1) general-purpose in-order cores intended for general-purpose computing, 2) high-performance general-purpose out-of-order cores intended for general-purpose computing, and 3) dedicated cores intended primarily for graphics and / or scientific (throughput) computing. Different processor implementations may include a CPU comprising 1) one or more general-purpose in-order cores intended for general-purpose computing and / or one or more general-purpose out-of-order cores intended for general-purpose computing, and 2) a coprocessor comprising one or more dedicated cores intended primarily for graphics and / or scientific (throughput) computing. Such different processors result in different computer system architectures, which may include: 1) a coprocessor on a separate chip from the CPU; 2) a coprocessor on a separate die in the same package as the CPU; 3) a coprocessor on the same die as the CPU (in this case, such a coprocessor may be referred to as dedicated logic, or dedicated core, such as integrated graphics and / or scientific (throughput) logic); and 4) a system-on-a-chip on the same die as the described CPU (which may be referred to as an application core or application processor), which may include the aforementioned coprocessor and additional functionality. An exemplary core architecture is described below, followed by descriptions of exemplary processors and computer architectures.
[0236] Figure 21 shows a block diagram of an embodiment of a processor 2100 that may have multiple cores, an integrated memory controller, and integrated graphics. The solid box shows a processor 2100 having a single core 2102A, a system agent 2110, and a set of one or more interconnect controller unit circuits 2116, while the optional dotted box shows an alternative processor 2100 having multiple cores 2102(A) to (N), a set of one or more integrated memory controller unit circuits 2114 in the system agent unit circuit 2110, dedicated logic 2108, and a set of one or more interconnect controller unit circuits 2116. Note that the processor 2100 may be one of the processors 2070, 2080, 2038, or 2015 in Figure 20.
[0237] Therefore, different implementations of the processor 2100 may include: 1) a CPU having dedicated logic 2108 (not shown, but may include one or more cores) which is integrated graphics and / or scientific (throughput) logic, and one or more general-purpose cores 2102(A)~(N) (e.g., general-purpose in-order cores, general-purpose out-of-order cores, or a combination of the two); 2) a coprocessor having a number of dedicated cores 2102(A)~(N) primarily intended for graphics and / or scientific (throughput); and 3) a coprocessor having a number of general-purpose in-order cores 2102(A)~(N). Therefore, the processor 2100 may be a general-purpose processor, coprocessor, or dedicated processor, such as a network or communications processor, a compression engine, a graphics processor, a GPGPU (general-purpose graphics processing unit circuit), a high-throughput multi-integrated core (MIC) coprocessor (including 30 or more cores), or an embedded processor. The processor 2100 may be implemented on one or more chips. The processor 2100 may be part of one or more substrates and / or mounted on one or more substrates, for example, using one of several process technologies such as BiCMOS, CMOS, or NMOS.
[0238] The memory hierarchy includes one or more levels of external memory (not shown) coupled with cache unit circuits 2104(A)-(N) within cores 2102(A)-(N), a set of one or more shared cache unit circuits 2106, and a set of integrated memory controller unit circuits 2114. The set of one or more shared cache unit circuits 2106 may include one or more intermediate level caches such as level 2 (L2), level 3 (L3), level 4 (L4), or other levels of caches such as a last level cache (LLC), and / or combinations thereof. In some embodiments, a ring-based interconnect network circuit 2112 interconnects dedicated logic 2108 (e.g., integrated graphics logic), the set of shared cache unit circuits 2106, and the system agent unit circuit 2110, while alternative embodiments use any number of known techniques to interconnect such units. In some embodiments, coherence is maintained between one or more shared cache unit circuits 2106 and cores 2102(A)-(N).
[0239] In some embodiments, one or more of the cores 2102(A) to (N) can be multithreaded. The system agent unit circuit 2110 includes components for coordinating and operating the cores 2102(A) to (N). The system agent unit circuit 2110 may include, for example, a power control unit (PCU) circuit and / or a display unit circuit (not shown). The PCU may be, or include, the logic and components necessary to regulate the power state of the cores 2102(A) to (N) and / or dedicated logic 2108 (e.g., integrated graphics logic). The display unit circuit is for driving one or more externally connected displays.
[0240] Cores 2102(A) to (N) may be homogeneous or heterogeneous in terms of their architectural instruction sets. That is, two or more cores 2102(A) to (N) may execute the same instruction set, while other cores may execute only a subset of that instruction set or a different instruction set.
[0241] Exemplary Core Architecture Block diagrams of in-order and out-of-order cores Figure 22(A) is a block diagram showing both an exemplary in-order pipeline and an exemplary out-of-order issue / execution pipeline for register renaming according to this embodiment. Figure 22(B) is a block diagram showing both an exemplary in-order architecture core and an exemplary out-of-order issue / execution architecture core for register renaming included in the processor according to this embodiment. In Figures 22(A) to 22(B), solid boxes indicate in-order pipelines and in-order cores, while optional dotted boxes indicate out-of-order issue / execution pipelines and cores for register renaming. Out-of-order embodiments are described assuming that in-order embodiments are a subset of out-of-order embodiments.
[0242] In Figure 22(A), the processor pipeline 2200 includes a fetch stage 2202, an optional length decode stage 2204, a decode stage 2206, an optional allocation stage 2208, an optional renaming stage 2210, a scheduling (also known as dispatch or issue) stage 2212, an optional register read / memory read stage 2214, an execution stage 2216, a write-back / memory write stage 2218, an optional exception handling stage 2222, and an optional commit stage 2224. One or more operations may be performed in each of these processor pipeline stages. For example, during the fetch stage 2202, one or more instructions may be fetched from instruction memory; during the decode stage 2206, one or more fetched instructions may be decoded, an address using a transferred register port (e.g., a load-store unit (LSU) address) may be generated, and a branch transfer (e.g., an immediate offset or link register (LR)) may be performed. In one embodiment, the decode stage 2206 and the register read / memory read stage 2214 may be combined into a single pipeline stage. In one embodiment, during the execution stage 2216, the decoded instruction may be executed, LSU address / data may be pipelined to an Advanced Microcontroller Bus (AHB) interface, multiplication and addition operations may be performed, and arithmetic operations may be performed using branch results.
[0243] For example, the exemplary out-of-order issue / execution core architecture 2290 for register renaming shown in Figure 22(B) may implement pipeline 2200 as follows: 1) Instruction fetch 2238 executes fetch and length decode stages 2202 and 2204. 2) Decode unit circuit 2240 executes decode stage 2206. 3) Renaming / allocation unit circuit 2252 executes allocation stage 2208 and renaming stage 2210. 4) Scheduler unit circuit 2256 executes scheduling stage 2212. 5) Physical register file unit circuit 2258 and memory unit circuit 2270 execute register read / memory read stage 2214, and execution cluster 2260 executes execution stage 2216. 6) Memory unit circuit 2270 and physical register file unit circuit 2258 execute write-back / memory write stage 2218. 7) Various units (unit circuits) may be involved in the exception handling stage 2222. 8) The retirement unit circuit 2254 and the physical register file unit circuit 2258 execute the commit stage 2224.
[0244] Figure 22(B) shows a processor core 2290 including a front-end unit circuit 2230 coupled to an execution engine unit circuit 2250, both coupled to a memory unit circuit 2270. Core 2290 may be a reduced instruction set computing (RISC) core, a composite instruction set computing (CISC) core, a very long instruction word (VLIW) core, or a hybrid or alternative core type. Further options include dedicated cores such as a network or communications core, a compression engine, a coprocessor core, a general-purpose computing graphics processing unit (GPGPU) core, or a graphics core.
[0245] The front-end unit circuit 2230 may include a branch prediction unit circuit 2232 coupled to an instruction cache unit circuit 2234, the instruction cache unit circuit 2234 coupled to an instruction translation index buffer (TLB) 2236, the TLB 2236 coupled to an instruction fetch unit circuit 2238, and the instruction fetch unit circuit 2238 coupled to a decode unit circuit 2240. In one embodiment, the instruction cache unit circuit 2234 is included in the memory unit circuit 2270 rather than the front-end unit circuit 2230. The decode unit circuit 2240 (or decoder) may decode an instruction and generate as output one or more microoperations, microcode entry points, microinstructions, other instructions, or other control signals that are decoded from the original instruction, or otherwise reflect them, or are derived from them. The decode unit circuit 2240 may further include an address generation unit circuit (AGU, not shown). In one embodiment, the AGU may generate an LSU address using the transferred register port and may further perform branch transfers (e.g., immediate offset branch transfer, LR register branch transfer, etc.). The decode unit circuit 2240 may be implemented using a variety of different mechanisms. Examples of preferred mechanisms include, but are not limited to, lookup tables, hardware implementations, programmable logic arrays (PLAs), and microcode read-on rememory (ROM). In one embodiment, the core 2290 includes a microcode ROM (not shown) or other medium for storing the microcode of a particular macro instruction (e.g., in the decode unit circuit 2240, or otherwise in the front-end unit circuit 2230). In one embodiment, the decode unit circuit 2240 includes a micro-operation (micro-op) or arithmetic cache (not shown) for holding / caching decoded arithms, microtags, or microoperations generated during the decode 2206 or other stages of the processor pipeline 2200. The decoding unit circuit 2240 may be coupled with the renaming / assignment unit circuit 2252 in the execution engine unit circuit 2250.
[0246] The execution engine circuit 2250 includes a renaming / allocation unit circuit 2252 coupled with a retirement unit circuit 2254 and a set of one or more scheduler circuits 2256. The scheduler circuits 2256 represent any number of different schedulers, including multiple reservation stations, a central instruction window, etc. In some embodiments, the scheduler circuits 2256 may include arithmetic logic unit (ALU) scheduler / scheduling circuits, ALU queues, arithmetic generation unit (AGU) scheduler / scheduling circuits, AGU queues, etc. The scheduler circuits 2256 are coupled with physical register file circuits 2258. Each of the physical register file circuits 2258 represents one or more physical register files, which, being different, store one or more different data types, such as scalar integers, scalar floating-point numbers, packed integers, packed floating-point numbers, vector integers, vector floating-point numbers, and status (e.g., an instruction pointer, which is the address of the next instruction to be executed). In one embodiment, the physical register file unit circuit 2258 includes a vector register unit circuit, a write mask register unit circuit, and a scalar register unit circuit. These register units may provide architecture vector registers, vector mask registers, general-purpose registers, etc. The physical register file unit circuit 2258 overlaps with the retirement unit circuit 2254 (also known as the retirement queue or retirement queue) and demonstrates various ways in which register renaming and out-of-order execution can be implemented (e.g., using a reorder buffer (ROB) and retirement register file, using a future file, history buffer, and retirement register file, using a register map and register pool, etc.). The retirement unit circuit 2254 and the physical register file circuit 2258 are coupled to an execution cluster 2260. The execution cluster 2260 includes one or more sets of execution unit circuits 2262 and one or more sets of memory access circuits 2264.The execution unit circuit 2262 may perform various arithmetic, logic, floating-point, or other types of operations (e.g., shift, addition, subtraction, multiplication) on various types of data (e.g., scalar floating-point, packed integer, packed floating-point, vector integer, vector floating-point). Some embodiments may include many execution units or execution unit circuits dedicated to a particular function or set of functions, while other embodiments may include only one execution unit circuit, or multiple execution units / execution unit circuits that perform all functions. Since certain embodiments form separate pipelines for certain types of data / operations (e.g., scalar integer pipelines, scalar floating-point / packed integer / packed floating-point / vector integer / vector floating-point pipelines, and / or memory access pipelines, each having its own scheduler circuit, physical register file unit circuit, and / or execution cluster, and in the case of a separate memory access pipeline, certain embodiments are implemented such that only the execution cluster of this pipeline has the memory access unit circuit 2264), the scheduler circuit 2256, physical register file unit circuit 2258, and execution cluster 2260 are shown as possibly being multiple. It should also be understood that when separate pipelines are used, one or more of these pipelines may be out-of-order issue / execution, while the rest may be in-order.
[0247] In some embodiments, the execution engine unit circuit 2250 may include a PUF circuit 2280, while in other embodiments, the PUF circuit 2280 may be external to the execution engine unit circuit 2250. In some embodiments, the execution engine unit circuit 2250 may perform pipeline processing of an Advanced Microcontroller Bus (AHB) interface (not shown), address phase and write-back, data phase load, store, and load / store unit (LSU) address / data to branch.
[0248] A set of memory access circuits 2264 are coupled to a memory unit circuit 2270, which includes a data TLB unit circuit 2272 coupled to a data cache circuit 2274 coupled to a level 2 (L2) cache circuit 2276. In one exemplary embodiment, the memory access unit circuit 2264 may include a load unit circuit, a store address unit circuit, and a store data unit circuit, each of which is coupled to a data TLB circuit 2272 within the memory unit circuit 2270. The instruction cache circuit 2234 is further coupled to a level 2 (L2) cache unit circuit 2276 within the memory unit circuit 2270. In one embodiment, the instruction cache 2234 and data cache 2274 are combined with an L2 cache unit circuit 2276, a level 3 (L3) cache unit circuit (not shown), and / or a single instruction and data cache (not shown) in main memory. The L2 cache unit circuit 2276 is coupled to one or more other levels of caches and ultimately to main memory.
[0249] The Core 2290 may support one or more instruction sets, including the instructions described herein (e.g., the x86 instruction set (with newer versions added and several extensions), the MIPS instruction set, and the ARM instruction set (with optional additional extensions such as NEON). In one embodiment, the Core 2290 includes logic to support packed data instruction set extensions (e.g., AVX1, AVX2), thereby enabling operations used by many multimedia applications to be performed using packed data.
[0250] In some embodiments, the ISA (e.g., WRP, UNWRP, PCONFIG) is executed by one or more execution clusters 2260 of the execution engine 2250 of the core 2290 (Figure 22(B)). For example, the execution unit circuit 2262 can execute the ISA to communicate with the PUF circuit 2280, pass challenge 2(A)06 to the PUF circuit 2280, and receive PUF-derived key 2(A)04 from the PUF circuit 2280.
[0251] Exemplary execution unit circuit Figure 23 shows an embodiment of an execution unit circuit, such as the execution unit circuit 2262 in Figure 22(B). As shown, the execution unit circuit 2262 may include one or more ALU circuits 2301, a vector / SIMD unit circuit 2303, a load / store unit circuit 2305, and / or a branch / jump unit circuit 2307. The ALU circuit 2301 performs arithmetic and / or Boolean operations. The vector / SIMD unit circuit 2303 performs vector / SIMD operations on packed data (such as SIMD / vector registers). The load / store unit circuit 2305 executes load and store instructions to load data from memory into registers or store data from registers into memory. The load / store unit circuit 2305 may also generate addresses. The branch / jump unit circuit 2307, depending on the instruction, causes a branch or jump to a memory address. The FPU circuit 2309 performs floating-point operations. The width of the execution unit circuit 2262 varies depending on the embodiment and can range, for example, from 16 bits to 1,024 bits. In some embodiments, two or more smaller execution units are logically combined to form a larger execution unit (for example, two 128-bit execution units are logically combined to form a 256-bit execution unit).
[0252] Exemplary Register Architecture Figure 24 is a block diagram of the register architecture 2400 according to several embodiments. As shown, there are vector / SIMD registers 2410 whose widths vary from 128 bits to 1,024 bits. In some embodiments, the vector / SIMD registers 2410 are physically 512 bits, and depending on the mapping, only some of the lower bits are used. For example, in some embodiments, the vector / SIMD register 2410 is a 512-bit ZMM register, with the lower 256 bits used for the YMM register and the lower 128 bits used for the XMM register. Thus, there is a register overlay. In some embodiments, the vector length field is selected from the maximum length and one or more other shorter lengths, each of which is half the length of the aforementioned length. Scalar operations are operations performed at the lowest data element positions in the ZMM / YMM / XMM registers, while the higher data element positions are, depending on the embodiment, left in the same state as those prior to the instruction or zeroed out.
[0253] In some embodiments, the register architecture 2400 includes write mask / predicate registers 2415. For example, in some embodiments, there are eight write mask / predicate registers (sometimes referred to as k0 through k7) of sizes 16 bits, 32 bits, 64 bits, or 128 bits, respectively. The write mask / predicate registers 2415 may enable merging (e.g., allowing any set of elements in a destination to be protected from updating during the execution of any operation) and / or zeroing (e.g., a zeroing vector mask allows any set of elements in a destination to be zeroed during the execution of any operation). In some embodiments, each data element position in a given write mask / predicate register 2415 corresponds to a data element position in a destination. In other embodiments, the write mask / predicate registers 2415 are scalable and consist of a set number of enable bits for a given vector element (e.g., 8 enable bits for every 64-bit vector element).
[0254] The register architecture 2400 includes several general-purpose registers 2425. These registers may be 16-bit, 32-bit, 64-bit, etc., and may be used for scalar operations. In some embodiments, these registers are referred to by the names RAX, RBX, RCX, RDX, RBP, RSI, RDI, RSP, and R8 through R15.
[0255] In some embodiments, the register architecture 2400 includes scalar floating-point registers 2445 used for scalar floating-point operations on 32 / 64 / 80-bit floating-point data using x87 instruction set extensions or MMX registers, for performing operations on 64-bit packed integer data and for holding operands for some operations performed between MMX and XMM registers.
[0256] One or more flag registers 2440 (e.g., EFLAGS, RFLAGS, etc.) store status and control information related to arithmetic operations, comparison operations, and system operations. For example, one or more flag registers 2440 may store condition code information such as carry, parity, auxiliary carry, zero, sign, and overflow. In some embodiments, one or more flag registers 2440 are called program status and control registers.
[0257] The segment register 2420 contains segment points used for accessing memory. In some embodiments, these registers are referred to as CS, DS, SS, ES, FS, and GS.
[0258] The machine-specific registers (MSRs) 2435 control and report on processor performance. Most MSRs 2435 handle system-related functions but are not accessible to application programs. The machine check registers 2460 consist of control, status, and error reporting MSRs used to detect and report hardware errors.
[0259] One or more instruction pointer registers 2430 store instruction pointer values. Control registers 2455 (e.g., CR0-CR4) determine the processor's operating mode (e.g., processors 2070, 2080, 2038, 2018, and / or 2100) and the characteristics of the currently executing task. Debug registers 2450 control and enable monitoring of the debugging operation of the processor or core.
[0260] The memory management register 2465 specifies the location of data structures used for protected mode memory management. These registers may include the GDTR, IDRT, task register, and LDTR register.
[0261] Alternative embodiments of the present invention may use wider or narrower registers. Furthermore, alternative embodiments of the present invention may use more, fewer, or different register files and registers.
[0262] Instruction set An instruction set architecture (ISA) may include one or more instruction formats. A given instruction format may, among other things, define various fields (e.g., number of bits, bit positions) that specify the operation to be performed (e.g., opcode) and the operand on which that operation should be performed, as well as / or other data fields (e.g., mask). Some instruction formats can be further broken down through the definition of instruction templates (or subformats). For example, an instruction template of a given instruction format may be defined to have a different subset of the fields of the instruction format (the included fields are usually in the same order, but have fewer included fields and therefore have at least some different bit positions), and / or to be defined so that the given fields are interpreted differently. Thus, each instruction in an ISA is expressed using a given instruction format (and, if defined, a given one of the instruction templates of that instruction format) and includes fields for specifying the operation and operands. For example, an exemplary ADD instruction has an instruction format that includes a specific opcode, an opcode field that specifies the opcode, and an operand field that selects operands (source 1 / destination and source 2). When this ADD instruction occurs in the instruction stream, the operand field that selects the specific operand has specific content.
[0263] Example instruction format The embodiments of the instructions described herein may be embodied in different formats. Furthermore, exemplary systems, architectures, and pipelines are detailed below. The embodiments of the instructions may be executed on, but are not limited to, such systems, architectures, and pipelines.
[0264] Figure 25 shows an embodiment of the instruction format. As shown, an instruction may include, but is not limited to, one or more prefixes 2501, an opcode 2503, addressing information 2505 (e.g., register identifier, memory addressing information), a displacement value 2507, and / or an immediate value 2509, and may include multiple components. Note that some instructions may utilize some or all of the fields of the format, while others may only use the fields of the opcode 2503. In some embodiments, the order shown is the order in which those fields should be encoded; however, in other embodiments, it should be understood that those fields may be encoded in a different order, in combination, etc.
[0265] The prefix field 2501 modifies instructions when used. In some examples, one or more prefixes are used to perform bus locking operations to provide section overrides (e.g., 0x2E, 0x36, 0x3E, 0x26, 0x64, 0x65, 0x2E, 0x3E, etc.) to iterate over string instructions (e.g., 0xF0, 0xF2, 0xF3, etc.), and / or to modify operands (e.g., 0x66) and address sizes (e.g., 0x67). Certain instructions require mandatory prefixes (e.g., 0x66, 0xF2, 0xF3, etc.). Certain of these prefixes may be considered “legacy” prefixes. Other prefixes, one or more of which are detailed herein, exhibit and / or provide further capabilities, such as specifying certain registers. Other prefixes typically follow legacy prefixes.
[0266] The opcode field 2503 is used to define, at least partially, the operations to be performed when decoding the instruction. In some embodiments, the primary opcode encoded in the opcode field 2503 is 1, 2, or 3 bytes long. In other embodiments, the primary opcode may be of a different length. An additional 3-bit opcode field may be encoded in another field, if applicable.
[0267] The addressing field 2505 is used to address one or more operands of an instruction, such as locations in memory or one or more registers. Figure 26 shows an embodiment of the addressing field 2505. In this explanatory diagram, the optional ModR / M byte 2 and the optional Scale, Index, Base (SIB) byte 2604 are shown. The ModR / M byte 2 and SIB byte 2604 are used to encode instructions with up to two operands, each of which is a direct register or valid memory address. Note that each of these fields is optional, and not all instructions will contain one or more of these fields. The MOD R / M byte 2 includes the MOD field 2642, the register field 2644, and the R / M field 2646.
[0268] The content of the MOD field 2642 distinguishes between memory access mode and non-memory access mode. In some embodiments, if the MOD field 2642 has the value of b11, register direct addressing mode is used; otherwise, register indirect addressing is used.
[0269] Register field 2644 may encode either a destination register operand or a source register operand, or an opcode extension, but cannot be used to encode any instruction operand. The contents of register index field 2644 specify the location of the source or destination operand (either in the register or in memory), either directly or via address generation. In some embodiments, register field 2644 is supplemented with additional bits from a prefix (e.g., prefix 2501) to enable larger addressing.
[0270] The R / M field 2646 may be used to encode an instruction operand that references a memory address, or it may be used to encode either a destination register operand or a source register operand. Note that in some embodiments, the R / M field 2646 may be used in combination with the MOD field 2642 to define the addressing mode.
[0271] SIB byte 2604 contains a scale field 2652, an index field 2654, and a base field 2656, which are used to generate addresses. The scale field 2652 indicates the scaling factor. The index field 2654 specifies the index register to use. In some embodiments, the index field 2654 is supplemented with extra bits from a prefix (e.g., prefix 2501) to enable larger addressing. The base field 2656 specifies the base register to use. In some embodiments, the base field 2656 is supplemented with extra bits from a prefix (e.g., prefix 2501) to enable larger addressing. In practice, the contents of the scale field 2652 allow scaling of the contents of the index field 2654 for memory address generation (e.g., 2 スケール (*Address generation using index + base)
[0272] Some addressing formats use displacement values to generate memory addresses. For example, a memory address can be 2 スケール*The displacement may be generated according to *index + base + displacement, *index * scale + displacement, r / m + displacement, instruction pointer (RIP / EIP) + displacement, register + displacement, etc. The displacement may be a value of 1 byte, 2 bytes, 4 bytes, etc. In some embodiments, the displacement field 2507 provides this value. Furthermore, in some embodiments, the use of a displacement coefficient is encoded in the MOD field of the addressing field 2505, which indicates a compressed displacement scheme in which the displacement value is calculated by multiplying disp8 in combination with a scaling coefficient N determined based on the vector length, the value of the b bit, and the size of the instruction's input elements. The displacement field 2507 stores the displacement value.
[0273] In some embodiments, the immediate value field 2509 specifies the immediate value of the instruction. The immediate value may be encoded as a 1-byte, 2-byte, 4-byte, or the like.
[0274] Figure 27 shows an embodiment of the first prefix 2501(A). In some embodiments, the first prefix 2501(A) is an embodiment of the REX prefix. Instructions using this prefix may specify general-purpose registers, 64-bit packed data registers (e.g., single-instruction multiplexed data (SIMD) registers, or vector registers), and / or control and debug registers (e.g., CR8-CR15 and DR8-DR15).
[0275] Instructions using the first prefix 2501(A) may specify up to three registers using 3-bit fields, depending on the following format: 1) using reg field 2644 and R / M field 2646 of Mod R / M byte 2602; 2) using Mod R / M byte 2 with SIB byte 2604, including using reg field 2644, base field 2656, and index field 2654; or 3) using the register fields of the opcode.
[0276] In the first prefix 2501(A), bit positions 7:4 are set to 0100. Bit position 3(W) may be used to determine the operand size, but not only the operand width. Thus, if W=0, the operand size is determined by the code segment descriptor (CS.D), and if W=1, the operand size is 64 bits.
[0277] MOD R / M reg field 2644 and MOD R / MR / M field 2646 can address only 8 registers individually, but with the addition of another bit, 16(2 4 Note that this allows the registers of ) to be addressed.
[0278] In the first prefix 2501(A), bit position 2(R) may be an extension of the MOD R / M reg field 2644, which may be used to modify the ModR / M reg field 2644 if that field encodes a general-purpose register, a 64-bit packed data register (e.g., an SSE register), or a control or debug register. R is ignored if Mod R / M byte 2 specifies another register or defines an extended opcode.
[0279] Bit position 1(X)X may modify the SIB byte index field 2654.
[0280] Bit position B(B)B may modify the base of the Mod R / MR / M field 2646 or the SIB byte base field 2656, or it may modify the opcode register field used to access a general-purpose register (e.g., general-purpose register 2425).
[0281] Figures 28(A) to 28(D) illustrate embodiments of how the R, X, and B fields of the first prefix 2501(A) are used. Figure 28(A) shows the R and B from the first prefix 2501(A) used to extend the reg field 2644 and R / M field 2646 of MOD R / M byte 2 when the SIB byte 2604 is not used for memory addressing. Figure 28(B) shows the R and B from the first prefix 2501(A) used to extend the reg field 2644 and R / M field 2646 of MOD R / M byte 2 when the SIB byte 2604 is not used (register-to-register addressing). Figure 28(C) shows R, X, and B from the first prefix 2501(A) used to extend the reg field 2644, index field 2654, and base field 2656 of MOD R / M byte 2 when SIB byte 2604 is used for memory addressing. Figure 28(D) shows B from the first prefix 2501(A) used to extend the reg field 2644 of MOD R / M byte 2 when the register is encoded in opcode 2503.
[0282] Figures 29(A) and 29(B) illustrate embodiments of the second prefix 2501(B). In some embodiments, the second prefix 2501(B) is an embodiment of the VEX prefix. The encoding of the second prefix 2501(B) allows instructions to have more than two operands and allows SIMD vector registers (e.g., vector / SIMD register 2410) to be longer than 64 bits (e.g., 128 bits and 256 bits). The use of the second prefix 2501(B) provides a three-operand (or more) syntax. For example, previous two-operand instructions performed operations such as A=A+B, which overwrite the source operand. The use of the second prefix 2501(B) allows operands to perform non-destructive operations such as A=B+C.
[0283] In some embodiments, the second prefix 2501(B) has two forms: a 2-byte form and a 3-byte form. The 2-byte second prefix 2501(B) is mainly used for 128-bit, scalar, and some 256-bit instructions, while the 3-byte second prefix 2501(B) provides a compact alternative to the first prefix 2501(A) and 3-byte opcode instructions.
[0284] Figure 29(A) shows an embodiment of the second prefix 2501(B) in 2-byte format. In one example, the format field 2901 (byte 0 2903) contains the value C5H. In another example, byte 1 2905 contains the value "R" in bit[7]. This value is the complement of the same value in the first prefix 2501(A). Bit[2] is used to specify the length (L) of the vector (a value of 0 is a scalar or a 128-bit vector, and a value of 1 is a 256-bit vector). Bit[1:0] provides opcodes that are extensional equivalents to several legacy prefixes (e.g., 00=no prefix, 01=66H, 10=F3H, and 11=F2H). Bit[6:3], shown as vvvv, can be used as follows: 1) Encodes the first source register operand, specified in inverted (one's complement) form and valid for instructions with two or more source operands. 2) Encodes the destination register operand, specified in one's complement form for a specific vector shift. Or, 3) Does not encode any operands, and the field is reserved and should contain a specific value such as 1111b.
[0285] Instructions using this prefix may use Mod R / MR / M field 2646 to encode an instruction operand that references a memory address, or they may encode either a destination register operand or a source register operand.
[0286] Instructions using this prefix may use Mod R / M reg field 2644 to encode either a destination register operand or a source register operand, or they may be treated as opcode extensions and may not be used to encode either instruction operand.
[0287] For the instruction syntax vvvv, which supports four operands, the Mod R / MR / M field 2646 and Mod R / M reg field 2644 encode three of the four operands. The bits [7:4] of the immediate value 2509 are then used to encode the third source register operand.
[0288] Figure 29(B) shows an embodiment of the second prefix 2501(B) in 3-byte format. In one example, the format field 2911 (byte 0 2913) contains the value C4H. Byte 1 2915 contains, in bits [7:5], the complements of the same value of the first prefix 2501(A): "R", "X", and "B". Bits [4:0] (shown as mmmmm) of Byte 1 2915 contain content that optionally encodes one or more suggested leading opcode bytes. For example, 00001 suggests the 0FH leading opcode, 00010 suggests the 0F38H leading opcode, 00011 suggests the leading 0F3AH opcode, and so on.
[0289] Bits [7] of byte 2 2917 are used similarly to the W of the first prefix 2501(A), including to help determine the size of the promoteable operand. Bit [2] is used to specify the length (L) of the vector (a value of 0 is a scalar or a 128-bit vector, and a value of 1 is a 256-bit vector). Bits [1:0] provide opcodes with extensional equivalents to several legacy prefixes (e.g., 00=no prefix, 01=66H, 10=F3H, and 11=F2H). Bits [6:3], indicated as vvvv, may be used as follows: 1) Encodes the first source register operand, specified in inverted (one's complement) form and valid for instructions with two or more source operands. 2) Encodes the destination register operand, specified in one's complement form for a particular vector shift. Alternatively, 3) Do not encode any operands, and the field should be reserved and contain a specific value such as 1111b.
[0290] Instructions using this prefix may use Mod R / MR / M field 2646 to encode an instruction operand that references a memory address, or they may encode either a destination register operand or a source register operand.
[0291] Instructions using this prefix may use Mod R / M reg field 2644 to encode either a destination register operand or a source register operand, or they may be treated as opcode extensions and may not be used to encode either instruction operand.
[0292] For the instruction syntax vvvv, which supports four operands, the Mod R / MR / M field 2646 and Mod R / M reg field 2644 encode three of the four operands. The bits [7:4] of the immediate value 2509 are then used to encode the third source register operand.
[0293] Figure 30 shows an embodiment of the third prefix 2501(C). In some embodiments, the third prefix 2501(C) is an embodiment of the EVEX prefix. The shown embodiment of the third prefix 2501(C) is a 4-byte prefix.
[0294] The third prefix 2501(C) can encode 32 vector registers (e.g., 128-bit, 256-bit, and 512-bit registers) in 64-bit mode. In some embodiments, instructions that utilize write masks / operational masks (see the register descriptions in previous figures such as Figure 24) or predications utilize this prefix. Operational mask registers enable conditional processing or selection control. Operational mask instructions whose source / destination operands are operational mask registers and which treat the contents of operational mask registers as a single value are encoded using the second prefix 2501(B).
[0295] The third prefix 2501(C) can encode features specific to an instruction class (for example, packed instructions with "load + op" semantics may support embedded broadcast functionality, floating-point instructions with rounding semantics may support static rounding functionality, and floating-point instructions with non-rounding arithmetic semantics may support "all exception suppression" functionality).
[0296] The first byte of the third prefix 2501(C) is the format field 3011, which in one example has a value of 62H. The subsequent bytes are referred to as payload bytes 3015-3019 and collectively form 24-bit values of P[23:0] that provide specific functionality in the form of one or more fields (as detailed herein).
[0297] In some embodiments, P[1:0] of payload byte 3019 is identical to the two lower mmmm bits. P[3:2] is reserved in some embodiments. Bit P[4](R') enables access to the upper 16 vector register set when combined with P[7] and Mod R / M reg field 2644. P[6] may also provide access to the upper 16 vector registers when SIB type addressing is not required. P[7:5] consists of R, X, and B, which are operand designation modification bits for vector registers, general-purpose registers, and memory addressing, and when combined with Mod R / M register field 2644 and Mod R / MR / M field 2646, enables access to the next set of eight registers beyond the lower eight registers. P[9:8] provides several legacy prefixes and extensional equivalent opcodes (e.g., 00=no prefix, 01=66H, 10=F3H, and 11=F2H). P
[10] is a fixed value of 1 in some embodiments. P[14:11], denoted as vvvv, may be used for: 1) encoding a first source register operand, specified in inverted (one's complement) form and valid for instructions with two or more source operands; 2) encoding a destination register operand, specified in one's complement form for a particular vector shift; or 3) not encoding any operand, with the field reserved and to contain a specific value such as 1111b.
[0298] P
[15] is similar to W in the first prefix 2501(A) and the second prefix 2511(B), and may function as an opcode extension bit or operand size promotion.
[0299] P[18:16] specifies the index of the register in the opmask (write mask) register (e.g., write mask / predicate register 2415). In one embodiment, a particular value aaa=000 has special behavior, suggesting that a non-opmask is used for a particular instruction (this can be implemented in various ways, including the use of a hardwired opmask for all 1s, or the use of hardware that bypasses masking hardware). When merging, the vector mask allows any set of elements in the destination to be protected from updates during the execution of any operation (specified by basic and extended operations), while in other embodiments, it preserves the old value of each element of the destination if the corresponding mask bit has a value of 0. In contrast, when zeroing, the vector mask allows any set of elements in the destination to be zeroed out during the execution of any operation (specified by basic and extended operations), and in one embodiment, if the corresponding mask bit has a value of 0, the elements of the destination are set to 0. A subset of this functionality is the ability to control the vector length of the operation being performed (i.e., the range of elements being modified from the first to the last element), however the elements being modified do not need to be contiguous. Thus, the opmask field enables partial vector operations, including load, store, arithmetic, and logic. Embodiments have been described in which the contents of the opmask field select one of many opmask registers containing the opmask to be used (and thus the contents of the opmask field indirectly identify the masking being performed); however, alternative embodiments allow the contents of the mask write field to directly specify the masking being performed, either instead or in addition to this.
[0300] P
[19] can be combined with P[14:11] to encode a second source vector register in a non-destructive source syntax that allows access to the upper 16 vector registers using P
[19] . P
[20] encodes several functions that vary across different instruction classes and may affect the meaning of the vector length / rounding control specification field (P[22:21]). P
[23] indicates support for merge / write masking (e.g., when set to 0) or support for zeroing and merge / write masking (e.g., when set to 1).
[0301] Exemplary embodiments of register encoding in instructions using the third prefix 2501(C) are detailed in the following table. [Table 7] 32 register support in 64-bit mode [Table 8] Encoding of register specifiers in 32-bit mode [Table 9] Encoding of the operational mask register specifier
[0302] Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices. For the purposes of this disclosure, the processing system includes, for example, any system having a processor such as a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.
[0303] The program code may be implemented in a high-level procedural or object-oriented programming language to communicate with the processing system. The program code may also be implemented in assembly language or machine language, if desired. In practice, the mechanisms described herein are not limited to any particular programming language. In any case, the language may be a compiled language or an interpreted language.
[0304] Embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of such implementation methods. Embodiments of the present invention may be implemented as a computer program or program code that runs on a programmable system comprising at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0305] One or more aspects of at least one embodiment may be implemented by representative instructions stored on a machine-readable medium that represent various logic within the processor, and when read by a machine, cause the machine to generate logic for performing the techniques described herein. Such representations, known as "IP cores," may be stored on a tangible machine-readable medium and supplied to various customers or manufacturing facilities for loading into manufacturing machines that actually create the logic or processor.
[0306] Such machine-readable storage media may include, but are not limited to, articles of non-temporary, tangible structure manufactured or formed by a machine or device, including storage media such as hard disks, floppy disks, optical disks, compact disk read-only memory (CD-ROM), rewritable compact disks (CD-RW), and other types of disks such as magneto-optical disks; random access memory (RAM) such as read-only memory (ROM), dynamic random access memory (DRAM), static random access memory (SRAM); semiconductor devices such as erasable programmable read-only memory (EPROM), flash memory, electrically erasable programmable read-only memory (EEPROM), and phase-change memory (PCM); magnetic or optical cards; or other types of media suitable for storing electronic instructions.
[0307] Accordingly, embodiments of the present invention also include non-temporary tangible machine-readable media containing instructions such as a hardware description language (HDL) that define structures, circuits, devices, processors, and / or system functions described herein, or design data. Such embodiments may also be referred to as program products. [Emulation (including binary conversion, code morphing, etc.)]
[0308] In some cases, instruction converters may be used to translate instructions from a source instruction set to a target instruction set. For example, an instruction converter can translate an instruction to one or more other instructions to be processed by the core (e.g., using static binary translation, dynamic binary translation including dynamic compilation), morph, emulate, or otherwise translate it. Instruction converters may be implemented in software, hardware, firmware, or a combination thereof. Instruction converters may be on-processor, off-processor, or partially on-processor and partially off-processor.
[0309] Figure 31 shows a block diagram illustrating the use of a software instruction converter to translate binary instructions in a source instruction set to binary instructions in a target instruction set, according to this embodiment. In the shown embodiment, the instruction converter is a software instruction converter, but alternatively, the instruction converter may be implemented in software, firmware, hardware, or various combinations thereof. Figure 31 shows that a program in a high-level language 3102 can be compiled using a first ISA compiler 3104 to produce a first ISA binary code 3106 that can be executed natively by a processor 3116 having at least one first instruction set core. A processor 3116 having at least one first ISA instruction set core represents any processor capable of performing substantially the same functions as an Intel processor having at least one first ISA instruction set core by (1) a substantial portion of the instruction set of the first ISA instruction set core, or (2) a compatible execution or alternative processing of a version of the object code of an application or other software targeted to run on an Intel® processor having at least one first ISA instruction set core, in order to achieve substantially the same results as a processor having at least one first ISA instruction set core. A first ISA compiler 3104 represents a compiler capable of generating first ISA binary code 3106 (e.g., object code) that can be executed on a processor 3116 having at least one first ISA instruction set core, with or without additional linkage processing. Similarly, Figure 31 shows that a program in the high-level language 3102 can be compiled using an alternative instruction set compiler 3108 to generate alternative instruction set binary code 3110 that can be natively executed by the first ISA instruction set core-less processor 3114. An instruction converter 3112 is used to convert the first ISA binary code 3106 into code that can be natively executed by the first ISA instruction set core-less processor 3114.This converted code is unlikely to be identical to the alternative instruction set binary code 3110 because it would be difficult to create an instruction converter that would make this possible; however, the converted code performs common operations and is composed of instructions from the alternative instruction set. Thus, instruction converter 3112 represents software, firmware, hardware, or a combination thereof that enables a processor or other electronic device that does not have the first ISA instruction set processor or core to execute the first ISA binary code 3106 through emulation, simulation, or any other process.
[0310] Examples include, but are not limited to, the following. 1. A decoder circuit that decodes an instance of a single instruction having a field for an opcode indicating that the execution circuit is for storing the wrapped output data structure, which contains the encrypted secret information and the target instructions, by encrypting at least encrypted secret information from an input data structure using either a physically non-replicable function (PUF) generation encryption key or a virtual PUF key, binding the wrapped secret information to an identified target, updating the input data structure, generating a MAC for the updated data structure, storing the MAC in the input data structure to generate a wrapped output data structure, and storing the wrapped output data structure which contains the encrypted secret information and the target instructions. An execution circuit that executes a decoded instance of a single instruction according to the opcode, A device equipped with the following features. 2. The device described in Example 1 has an input data structure that includes a target identifier. 3. A single instruction instance is intended to contain an identifier for a destination operand for storing the operational status of the instruction's execution, as described in Example 1 or 2. 4. A single instruction instance is intended to contain an identifier for a source operand, which is for storing or encoding the location of an input data structure, as described in any one of Examples 1 to 3. 5. A device as described in any one of Examples 1-4, in which an instance of a single instruction contains an identifier for a destination operand, which is for storing or encoding the location of the destination of a wrapped output data structure. 6. The device described in Example 5, where the operand is a register. 7. The apparatus described in any one of Examples 1 to 6, wherein the input data structure is intended to include a sequence identifier used for decoding. 8. The input data structure is to include a field for identifying the challenge used by the PUF to generate the key, as described in any one of Examples 1-7. 9. The apparatus described in any one of Examples 1 to 8, wherein the operating status is intended to indicate one of success, failure, or entropy error. 10. The device described in any one of Examples 1 to 9, wherein the execution circuit is for clearing the 0 flag (ZF) when the secret information is successfully decrypted, and the execution circuit is for setting the ZF to 1 otherwise. 11. The instruction is associated with the highest priority level of protection, as described in any of Examples 1-10. 12. The execution circuit encrypts at least encrypted secret information from an input data structure using either a physically non-replicable function (PUF) generation encryption key or a virtual PUF key, combines the wrapped secret information with an identified target, updates the input data structure, generates a MAC for the updated data structure, stores the MAC in the input data structure to generate a wrapped output data structure, and decodes an instance of a single instruction having a field for an opcode indicating that it is for storing the wrapped output data structure containing the encrypted secret information and the target instructions. Executing instructions decoded according to the opcode, Methods that include... 13. The input data structure is intended to include the target identifier, as described in Example 12. 14. An instance of a single instruction is intended to contain an identifier for a destination operand for storing the operational status of the instruction's execution, as described in Example 12 or 13. 15. The method described in any one of Examples 12-14, wherein an instance of a single instruction is intended to include an identifier for a source operand, which is intended to store or encode the location of an input data structure. 16. The method described in any one of Examples 12-15, wherein an instance of a single instruction is intended to contain an identifier for a destination operand, which is intended to store or encode the location of the destination of the wrapped output data structure. 17. The input data structure is to include a field for identifying the challenge used by PUF to generate the key, as described in any one of Examples 12-16. 18. The operation status is to indicate one of success, failure, or entropy error, as described in any one of Examples 12-17. 19. The method described in any one of Examples 12-18, wherein the execution circuit is for clearing the 0 flag (ZF) when encryption of the secret information is successful, and the execution circuit is for setting ZF to 1 otherwise. 20. The order is associated with the highest priority level of protection, as described in any of Examples 12–19. 21. When processed by one or more processors, one or more processors The execution circuit encrypts at least encrypted secrets from an input data structure using either a physically non-replicable function (PUF) generation encryption key or a virtual PUF key, combines the wrapped secrets with an identified target, updates the input data structure, generates a MAC for the updated data structure, stores the MAC in the input data structure to generate a wrapped output data structure, and decodes a single instruction having a field for an opcode indicating that it is for storing the wrapped output data structure containing the encrypted secrets and the target's instructions. A machine-readable medium that stores a single instruction instance, which executes an instruction decoded according to an opcode.
[0311] References such as "one embodiment," "an embodiment," and "exemplary embodiment" indicate that the described embodiment may include certain features, structures, or characteristics, but not all embodiments necessarily include those specific features, structures, or characteristics. Furthermore, such phrases do not necessarily refer to the same embodiment. Moreover, if certain features, structures, or characteristics are described in relation to one embodiment, it is considered within the knowledge of those skilled in the art that such features, structures, or characteristics will be affected in relation to other embodiments, whether or not they are explicitly stated.
[0312] Furthermore, in the various embodiments described above, unless otherwise specifically stated, disjunctive phrases such as "at least one of A, B, or C" are intended to be understood to mean any one of A, B, or C, or any combination thereof (e.g., A, B, and / or C). Accordingly, disjunctive phrases are not intended, nor should they be understood, to mean that each given embodiment requires at least one of A, at least one of B, or at least one of C to exist.
[0313] Therefore, the specification and drawings should be considered illustrative rather than restrictive. However, it will be clear that various modifications and changes may be made to them without departing from the broader intent and scope of the disclosure as described in the claims. Other possible items (Item 1) A decoder circuit that includes an execution circuit that encrypts at least encrypted secret information from an input data structure using either a physically non-replicable function (PUF) generation encryption key or a virtual PUF key, combines the wrapped secret information with an identified target, updates the input data structure, generates a MAC for the updated data structure, stores the MAC in the input data structure to generate a wrapped output data structure, and decodes an instance of a single instruction having a field for an opcode indicating that it is for storing the wrapped output data structure having the encrypted secret information and the target's instructions, An execution circuit that executes the decoded instance of the single instruction according to the opcode, A device equipped with the following features. (Item 2) The device described in item 1, wherein the input data structure is for including a target identifier. (Item 3) The apparatus according to item 1, wherein the instance of the single instruction is for including an identifier for a destination operand for storing the operational status of the execution of the instruction. (Item 4) The apparatus according to item 1, wherein the instance of the single instruction is for including an identifier for a source operand which is for storing or encoding the location of the input data structure. (Item 5) The apparatus according to item 1, wherein the instance of the single instruction is for including an identifier for a destination operand which is for storing or encoding the location of the destination of the wrapped output data structure. (Item 6) The aforementioned operand is a register, as described in item 5. (Item 7) The apparatus according to item 1, wherein the input data structure is for containing a sequence identifier used for decoding. (Item 8) The apparatus according to item 1, wherein the input data structure includes a field for identifying the challenge used by the PUF to generate the key. (Item 9) The apparatus as described in item 1, wherein the aforementioned operating status is intended to indicate one of success, failure, or entropy error. (Item 10) The device as described in item 1, wherein the execution circuit is for clearing the 0 flag (ZF) when the decryption of the secret information is successful, and the execution circuit is for setting the ZF to 1 otherwise. (Item 11) The aforementioned instruction relates to the device described in item 1, which is associated with the highest priority level of protection. (Item 12) The execution circuit encrypts at least encrypted secret information from an input data structure using either a physically non-replicable function (PUF) generation encryption key or a virtual PUF key, combines the wrapped secret information with an identified target, updates the input data structure, generates a MAC for the updated data structure, stores the MAC in the input data structure to generate a wrapped output data structure, and decodes an instance of a single instruction having a field for an opcode indicating that it is for storing the wrapped output data structure having the encrypted secret information and the target's instructions. Executing the decoded instruction according to the aforementioned opcode, Methods that include... (Item 13) The method according to item 12, wherein the input data structure is for including a target identifier. (Item 14) The method according to item 12, wherein the instance of the single instruction is for including an identifier for a destination operand to store the operational status of the execution of the instruction. (Item 15) The method according to item 12, wherein the instance of the single instruction is for including an identifier for a source operand which is for storing or encoding the location of the input data structure. (Item 16) The method according to item 12, wherein the instance of the single instruction is for including an identifier for a destination operand which is for storing or encoding the location of the destination of the wrapped output data structure. (Item 17) The method according to item 12, wherein the input data structure includes a field for identifying the challenge used by the PUF to generate the key. (Item 18) The method described in item 12, wherein the operation status is intended to indicate one of success, failure, or entropy error. (Item 19) The method according to item 12, wherein the execution circuit is for clearing the 0 flag (ZF) when the encryption of the secret information is successful, and the execution circuit is for setting the ZF to 1 otherwise. (Item 20) The aforementioned instruction is the method described in item 12, associated with the highest priority level of protection. (Item 21) When processed by one or more processors, the one or more processors The execution circuit encrypts at least encrypted secret information from an input data structure using either a physically non-replicable function (PUF) generation encryption key or a virtual PUF key, combines the wrapped secret information with an identified target, updates the input data structure, generates a MAC for the updated data structure, stores the MAC in the input data structure to generate a wrapped output data structure, and decodes the single instruction having a field for an opcode indicating that it is for storing the wrapped output data structure having the encrypted secret information and the target's instructions. A machine-readable medium for storing an instance of a single instruction that causes the decoded instruction to be executed according to the opcode.
Claims
1. The execution means includes a decoder means that encrypts at least encrypted secret information from an input data structure using either a physically non-replicable function (PUF) generation encryption key or a virtual PUF key, combines the wrapped secret information with an identified target, updates the input data structure, generates a MAC for the updated data structure, stores the MAC in the input data structure to generate a wrapped output data structure, and decodes an instance of a single instruction having a field for an opcode indicating that it is for storing the wrapped output data structure having the encrypted secret information and the target's instructions, An execution means that executes the decoded instance of the single instruction in accordance with the opcode, Equipped with, The input data structure is for the device to include a field for identifying the challenge used by the PUF to generate the key.
2. A decoder means for executing a single instruction having a field for an opcode indicating that it is for storing the wrapped output data structure having the encrypted secret information and the target indication, using either a physically non-replicable function (PUF) generation encryption key or a virtual PUF key, encrypting at least encrypted secret information from an input data structure, combining the wrapped secret information with an identified target, updating the input data structure, generating a MAC for the updated data structure, storing the MAC in the input data structure to generate a wrapped output data structure, and storing the wrapped output data structure having the encrypted secret information and the target indication, An execution means that executes the decoded instance of the single instruction in accordance with the opcode, Equipped with, The execution means is for clearing a 0 flag (ZF) when the encryption of the secret information is successful, and the execution means is for setting the ZF to 1 otherwise.
3. The apparatus according to claim 1 or 2, wherein the input data structure is for including a target identifier.
4. The apparatus according to claim 1 or 2, wherein the instance of the single instruction includes an identifier for a destination operand for storing the operational status of the execution of the single instruction.
5. The apparatus according to claim 1 or 2, wherein the instance of the single instruction is for including an identifier for a source operand which is for storing or encoding the location of the input data structure.
6. The apparatus according to claim 1 or 2, wherein the instance of the single instruction is for including an identifier for a destination operand which is for storing or encoding the location of the destination of the wrapped output data structure.
7. The apparatus according to claim 6, wherein the destination operand is a register.
8. The apparatus according to claim 1 or 2, wherein the input data structure is for including an initialization vector used in encryption.
9. The apparatus according to claim 1 or 2, wherein the operational status of the execution of the single instruction is for indicating one of success, failure, or entropy error.
10. The apparatus according to claim 1 or 2, wherein the single instruction is associated with the highest priority protection level.
11. The execution circuit encrypts at least encrypted secret information from an input data structure using either a physically non-replicable function (PUF) generation encryption key or a virtual PUF key, combines the wrapped secret information with an identified target, updates the input data structure, generates a MAC for the updated data structure, stores the MAC in the input data structure to generate a wrapped output data structure, and decodes an instance of a single instruction having a field for an opcode indicating that it is for storing the wrapped output data structure having the encrypted secret information and the target's instructions. Executing the decoded instruction according to the opcode, Includes, The input data structure is to include a field for identifying the challenge used by the PUF to generate the key, in a method.
12. An execution circuit encrypts at least encrypted secret information from an input data structure using either a physically non-replicable function (PUF) generation encryption key or a virtual PUF key, combines the wrapped secret information with an identified target, updates the input data structure, generates a MAC for the updated data structure, stores the MAC in the input data structure to generate a wrapped output data structure, and decodes an instance of a single instruction having a field for an opcode indicating that it is for storing the wrapped output data structure having the encrypted secret information and the target instructions, Executing the decoded instruction according to the opcode, Includes, The execution circuit is for clearing the 0 flag (ZF) when the encryption of the secret information is successful, and the execution circuit is for setting the ZF to 1 otherwise.
13. The method according to claim 11 or 12, wherein the input data structure is for including a target identifier.
14. The method according to claim 11 or 12, wherein the instance of the single instruction includes an identifier for a destination operand for storing the operational status of the execution of the single instruction.
15. The method according to claim 11 or 12, wherein the instance of the single instruction is for including an identifier for a source operand which is for storing or encoding the location of the input data structure.
16. The method according to claim 11 or 12, wherein the instance of the single instruction is for including an identifier for a destination operand which is for storing or encoding the location of the destination of the wrapped output data structure.
17. The method according to claim 11 or 12, wherein the operational status of the execution of the single instruction is for indicating one of success, failure, or entropy error.
18. The method according to claim 11 or 12, wherein the single instruction is associated with the highest priority protection level.
19. In the processor, A procedure for an execution circuit to encrypt at least encrypted secret information from an input data structure using either a physically non-replicable function (PUF) generation encryption key or a virtual PUF key, combine the wrapped secret information with an identified target, update the input data structure, generate a MAC for the updated data structure, store the MAC in the input data structure to generate a wrapped output data structure, and decode a single instruction having a field for an opcode indicating that it is for storing the wrapped output data structure having the encrypted secret information and the target's instructions, A procedure for executing the decoded instruction according to the aforementioned opcode. A computer program for executing, The input data structure is a computer program that includes a field for identifying the challenge used by the PUF to generate the key.
20. A machine-readable storage medium storing the computer program described in claim 19.
21. The processor includes: A procedure for an execution circuit to encrypt at least encrypted secret information from an input data structure using either a physically non-replicable function (PUF) generation encryption key or a virtual PUF key, combine the wrapped secret information with an identified target, update the input data structure, generate a MAC for the updated data structure, store the MAC in the input data structure to generate a wrapped output data structure, and decode a single instruction having a field for an opcode indicating that it is for storing the wrapped output data structure having the encrypted secret information and the target's instructions, A procedure for executing the decoded instruction according to the aforementioned opcode. A computer program for executing, A computer program wherein the execution circuit clears a 0 flag (ZF) when the encryption of the secret information is successful, and sets the ZF to 1 otherwise.
22. A machine-readable storage medium storing the computer program described in Claim 21.
Citation Information
Patent Citations
Method for on-board generation of cryptographic keys using a physically unclonable function
JP2021521748A
Hardware enforced one-way cryptography
US20170093567A1
System and techniques for encrypting chip-to-chip communication links
US20190103961A1
