From: Yang Zhong <yang.zhong@intel.com>
To: qemu-devel@nongnu.org
Cc: yang.zhong@intel.com, pbonzini@redhat.com, eblake@redhat.com,
seanjc@google.com
Subject: [PATCH 2/7] hmp: Add 'info sgx' command
Date: Wed, 8 Sep 2021 16:19:32 +0800 [thread overview]
Message-ID: <20210908081937.77254-3-yang.zhong@intel.com> (raw)
In-Reply-To: <20210908081937.77254-1-yang.zhong@intel.com>
The command can be used to show the SGX information in the monitor
when SGX is enabled on intel platform.
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
hmp-commands-info.hx | 15 +++++++++++++++
include/monitor/hmp-target.h | 1 +
target/i386/monitor.c | 6 ++++++
3 files changed, 22 insertions(+)
diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
index 27206ac049..4c966e8a6b 100644
--- a/hmp-commands-info.hx
+++ b/hmp-commands-info.hx
@@ -877,3 +877,18 @@ SRST
``info dirty_rate``
Display the vcpu dirty rate information.
ERST
+
+#if defined(TARGET_I386)
+ {
+ .name = "sgx",
+ .args_type = "",
+ .params = "",
+ .help = "show intel SGX information",
+ .cmd = hmp_info_sgx,
+ },
+#endif
+
+SRST
+ ``info sgx``
+ Show intel SGX information.
+ERST
diff --git a/include/monitor/hmp-target.h b/include/monitor/hmp-target.h
index 60fc92722a..dc53add7ee 100644
--- a/include/monitor/hmp-target.h
+++ b/include/monitor/hmp-target.h
@@ -49,5 +49,6 @@ void hmp_info_tlb(Monitor *mon, const QDict *qdict);
void hmp_mce(Monitor *mon, const QDict *qdict);
void hmp_info_local_apic(Monitor *mon, const QDict *qdict);
void hmp_info_io_apic(Monitor *mon, const QDict *qdict);
+void hmp_info_sgx(Monitor *mon, const QDict *qdict);
#endif /* MONITOR_HMP_TARGET_H */
diff --git a/target/i386/monitor.c b/target/i386/monitor.c
index 942274c1c2..f1861fe6c2 100644
--- a/target/i386/monitor.c
+++ b/target/i386/monitor.c
@@ -769,3 +769,9 @@ SGXInfo *qmp_query_sgx(Error **errp)
error_setg(errp, QERR_FEATURE_DISABLED, "query-sgx");
return NULL;
}
+
+void hmp_info_sgx(Monitor *mon, const QDict *qdict)
+{
+ error_setg(errp, QERR_FEATURE_DISABLED, "query-sgx");
+ return NULL;
+}
next prev parent reply other threads:[~2021-09-08 8:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-08 8:19 [PATCH 0/7] The HMP/QMP interfaces in Qemu SGX Yang Zhong
2021-09-08 8:19 ` [PATCH 1/7] qmp: Add query-sgx command Yang Zhong
2021-09-08 8:19 ` Yang Zhong [this message]
2021-09-08 8:19 ` [PATCH 3/7] i386: Add sgx_get_info() interface Yang Zhong
2021-09-08 8:32 ` Philippe Mathieu-Daudé
2021-09-09 2:20 ` Yang Zhong
2021-09-08 8:55 ` Paolo Bonzini
2021-09-09 7:05 ` Yang Zhong
2021-09-08 8:19 ` [PATCH 4/7] bitops: Support 32 and 64 bit mask macro Yang Zhong
2021-09-08 8:34 ` Philippe Mathieu-Daudé
2021-09-09 2:04 ` Yang Zhong
2021-09-08 8:19 ` [PATCH 5/7] qmp: Add the qmp_query_sgx_capabilities() Yang Zhong
2021-09-08 8:38 ` Philippe Mathieu-Daudé
2021-09-09 2:51 ` Yang Zhong
2021-09-09 9:36 ` Philippe Mathieu-Daudé
2021-09-09 12:06 ` Yang Zhong
2021-09-09 13:25 ` Philippe Mathieu-Daudé
2021-09-08 8:19 ` [PATCH 6/7] monitor: Fix coredump issue in non-x86 platform Yang Zhong
2021-09-08 8:53 ` Philippe Mathieu-Daudé
2021-09-08 8:54 ` Paolo Bonzini
2021-09-09 6:48 ` Yang Zhong
2021-09-08 8:19 ` [PATCH 7/7] pc: Cleanup the SGX definitions Yang Zhong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210908081937.77254-3-yang.zhong@intel.com \
--to=yang.zhong@intel.com \
--cc=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=seanjc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).