aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/sgx-stub.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2021-10-07 19:56:12 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-10-13 10:47:50 +0200
commit6e81733e27a250af7507c3dd5ae945c473ab0d6b (patch)
tree905b06bd8e4b3f4c17556644a4de902ea537b7bc /hw/i386/sgx-stub.c
parent021658566b71e138db46434849f0556bab3fc30b (diff)
downloadqemu-6e81733e27a250af7507c3dd5ae945c473ab0d6b.zip
qemu-6e81733e27a250af7507c3dd5ae945c473ab0d6b.tar.gz
qemu-6e81733e27a250af7507c3dd5ae945c473ab0d6b.tar.bz2
hw/i386/sgx: Move qmp_query_sgx() and hmp_info_sgx() to hw/i386/sgx.c
Move qmp_query_sgx() and hmp_info_sgx() from target/i386/monitor.c to hw/i386/sgx.c, removing the sgx_get_info() indirection and the "hw/i386/sgx.h" header. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20211007175612.496366-5-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386/sgx-stub.c')
-rw-r--r--hw/i386/sgx-stub.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/i386/sgx-stub.c b/hw/i386/sgx-stub.c
index 3749656..c9b379e 100644
--- a/hw/i386/sgx-stub.c
+++ b/hw/i386/sgx-stub.c
@@ -1,11 +1,12 @@
#include "qemu/osdep.h"
+#include "monitor/monitor.h"
+#include "monitor/hmp-target.h"
#include "hw/i386/pc.h"
#include "hw/i386/sgx-epc.h"
-#include "hw/i386/sgx.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-misc-target.h"
-SGXInfo *sgx_get_info(Error **errp)
+SGXInfo *qmp_query_sgx(Error **errp)
{
error_setg(errp, "SGX support is not compiled in");
return NULL;
@@ -17,6 +18,11 @@ 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));