[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/3] monitor: Add HMP and QMP interfaces
From: |
Yang Zhong |
Subject: |
Re: [PATCH v2 1/3] monitor: Add HMP and QMP interfaces |
Date: |
Mon, 13 Sep 2021 18:37:13 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Sep 10, 2021 at 02:39:04PM +0200, Philippe Mathieu-Daudé wrote:
> On 9/10/21 12:22 PM, Yang Zhong wrote:
> > The QMP and HMP interfaces can be used by monitor or QMP tools to retrieve
> > the SGX information from VM side when SGX is enabled on Intel platform.
> >
> > Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> > ---
> > hmp-commands-info.hx | 15 +++++++++++++
> > hw/i386/sgx.c | 29 ++++++++++++++++++++++++
> > include/hw/i386/sgx.h | 11 +++++++++
> > include/monitor/hmp-target.h | 1 +
> > qapi/misc-target.json | 43 ++++++++++++++++++++++++++++++++++++
> > target/i386/monitor.c | 36 ++++++++++++++++++++++++++++++
> > tests/qtest/qmp-cmd-test.c | 1 +
> > 7 files changed, 136 insertions(+)
> > create mode 100644 include/hw/i386/sgx.h
>
> > diff --git a/qapi/misc-target.json b/qapi/misc-target.json
> > index 3b05ad3dbf..e2a347cc23 100644
> > --- a/qapi/misc-target.json
> > +++ b/qapi/misc-target.json
> > @@ -333,3 +333,46 @@
> > { 'command': 'query-sev-attestation-report', 'data': { 'mnonce': 'str' },
> > 'returns': 'SevAttestationReport',
> > 'if': 'TARGET_I386' }
> > +
> > +##
> > +# @SGXInfo:
> > +#
> > +# Information about intel Safe Guard eXtension (SGX) support
> > +#
> > +# @sgx: true if SGX is supported
> > +#
> > +# @sgx1: true if SGX1 is supported
> > +#
> > +# @sgx2: true if SGX2 is supported
> > +#
> > +# @flc: true if FLC is supported
> > +#
> > +# @section-size: The EPC section size for guest
> > +#
> > +# Since: 6.2
> > +##
> > +{ 'struct': 'SGXInfo',
> > + 'data': { 'sgx': 'bool',
> > + 'sgx1': 'bool',
> > + 'sgx2': 'bool',
> > + 'flc': 'bool',
> > + 'section-size': 'uint64'},
> > + 'if': 'TARGET_I386' }
>
> Is it possible to restrict it to KVM? Maybe:
>
> 'if': { 'all': ['TARGET_I386', 'CONFIG_KVM'] } },
>
> ? (I'm not sure).
Philippe, i tried this definition, which is feasible.
This seems more accurate for sgx in the kvm of i386 platform. thanks!
Yang
- [PATCH v2 0/3] The HMP/QMP interfaces in Qemu SGX, Yang Zhong, 2021/09/10
- [PATCH v2 3/3] pc: Cleanup the SGX definitions, Yang Zhong, 2021/09/10
- [PATCH v2 1/3] monitor: Add HMP and QMP interfaces, Yang Zhong, 2021/09/10
- Re: [PATCH v2 1/3] monitor: Add HMP and QMP interfaces, Daniel P . Berrangé, 2021/09/10
- Re: [PATCH v2 1/3] monitor: Add HMP and QMP interfaces, Daniel P . Berrangé, 2021/09/13
- Re: [PATCH v2 1/3] monitor: Add HMP and QMP interfaces, Yang Zhong, 2021/09/13
- Re: [PATCH v2 1/3] monitor: Add HMP and QMP interfaces, Paolo Bonzini, 2021/09/13
- Re: [PATCH v2 1/3] monitor: Add HMP and QMP interfaces, Daniel P . Berrangé, 2021/09/13
- Re: [PATCH v2 1/3] monitor: Add HMP and QMP interfaces, Yang Zhong, 2021/09/13
- Re: [PATCH v2 1/3] monitor: Add HMP and QMP interfaces, Daniel P . Berrangé, 2021/09/13
- Re: [PATCH v2 1/3] monitor: Add HMP and QMP interfaces, Yang Zhong, 2021/09/16
[PATCH v2 2/3] qmp: Add the qmp_query_sgx_capabilities(), Yang Zhong, 2021/09/10