linux/arch/x86/kvm
Sean Christopherson 8f102445d4 KVM: VMX: Add emulation of SGX Launch Control LE hash MSRs
Emulate the four Launch Enclave public key hash MSRs (LE hash MSRs) that
exist on CPUs that support SGX Launch Control (LC).  SGX LC modifies the
behavior of ENCLS[EINIT] to use the LE hash MSRs when verifying the key
used to sign an enclave.  On CPUs without LC support, the LE hash is
hardwired into the CPU to an Intel controlled key (the Intel key is also
the reset value of the LE hash MSRs). Track the guest's desired hash so
that a future patch can stuff the hash into the hardware MSRs when
executing EINIT on behalf of the guest, when those MSRs are writable in
host.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Co-developed-by: Kai Huang <kai.huang@intel.com>
Signed-off-by: Kai Huang <kai.huang@intel.com>
Message-Id: <c58ef601ddf88f3a113add837969533099b1364a.1618196135.git.kai.huang@intel.com>
[Add a comment regarding the MSRs being available until SGX is locked.
 - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-04-20 04:18:55 -04:00
..
mmu KVM: x86/mmu: Tear down roots before kvm_mmu_zap_all_fast returns 2021-04-19 18:04:45 -04:00
svm KVM: SVM: Enhance and clean up the vmcb tracking comment in pre_svm_run() 2021-04-20 04:18:50 -04:00
vmx KVM: VMX: Add emulation of SGX Launch Control LE hash MSRs 2021-04-20 04:18:55 -04:00
cpuid.c KVM: x86: Add support for reverse CPUID lookup of scattered features 2021-04-20 04:18:54 -04:00
cpuid.h KVM: x86: Add reverse-CPUID lookup support for scattered SGX features 2021-04-20 04:18:54 -04:00
debugfs.c KVM: let kvm_destroy_vm_debugfs clean up vCPU debugfs directories 2020-06-04 11:00:54 -04:00
emulate.c KVM: x86: Restore all 64 bits of DR6 and DR7 during RSM on x86-64 2021-02-09 08:17:05 -05:00
hyperv.c KVM: x86: hyper-v: Fix Hyper-V context null-ptr-deref 2021-02-26 03:16:50 -05:00
hyperv.h KVM: x86: hyper-v: Drop hv_vcpu_to_vcpu() helper 2021-02-09 08:42:09 -05:00
i8254.c kvm: i8254: remove redundant assignment to pointer s 2020-06-11 12:35:18 -04:00
i8254.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
i8259.c KVM: x86: Refactor picdev_write() to prevent Spectre-v1/L1TF attacks 2020-01-27 19:59:37 +01:00
ioapic.c KVM: ioapic: break infinite recursion on lazy EOI 2020-10-24 04:42:06 -04:00
ioapic.h kvm/x86: Remove redundant function implementations 2020-05-27 13:11:10 -04:00
irq_comm.c x86/kvm: Use msi_msg shadow structs 2020-10-28 20:26:26 +01:00
irq.c KVM: x86/xen: Add event channel interrupt vector upcall 2021-02-04 14:19:39 +00:00
irq.h kvm/x86: Remove redundant function implementations 2020-05-27 13:11:10 -04:00
Kconfig x86/sgx: Introduce virtual EPC for use by KVM guests 2021-04-06 09:43:17 +02:00
kvm_cache_regs.h KVM: x86: use static calls to reduce kvm_x86_ops overhead 2021-02-04 05:27:30 -05:00
kvm_emulate.h KVM: x86: reading DR cannot fail 2021-02-09 08:17:07 -05:00
lapic.c KVM: x86: Handle triple fault in L2 without killing L1 2021-03-15 04:43:15 -04:00
lapic.h KVM: x86: hyper-v: Always use to_hv_vcpu() accessor to get to 'struct kvm_vcpu_hv' 2021-02-09 08:17:13 -05:00
Makefile KVM: VMX: Frame in ENCLS handler for SGX virtualization 2021-04-20 04:18:55 -04:00
mmu.h KVM: x86: Get active PCID only when writing a CR3 value 2021-03-15 04:43:56 -04:00
mtrr.c KVM: x86: Add helper to consolidate "raw" reserved GPA mask calculations 2021-02-04 09:27:30 -05:00
pmu.c KVM: x86: use static calls to reduce kvm_x86_ops overhead 2021-02-04 05:27:30 -05:00
pmu.h KVM: vmx/pmu: Release guest LBR event via lazy release mechanism 2021-02-04 05:27:26 -05:00
trace.h KVM: x86/xen: intercept xen hypercalls if enabled 2021-02-04 14:18:45 +00:00
tss.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
x86.c KVM: x86: Export kvm_mmu_gva_to_gpa_{read,write}() for SGX (VMX) 2021-04-20 04:18:53 -04:00
x86.h KVM: x86: Handle triple fault in L2 without killing L1 2021-03-15 04:43:15 -04:00
xen.c KVM: x86/xen: Add support for vCPU runstate information 2021-03-02 14:30:54 -05:00
xen.h KVM: x86/xen: Add support for vCPU runstate information 2021-03-02 14:30:54 -05:00