summary refs log tree commit diff stats
path: root/hw/i386/sgx-stub.c
diff options
context:
space:
mode:
authorYang Zhong <yang.zhong@intel.com>2021-09-10 18:22:57 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2021-09-30 15:30:24 +0200
commit0205c4fa1ea35d569b4c2f63adacef438c1e8f53 (patch)
tree2876a4723cc5e9bb38e38c8487f46f2f71ae3af7 /hw/i386/sgx-stub.c
parent57d874c4c7a0acbaa076a166e3da093b6edbdb0f (diff)
downloadfocaccia-qemu-0205c4fa1ea35d569b4c2f63adacef438c1e8f53.tar.gz
focaccia-qemu-0205c4fa1ea35d569b4c2f63adacef438c1e8f53.zip
target/i386: Add the query-sgx-capabilities QMP command
Libvirt can use query-sgx-capabilities to get the host
sgx capabilities to decide how to allocate SGX EPC size to VM.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20210910102258.46648-3-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386/sgx-stub.c')
-rw-r--r--hw/i386/sgx-stub.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/i386/sgx-stub.c b/hw/i386/sgx-stub.c
index 485e16ecc1..3be9f5ca32 100644
--- a/hw/i386/sgx-stub.c
+++ b/hw/i386/sgx-stub.c
@@ -9,6 +9,12 @@ SGXInfo *sgx_get_info(Error **errp)
     return NULL;
 }
 
+SGXInfo *sgx_get_capabilities(Error **errp)
+{
+    error_setg(errp, "SGX support is not compiled in");
+    return NULL;
+}
+
 void pc_machine_init_sgx_epc(PCMachineState *pcms)
 {
     memset(&pcms->sgx_epc, 0, sizeof(SGXEPCState));