1dec2e1f19
Expose SGX to the guest if and only if KVM is enabled and supports virtualization of SGX. While the majority of ENCLS can be emulated to some degree, because SGX uses a hardware-based root of trust, the attestation aspects of SGX cannot be emulated in software, i.e. ultimately emulation will fail as software cannot generate a valid quote/report. The complexity of partially emulating SGX in Qemu far outweighs the value added, e.g. an SGX specific simulator for userspace applications can emulate SGX for development and testing purposes. Note, access to the PROVISIONKEY is not yet advertised to the guest as KVM blocks access to the PROVISIONKEY by default and requires userspace to provide additional credentials (via ioctl()) to expose PROVISIONKEY. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Yang Zhong <yang.zhong@intel.com> Message-Id: <20210719112136.57018-13-yang.zhong@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
38 lines
1.4 KiB
Meson
38 lines
1.4 KiB
Meson
i386_ss = ss.source_set()
|
|
i386_ss.add(files(
|
|
'fw_cfg.c',
|
|
'kvmvapic.c',
|
|
'e820_memory_layout.c',
|
|
'multiboot.c',
|
|
'x86.c',
|
|
))
|
|
|
|
i386_ss.add(when: 'CONFIG_X86_IOMMU', if_true: files('x86-iommu.c'),
|
|
if_false: files('x86-iommu-stub.c'))
|
|
i386_ss.add(when: 'CONFIG_AMD_IOMMU', if_true: files('amd_iommu.c'))
|
|
i386_ss.add(when: 'CONFIG_I440FX', if_true: files('pc_piix.c'))
|
|
i386_ss.add(when: 'CONFIG_MICROVM', if_true: files('microvm.c', 'acpi-microvm.c'))
|
|
i386_ss.add(when: 'CONFIG_Q35', if_true: files('pc_q35.c'))
|
|
i386_ss.add(when: 'CONFIG_VMMOUSE', if_true: files('vmmouse.c'))
|
|
i386_ss.add(when: 'CONFIG_VMPORT', if_true: files('vmport.c'))
|
|
i386_ss.add(when: 'CONFIG_VTD', if_true: files('intel_iommu.c'))
|
|
i386_ss.add(when: 'CONFIG_SGX', if_true: files('sgx-epc.c','sgx.c'),
|
|
if_false: files('sgx-stub.c'))
|
|
|
|
i386_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-common.c'))
|
|
i386_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('generic_event_device_x86.c'))
|
|
i386_ss.add(when: 'CONFIG_PC', if_true: files(
|
|
'pc.c',
|
|
'pc_sysfw.c',
|
|
'acpi-build.c',
|
|
'port92.c'))
|
|
i386_ss.add(when: 'CONFIG_X86_FW_OVMF', if_true: files('pc_sysfw_ovmf.c'),
|
|
if_false: files('pc_sysfw_ovmf-stubs.c'))
|
|
|
|
subdir('kvm')
|
|
subdir('xen')
|
|
|
|
i386_ss.add_all(xenpv_ss)
|
|
|
|
hw_arch += {'i386': i386_ss}
|