[PATCH 0/2] qapi/misc-target: Fix the doc of query-sgx and query-sgx-capabilities

Zhao Liu posted 2 patches 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250513143131.2008078-1-zhao1.liu@intel.com
Maintainers: Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
qapi/misc-target.json | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
[PATCH 0/2] qapi/misc-target: Fix the doc of query-sgx and query-sgx-capabilities
Posted by Zhao Liu 6 months ago
Hi all,

There're 2 QMP commands: query-sgx and query-sgx-capabilities, but
their outputs are very similar and the documentation lacks clear
differentiation.

From the codes, query-sgx is used to gather guest's SGX capabilities
(including SGX related CPUIDs and EPC sections' size, in SGXInfo), and
query-sgx-capabilities is used to gather host's SGX capabilities 
(descripted by SGXInfo as well).

Therefore, fix their documentation to reflect this difference.

Thanks and Best Regards,
Zhao
---
Zhao Liu (2):
  qapi/misc-target: Fix the doc related SGXEPCSection
  qapi/misc-target: Fix the doc to distinguish query-sgx and
    query-sgx-capabilities

 qapi/misc-target.json | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.34.1
Re: [PATCH 0/2] qapi/misc-target: Fix the doc of query-sgx and query-sgx-capabilities
Posted by Markus Armbruster 6 months ago
Zhao Liu <zhao1.liu@intel.com> writes:

> Hi all,
>
> There're 2 QMP commands: query-sgx and query-sgx-capabilities, but
> their outputs are very similar and the documentation lacks clear
> differentiation.
>
 >From the codes, query-sgx is used to gather guest's SGX capabilities
> (including SGX related CPUIDs and EPC sections' size, in SGXInfo), and
> query-sgx-capabilities is used to gather host's SGX capabilities 
> (descripted by SGXInfo as well).
>
> Therefore, fix their documentation to reflect this difference.

Acked-by: Markus Armbruster <armbru@redhat.com>

I'll take this through my tree unless Paolo is faster.
Re: [PATCH 0/2] qapi/misc-target: Fix the doc of query-sgx and query-sgx-capabilities
Posted by Zhao Liu 6 months ago
On Thu, May 15, 2025 at 08:07:02AM +0200, Markus Armbruster wrote:
> Date: Thu, 15 May 2025 08:07:02 +0200
> From: Markus Armbruster <armbru@redhat.com>
> Subject: Re: [PATCH 0/2] qapi/misc-target: Fix the doc of query-sgx and
>  query-sgx-capabilities
> 
> Zhao Liu <zhao1.liu@intel.com> writes:
> 
> > Hi all,
> >
> > There're 2 QMP commands: query-sgx and query-sgx-capabilities, but
> > their outputs are very similar and the documentation lacks clear
> > differentiation.
> >
>  >From the codes, query-sgx is used to gather guest's SGX capabilities
> > (including SGX related CPUIDs and EPC sections' size, in SGXInfo), and
> > query-sgx-capabilities is used to gather host's SGX capabilities 
> > (descripted by SGXInfo as well).
> >
> > Therefore, fix their documentation to reflect this difference.
> 
> Acked-by: Markus Armbruster <armbru@redhat.com>
> 
> I'll take this through my tree unless Paolo is faster.

Thanks Markus!

I was also thinking you would like "SgxInfo" and "SgxEpcSection" instead
of current "SGXInfo" and "SGXEPCSection".

But I'm not sure if modifying the old names has any compatibility issues
for QAPI? If you think it's ok, I can continue to make the SGX naming
styles more QAPI compliant.

Regards,
Zhao
Re: [PATCH 0/2] qapi/misc-target: Fix the doc of query-sgx and query-sgx-capabilities
Posted by Markus Armbruster 6 months ago
Zhao Liu <zhao1.liu@intel.com> writes:

> On Thu, May 15, 2025 at 08:07:02AM +0200, Markus Armbruster wrote:
>> Date: Thu, 15 May 2025 08:07:02 +0200
>> From: Markus Armbruster <armbru@redhat.com>
>> Subject: Re: [PATCH 0/2] qapi/misc-target: Fix the doc of query-sgx and
>>  query-sgx-capabilities
>> 
>> Zhao Liu <zhao1.liu@intel.com> writes:
>> 
>> > Hi all,
>> >
>> > There're 2 QMP commands: query-sgx and query-sgx-capabilities, but
>> > their outputs are very similar and the documentation lacks clear
>> > differentiation.
>> >
>>  >From the codes, query-sgx is used to gather guest's SGX capabilities
>> > (including SGX related CPUIDs and EPC sections' size, in SGXInfo), and
>> > query-sgx-capabilities is used to gather host's SGX capabilities 
>> > (descripted by SGXInfo as well).
>> >
>> > Therefore, fix their documentation to reflect this difference.
>> 
>> Acked-by: Markus Armbruster <armbru@redhat.com>
>> 
>> I'll take this through my tree unless Paolo is faster.
>
> Thanks Markus!
>
> I was also thinking you would like "SgxInfo" and "SgxEpcSection" instead
> of current "SGXInfo" and "SGXEPCSection".

These are indeed easier to read, especially the latter.

> But I'm not sure if modifying the old names has any compatibility issues
> for QAPI? If you think it's ok, I can continue to make the SGX naming
> styles more QAPI compliant.

Type names are not visible at the external interface, so changing them
is just fine.  That's a feature!