aboutsummaryrefslogtreecommitdiff
path: root/target/i386
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 /target/i386
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 'target/i386')
-rw-r--r--target/i386/monitor.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/target/i386/monitor.c b/target/i386/monitor.c
index 84fba47..8166e17 100644
--- a/target/i386/monitor.c
+++ b/target/i386/monitor.c
@@ -34,7 +34,6 @@
#include "qapi/qapi-commands-misc-target.h"
#include "qapi/qapi-commands-misc.h"
#include "hw/i386/pc.h"
-#include "hw/i386/sgx.h"
/* Perform linear address sign extension */
static hwaddr addr_canonical(CPUArchState *env, hwaddr addr)
@@ -674,29 +673,3 @@ void hmp_info_io_apic(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "This command is obsolete and will be "
"removed soon. Please use 'info pic' instead.\n");
}
-
-SGXInfo *qmp_query_sgx(Error **errp)
-{
- return sgx_get_info(errp);
-}
-
-void hmp_info_sgx(Monitor *mon, const QDict *qdict)
-{
- Error *err = NULL;
- g_autoptr(SGXInfo) info = qmp_query_sgx(&err);
-
- if (err) {
- error_report_err(err);
- return;
- }
- monitor_printf(mon, "SGX support: %s\n",
- info->sgx ? "enabled" : "disabled");
- monitor_printf(mon, "SGX1 support: %s\n",
- info->sgx1 ? "enabled" : "disabled");
- monitor_printf(mon, "SGX2 support: %s\n",
- info->sgx2 ? "enabled" : "disabled");
- monitor_printf(mon, "FLC support: %s\n",
- info->flc ? "enabled" : "disabled");
- monitor_printf(mon, "size: %" PRIu64 "\n",
- info->section_size);
-}