Skip to content
Snippets Groups Projects
Commit 02165856 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Paolo Bonzini
Browse files

hw/i386/sgx: Move qmp_query_sgx_capabilities() to hw/i386/sgx.c


Move qmp_query_sgx_capabilities() from target/i386/monitor.c to
hw/i386/sgx.c, removing the sgx_get_capabilities() indirection.

Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211007175612.496366-4-philmd@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 05fc8db7
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@
#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)
{
......@@ -9,7 +11,7 @@ SGXInfo *sgx_get_info(Error **errp)
return NULL;
}
SGXInfo *sgx_get_capabilities(Error **errp)
SGXInfo *qmp_query_sgx_capabilities(Error **errp)
{
error_setg(errp, "SGX support is not compiled in");
return NULL;
......
......@@ -16,6 +16,7 @@
#include "hw/mem/memory-device.h"
#include "monitor/qdev.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-misc-target.h"
#include "exec/address-spaces.h"
#include "hw/i386/sgx.h"
#include "sysemu/hw_accel.h"
......@@ -57,7 +58,7 @@ static uint64_t sgx_calc_host_epc_section_size(void)
return size;
}
SGXInfo *sgx_get_capabilities(Error **errp)
SGXInfo *qmp_query_sgx_capabilities(Error **errp)
{
SGXInfo *info = NULL;
uint32_t eax, ebx, ecx, edx;
......
......@@ -7,6 +7,5 @@
#include "qapi/qapi-types-misc-target.h"
SGXInfo *sgx_get_info(Error **errp);
SGXInfo *sgx_get_capabilities(Error **errp);
#endif
......@@ -700,8 +700,3 @@ void hmp_info_sgx(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "size: %" PRIu64 "\n",
info->section_size);
}
SGXInfo *qmp_query_sgx_capabilities(Error **errp)
{
return sgx_get_capabilities(errp);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment