Skip to content

Commit 0216585

Browse files
philmdbonzini
authored andcommitted
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: Paolo Bonzini <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 05fc8db commit 0216585

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

hw/i386/sgx-stub.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
#include "hw/i386/pc.h"
33
#include "hw/i386/sgx-epc.h"
44
#include "hw/i386/sgx.h"
5+
#include "qapi/error.h"
6+
#include "qapi/qapi-commands-misc-target.h"
57

68
SGXInfo *sgx_get_info(Error **errp)
79
{
810
error_setg(errp, "SGX support is not compiled in");
911
return NULL;
1012
}
1113

12-
SGXInfo *sgx_get_capabilities(Error **errp)
14+
SGXInfo *qmp_query_sgx_capabilities(Error **errp)
1315
{
1416
error_setg(errp, "SGX support is not compiled in");
1517
return NULL;

hw/i386/sgx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "hw/mem/memory-device.h"
1717
#include "monitor/qdev.h"
1818
#include "qapi/error.h"
19+
#include "qapi/qapi-commands-misc-target.h"
1920
#include "exec/address-spaces.h"
2021
#include "hw/i386/sgx.h"
2122
#include "sysemu/hw_accel.h"
@@ -57,7 +58,7 @@ static uint64_t sgx_calc_host_epc_section_size(void)
5758
return size;
5859
}
5960

60-
SGXInfo *sgx_get_capabilities(Error **errp)
61+
SGXInfo *qmp_query_sgx_capabilities(Error **errp)
6162
{
6263
SGXInfo *info = NULL;
6364
uint32_t eax, ebx, ecx, edx;

include/hw/i386/sgx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77
#include "qapi/qapi-types-misc-target.h"
88

99
SGXInfo *sgx_get_info(Error **errp);
10-
SGXInfo *sgx_get_capabilities(Error **errp);
1110

1211
#endif

target/i386/monitor.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,3 @@ void hmp_info_sgx(Monitor *mon, const QDict *qdict)
700700
monitor_printf(mon, "size: %" PRIu64 "\n",
701701
info->section_size);
702702
}
703-
704-
SGXInfo *qmp_query_sgx_capabilities(Error **errp)
705-
{
706-
return sgx_get_capabilities(errp);
707-
}

0 commit comments

Comments
 (0)