All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Zhong <yang.zhong@intel.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: pbonzini@redhat.com, berrange@redhat.com, eblake@redhat.com,
	qemu-devel@nongnu.org, seanjc@google.com
Subject: Re: [PATCH v2 1/3] monitor: Add HMP and QMP interfaces
Date: Mon, 13 Sep 2021 18:37:13 +0800	[thread overview]
Message-ID: <20210913103713.GB27331@yangzhon-Virtual> (raw)
In-Reply-To: <fb7d360d-80b5-9bc2-0f6f-f48e04dc08f9@redhat.com>

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
  


  reply	other threads:[~2021-09-13 10:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 10:22 [PATCH v2 0/3] The HMP/QMP interfaces in Qemu SGX Yang Zhong
2021-09-10 10:22 ` [PATCH v2 1/3] monitor: Add HMP and QMP interfaces Yang Zhong
2021-09-10 12:39   ` Philippe Mathieu-Daudé
2021-09-13 10:37     ` Yang Zhong [this message]
2021-09-13 12:42       ` Paolo Bonzini
2021-09-10 13:46   ` Daniel P. Berrangé
2021-09-13  9:35     ` Daniel P. Berrangé
2021-09-13 10:46       ` Yang Zhong
2021-09-13 12:48       ` Paolo Bonzini
2021-09-13 12:56         ` Daniel P. Berrangé
2021-09-13 12:52           ` Yang Zhong
2021-09-13 13:24             ` Daniel P. Berrangé
2021-09-16  6:14               ` Yang Zhong
2021-09-10 10:22 ` [PATCH v2 2/3] qmp: Add the qmp_query_sgx_capabilities() Yang Zhong
2021-09-10 12:41   ` Philippe Mathieu-Daudé
2021-09-13 10:34     ` Yang Zhong
2021-09-10 10:22 ` [PATCH v2 3/3] pc: Cleanup the SGX definitions Yang Zhong
2021-09-10 14:15 ` [PATCH v2 0/3] The HMP/QMP interfaces in Qemu SGX Paolo Bonzini
2021-09-10 14:21   ` Daniel P. Berrangé
2021-09-10 19:10     ` Paolo Bonzini

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=20210913103713.GB27331@yangzhon-Virtual \
    --to=yang.zhong@intel.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.