qemu-patch-raspberry4/hw/i386
Yang Zhong 2c3132279b sgx: Reset the vEPC regions during VM reboot
For bare-metal SGX on real hardware, the hardware provides guarantees
SGX state at reboot.  For instance, all pages start out uninitialized.
The vepc driver provides a similar guarantee today for freshly-opened
vepc instances, but guests such as Windows expect all pages to be in
uninitialized state on startup, including after every guest reboot.

Qemu can invoke the ioctl to bring its vEPC pages back to uninitialized
state. There is a possibility that some pages fail to be removed if they
are SECS pages, and the child and SECS pages could be in separate vEPC
regions.  Therefore, the ioctl returns the number of EREMOVE failures,
telling Qemu to try the ioctl again after it's done with all vEPC regions.

The related kernel patches:
Link: https://lkml.kernel.org/r/20211021201155.1523989-3-pbonzini@redhat.com

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20211101162009.62161-6-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-11-10 22:57:40 +01:00
..
kvm i386/kvm: Replace abs64() with uabs64() from host-utils 2021-09-29 19:37:38 +10:00
xen memory: make global_dirty_tracking a bitmask 2021-11-01 22:56:43 +01:00
acpi-build.c pci: Export pci_for_each_device_under_bus*() 2021-11-01 19:36:11 -04:00
acpi-build.h hw/acpi/ich9: Enable ACPI PCI hot-plug 2021-07-16 04:33:35 -04:00
acpi-common.c acpi: x86: madt: use build_append_int_noprefix() API to compose MADT table 2021-10-05 17:30:57 -04:00
acpi-common.h misc: Correct relative include path 2021-06-05 21:10:42 +02:00
acpi-microvm.c acpi: build_dsdt_microvm: use acpi_table_begin()/acpi_table_end() instead of build_header() 2021-10-05 17:30:57 -04:00
acpi-microvm.h microvm/acpi: add minimal acpi support 2020-09-17 14:16:19 +02:00
amd_iommu.c hw/i386/pc: Remove x86_iommu_get_type() 2021-11-01 18:49:10 -04:00
amd_iommu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
e820_memory_layout.c hw/i386/pc: Extract e820 memory layout code 2019-09-16 17:13:07 +02:00
e820_memory_layout.h hw/i386/pc: Extract e820 memory layout code 2019-09-16 17:13:07 +02:00
fw_cfg.c hw/i386/fw_cfg: Set SGX bits in feature control fw_cfg accordingly 2021-09-30 15:30:24 +02:00
fw_cfg.h acpi: factor out fw_cfg_add_acpi_dsdt() 2020-06-24 17:18:28 -04:00
generic_event_device_x86.c acpi: ged: add x86 device variant. 2020-09-17 14:16:19 +02:00
intel_iommu.c * Build system fixes and cleanups 2021-11-03 13:07:30 -04:00
intel_iommu_internal.h intel_iommu: Use correct shift for 256 bits qi descriptor 2020-07-22 07:57:07 -04:00
Kconfig hw/i386/pc: Allow instantiating a virtio-iommu device 2021-11-01 18:49:10 -04:00
kvmvapic.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
meson.build microvm: add device tree support. 2021-11-02 17:24:17 +01:00
microvm-dt.c microvm: add device tree support. 2021-11-02 17:24:17 +01:00
microvm-dt.h microvm: add device tree support. 2021-11-02 17:24:17 +01:00
microvm.c * Build system fixes and cleanups 2021-11-03 13:07:30 -04:00
multiboot.c target/i386: use DMA-enabled multiboot ROM for new-enough QEMU machine types 2021-11-02 15:57:27 +01:00
multiboot.h target/i386: use DMA-enabled multiboot ROM for new-enough QEMU machine types 2021-11-02 15:57:27 +01:00
pc.c * Build system fixes and cleanups 2021-11-03 13:07:30 -04:00
pc_piix.c target/i386: move linuxboot_dma_enabled to X86MachineState 2021-11-02 15:57:27 +01:00
pc_q35.c target/i386: move linuxboot_dma_enabled to X86MachineState 2021-11-02 15:57:27 +01:00
pc_sysfw.c target/i386/sev: Declare system-specific functions in 'sev.h' 2021-10-13 10:47:49 +02:00
pc_sysfw_ovmf-stubs.c hw/i386: Introduce X86_FW_OVMF Kconfig symbol 2021-07-14 22:28:58 +02:00
pc_sysfw_ovmf.c hw/i386: Introduce X86_FW_OVMF Kconfig symbol 2021-07-14 22:28:58 +02:00
port92.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
sgx-epc.c target/i386: sgx: mark device not user creatable 2021-11-09 18:51:53 +01:00
sgx-stub.c hw/i386/sgx: Move qmp_query_sgx() and hmp_info_sgx() to hw/i386/sgx.c 2021-10-13 10:47:50 +02:00
sgx.c sgx: Reset the vEPC regions during VM reboot 2021-11-10 22:57:40 +01:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vmmouse.c hw/i386: fix vmmouse registration 2021-11-02 15:57:27 +01:00
vmport.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
x86-iommu-stub.c hw/i386/pc: Remove x86_iommu_get_type() 2021-11-01 18:49:10 -04:00
x86-iommu.c hw/i386/pc: Move IOMMU singleton into PCMachineState 2021-11-01 18:49:10 -04:00
x86.c target/i386: use DMA-enabled multiboot ROM for new-enough QEMU machine types 2021-11-02 15:57:27 +01:00