@@ -514,6 +514,7 @@ L: kvm@vger.kernel.org
S: Supported
F: docs/system/i386/amd-memory-encryption.rst
F: docs/system/i386/sgx.rst
+F: hw/i386/sgx*
F: stubs/qmp-i386-sev.c
F: stubs/qmp-i386-sgx.c
F: target/i386/kvm/
new file mode 100644
@@ -0,0 +1,16 @@
+/*
+ * Human Monitor 'info sgx' stub (CONFIG_SGX)
+ *
+ * Copyright (c) Linaro
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "monitor/hmp.h"
+#include "monitor/monitor.h"
+
+void hmp_info_sgx(Monitor *mon, const QDict *qdict)
+{
+ monitor_printf(mon, "SGX is not available in this QEMU\n");
+}
@@ -23,11 +23,6 @@ SgxInfo *qmp_query_sgx_capabilities(Error **errp)
return NULL;
}
-void hmp_info_sgx(Monitor *mon, const QDict *qdict)
-{
- monitor_printf(mon, "SGX is not available in this QEMU\n");
-}
-
void pc_machine_init_sgx_epc(PCMachineState *pcms)
{
memset(&pcms->sgx_epc, 0, sizeof(SGXEPCState));
@@ -859,15 +859,14 @@ SRST
Display the vcpu dirty page limit information.
ERST
-#if defined(TARGET_I386)
{
.name = "sgx",
.args_type = "",
.params = "",
.help = "show intel SGX information",
.cmd = hmp_info_sgx,
+ .arch_bitmask = QEMU_ARCH_I386,
},
-#endif
SRST
``info sgx``
@@ -24,6 +24,7 @@ i386_ss.add(when: 'CONFIG_VTD', if_true: files('intel_iommu.c'))
i386_ss.add(when: 'CONFIG_VTD_ACCEL', if_true: files('intel_iommu_accel.c'))
i386_ss.add(when: 'CONFIG_SGX', if_true: files('sgx-epc.c','sgx.c'),
if_false: files('sgx-stub.c'))
+stub_ss.add(files('sgx-hmp-stub.c'))
i386_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-common.c'))
i386_ss.add(when: 'CONFIG_PC', if_true: files(