[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 34/40] hw/i386/sgx: Move qmp_query_sgx_capabilities() to hw/i386/s
From: |
Paolo Bonzini |
Subject: |
[PULL 34/40] hw/i386/sgx: Move qmp_query_sgx_capabilities() to hw/i386/sgx.c |
Date: |
Wed, 13 Oct 2021 11:07:22 +0200 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
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 <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211007175612.496366-4-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/i386/sgx-stub.c | 4 +++-
hw/i386/sgx.c | 3 ++-
include/hw/i386/sgx.h | 1 -
target/i386/monitor.c | 5 -----
4 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/hw/i386/sgx-stub.c b/hw/i386/sgx-stub.c
index 45c473119e..3749656db1 100644
--- a/hw/i386/sgx-stub.c
+++ b/hw/i386/sgx-stub.c
@@ -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;
diff --git a/hw/i386/sgx.c b/hw/i386/sgx.c
index 29724ff8f0..713f136343 100644
--- a/hw/i386/sgx.c
+++ b/hw/i386/sgx.c
@@ -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;
diff --git a/include/hw/i386/sgx.h b/include/hw/i386/sgx.h
index 16fc25725c..2bf90b3f4f 100644
--- a/include/hw/i386/sgx.h
+++ b/include/hw/i386/sgx.h
@@ -7,6 +7,5 @@
#include "qapi/qapi-types-misc-target.h"
SGXInfo *sgx_get_info(Error **errp);
-SGXInfo *sgx_get_capabilities(Error **errp);
#endif
diff --git a/target/i386/monitor.c b/target/i386/monitor.c
index 680d282591..84fba47f19 100644
--- a/target/i386/monitor.c
+++ b/target/i386/monitor.c
@@ -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);
-}
--
2.31.1
- [PULL 29/40] qapi: Make some ObjectTypes depend on the build settings, (continued)
- [PULL 29/40] qapi: Make some ObjectTypes depend on the build settings, Paolo Bonzini, 2021/10/13
- [PULL 30/40] tests: tcg: Fix PVH test with binutils 2.36+, Paolo Bonzini, 2021/10/13
- [PULL 12/40] target/i386/cpu: Add missing 'qapi/error.h' header, Paolo Bonzini, 2021/10/13
- [PULL 13/40] target/i386/sev_i386.h: Remove unused headers, Paolo Bonzini, 2021/10/13
- [PULL 18/40] target/i386/sev: Restrict SEV to system emulation, Paolo Bonzini, 2021/10/13
- [PULL 16/40] target/i386/sev: sev_get_attestation_report use g_autofree, Paolo Bonzini, 2021/10/13
- [PULL 24/40] target/i386/sev: Move qmp_query_sev_capabilities() to sev.c, Paolo Bonzini, 2021/10/13
- [PULL 27/40] monitor: Reduce hmp_info_sev() declaration, Paolo Bonzini, 2021/10/13
- [PULL 23/40] target/i386/sev: Move qmp_sev_inject_launch_secret() to sev.c, Paolo Bonzini, 2021/10/13
- [PULL 39/40] target/i386/sev: Use local variable for kvm_sev_launch_measure, Paolo Bonzini, 2021/10/13
- [PULL 34/40] hw/i386/sgx: Move qmp_query_sgx_capabilities() to hw/i386/sgx.c,
Paolo Bonzini <=
- [PULL 35/40] hw/i386/sgx: Move qmp_query_sgx() and hmp_info_sgx() to hw/i386/sgx.c, Paolo Bonzini, 2021/10/13
- [PULL 31/40] hvf: Determine slot count from struct layout, Paolo Bonzini, 2021/10/13
- [PULL 37/40] monitor: Tidy up find_device_state(), Paolo Bonzini, 2021/10/13
- Re: [PULL 37/40] monitor: Tidy up find_device_state(), Markus Armbruster, 2021/10/18
- Re: [PULL 37/40] monitor: Tidy up find_device_state(), Markus Armbruster, 2021/10/19
[PULL 32/40] MAINTAINERS: Cover SGX documentation file with X86/KVM section, Paolo Bonzini, 2021/10/13