Skip to contentSkip to conversation

qapi: Cleanup SGX related comments

PATCH In review Yang Zhong 2 participants 4 messages Jan 19, 2022

lore
Share & tools
lore

Yang Zhong

author
#0 lore raw

PATCH 1/1 qapi: Cleanup SGX related comments

The SGX NUMA patches were merged into Qemu 7.0 release, we need clarify detailed version history information and also change some related comments, which make SGX related comments clearer.

---
 qapi/machine.json     |  4 ++--
 qapi/misc-target.json | 14 +++++++++-----
 2 files changed, 11 insertions(+), 7 deletions(-)
qapi/machine.json +2 -2
index b6a37e17c4..cf47cb63a9 100644
@@ -1207,7 +1207,7 @@
 #
 # @memdev: memory backend linked with device
 #
-# @node: the numa node
+# @node: the numa node (Since: 7.0)
 #
 # Since: 6.2
 ##
@@ -1288,7 +1288,7 @@
 #
 # @memdev: memory backend linked with device
 #
-# @node: the numa node
+# @node: the numa node (Since: 7.0)
 #
 # Since: 6.2
 ##
qapi/misc-target.json +9 -5
index 1022aa0184..558521bd39 100644
@@ -344,9 +344,9 @@
 #
 # @node: the numa node
 #
-# @size: the size of epc section
+# @size: the size of EPC section
 #
-# Since: 6.2
+# Since: 7.0
 ##
 { 'struct': 'SGXEPCSection',
   'data': { 'node': 'int',
@@ -365,7 +365,7 @@
 #
 # @flc: true if FLC is supported
 #
-# @sections: The EPC sections info for guest
+# @sections: The EPC sections info for guest(Since: 7.0)
 #
 # Since: 6.2
 ##
@@ -390,7 +390,9 @@
 #
 # -> { "execute": "query-sgx" }
 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
-#                  "flc": true, "section-size" : 0 } }
+#                  "flc": true,  "sections":
+#                  [{"node": 0, "size": 67108864},
+#                  {"node": 1, "size": 29360128}]} }
 #
 ##
 { 'command': 'query-sgx', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }
@@ -408,7 +410,9 @@
 #
 # -> { "execute": "query-sgx-capabilities" }
 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
-#                  "flc": true, "section-size" : 0 } }
+#                  "flc": true, "section" :
+#                  [{"node": 0, "size": 67108864},
+#                  {"node": 1, "size": 29360128}]} }
 #
 ##
 { 'command': 'query-sgx-capabilities', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Yang Zhong

The SGX NUMA patches were merged into Qemu 7.0 release, we need clarify detailed version history information and also change some related comments, which make SGX related comments clearer.

---
 qapi/machine.json     |  4 ++--
 qapi/misc-target.json | 14 +++++++++-----
 2 files changed, 11 insertions(+), 7 deletions(-)
Quoted 39 lines
qapi/machine.json +2 -2
index b6a37e17c4..cf47cb63a9 100644
@@ -1207,7 +1207,7 @@
 #
 # @memdev: memory backend linked with device
 #
-# @node: the numa node
+# @node: the numa node (Since: 7.0)
 #
 # Since: 6.2
 ##
@@ -1288,7 +1288,7 @@
 #
 # @memdev: memory backend linked with device
 #
-# @node: the numa node
+# @node: the numa node (Since: 7.0)
 #
 # Since: 6.2
 ##
qapi/misc-target.json +2 -2
index 1022aa0184..558521bd39 100644
@@ -344,9 +344,9 @@
 #
 # @node: the numa node
 #
-# @size: the size of epc section
+# @size: the size of EPC section
 #
-# Since: 6.2
+# Since: 7.0
 ##
 { 'struct': 'SGXEPCSection',
   'data': { 'node': 'int',

qapi/misc-target.json line 368

Quoted 5 lines
qapi/misc-target.json +1 -1
@@ -365,7 +365,7 @@
 #
 # @flc: true if FLC is supported
 #
-# @sections: The EPC sections info for guest
+# @sections: The EPC sections info for guest(Since: 7.0)

Minor point - a space is needed before '('

Quoted 15 lines
qapi/misc-target.json +3 -1
 #
 # Since: 6.2
 ##
@@ -390,7 +390,9 @@
 #
 # -> { "execute": "query-sgx" }
 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
-#                  "flc": true, "section-size" : 0 } }
+#                  "flc": true,  "sections":
+#                  [{"node": 0, "size": 67108864},
+#                  {"node": 1, "size": 29360128}]} }
 #
 ##
 { 'command': 'query-sgx', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }

qapi/misc-target.json line 415

Quoted 7 lines
qapi/misc-target.json +3 -1
@@ -408,7 +410,9 @@
 #
 # -> { "execute": "query-sgx-capabilities" }
 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
-#                  "flc": true, "section-size" : 0 } }
+#                  "flc": true, "section" :
+#                  [{"node": 0, "size": 67108864},
+#                  {"node": 1, "size": 29360128}]} }

The 'section-size' shouldn't be removed here - we still need the command fixed to bring back the 'section-size' as it should not have been deleted.

Adding the 'section' docs is ok though.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
author
#2 lore raw
Quoted 87 lines · Daniel P. Berrangé
Quoted 9 lines · Yang Zhong

The SGX NUMA patches were merged into Qemu 7.0 release, we need clarify detailed version history information and also change some related comments, which make SGX related comments clearer.

---
 qapi/machine.json     |  4 ++--
 qapi/misc-target.json | 14 +++++++++-----
 2 files changed, 11 insertions(+), 7 deletions(-)
Quoted 39 lines
qapi/machine.json +2 -2
index b6a37e17c4..cf47cb63a9 100644
@@ -1207,7 +1207,7 @@
 #
 # @memdev: memory backend linked with device
 #
-# @node: the numa node
+# @node: the numa node (Since: 7.0)
 #
 # Since: 6.2
 ##
@@ -1288,7 +1288,7 @@
 #
 # @memdev: memory backend linked with device
 #
-# @node: the numa node
+# @node: the numa node (Since: 7.0)
 #
 # Since: 6.2
 ##
qapi/misc-target.json +2 -2
index 1022aa0184..558521bd39 100644
@@ -344,9 +344,9 @@
 #
 # @node: the numa node
 #
-# @size: the size of epc section
+# @size: the size of EPC section
 #
-# Since: 6.2
+# Since: 7.0
 ##
 { 'struct': 'SGXEPCSection',
   'data': { 'node': 'int',

qapi/misc-target.json line 368

Quoted 5 lines
qapi/misc-target.json +1 -1
@@ -365,7 +365,7 @@
 #
 # @flc: true if FLC is supported
 #
-# @sections: The EPC sections info for guest
+# @sections: The EPC sections info for guest(Since: 7.0)

Minor point - a space is needed before '('

Quoted 15 lines
qapi/misc-target.json +3 -1
 #
 # Since: 6.2
 ##
@@ -390,7 +390,9 @@
 #
 # -> { "execute": "query-sgx" }
 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
-#                  "flc": true, "section-size" : 0 } }
+#                  "flc": true,  "sections":
+#                  [{"node": 0, "size": 67108864},
+#                  {"node": 1, "size": 29360128}]} }
 #
 ##
 { 'command': 'query-sgx', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }

qapi/misc-target.json line 415

Quoted 7 lines
qapi/misc-target.json +3 -1
@@ -408,7 +410,9 @@
 #
 # -> { "execute": "query-sgx-capabilities" }
 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
-#                  "flc": true, "section-size" : 0 } }
+#                  "flc": true, "section" :
+#                  [{"node": 0, "size": 67108864},
+#                  {"node": 1, "size": 29360128}]} }

The 'section-size' shouldn't be removed here - we still need the command fixed to bring back the 'section-size' as it should not have been deleted.

Quoted 1 line

Adding the 'section' docs is ok though.

Thanks Daniel, You mean I need add extra doc like below? 6.2 and 7.0 command description for @query-sgx ?

##
# @query-sgx:
#
# Returns information about SGX
#
# Returns: @SGXInfo
#
# Since: 6.2
#
# Example:
#
# -> { "execute": "query-sgx" }
# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
# "flc": true, "section-size" : 0 } }
#
# Since: 7.0
#
# Example:
#
# -> { "execute": "query-sgx" }
# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,

  #                  "flc": true,  "sections":
  #                  [{"node": 0, "size": 67108864},
  #                  {"node": 1, "size": 29360128}]} }

#
##
{ 'command': 'query-sgx', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }

If this is okay for you, I can send v2 to you, thanks!

Yang

Quoted 7 lines

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#3 lore raw
Quoted 115 lines · Yang Zhong
Quoted 87 lines · Daniel P. Berrangé
Quoted 9 lines · Yang Zhong

The SGX NUMA patches were merged into Qemu 7.0 release, we need clarify detailed version history information and also change some related comments, which make SGX related comments clearer.

---
 qapi/machine.json     |  4 ++--
 qapi/misc-target.json | 14 +++++++++-----
 2 files changed, 11 insertions(+), 7 deletions(-)
Quoted 39 lines
qapi/machine.json +2 -2
index b6a37e17c4..cf47cb63a9 100644
@@ -1207,7 +1207,7 @@
 #
 # @memdev: memory backend linked with device
 #
-# @node: the numa node
+# @node: the numa node (Since: 7.0)
 #
 # Since: 6.2
 ##
@@ -1288,7 +1288,7 @@
 #
 # @memdev: memory backend linked with device
 #
-# @node: the numa node
+# @node: the numa node (Since: 7.0)
 #
 # Since: 6.2
 ##
qapi/misc-target.json +2 -2
index 1022aa0184..558521bd39 100644
@@ -344,9 +344,9 @@
 #
 # @node: the numa node
 #
-# @size: the size of epc section
+# @size: the size of EPC section
 #
-# Since: 6.2
+# Since: 7.0
 ##
 { 'struct': 'SGXEPCSection',
   'data': { 'node': 'int',

qapi/misc-target.json line 368

Quoted 5 lines
qapi/misc-target.json +1 -1
@@ -365,7 +365,7 @@
 #
 # @flc: true if FLC is supported
 #
-# @sections: The EPC sections info for guest
+# @sections: The EPC sections info for guest(Since: 7.0)

Minor point - a space is needed before '('

Quoted 15 lines
qapi/misc-target.json +3 -1
 #
 # Since: 6.2
 ##
@@ -390,7 +390,9 @@
 #
 # -> { "execute": "query-sgx" }
 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
-#                  "flc": true, "section-size" : 0 } }
+#                  "flc": true,  "sections":
+#                  [{"node": 0, "size": 67108864},
+#                  {"node": 1, "size": 29360128}]} }
 #
 ##
 { 'command': 'query-sgx', 'returns': 'SGXInfo', 'if': 'TARGET_I386' }

qapi/misc-target.json line 415

Quoted 7 lines
qapi/misc-target.json +3 -1
@@ -408,7 +410,9 @@
 #
 # -> { "execute": "query-sgx-capabilities" }
 # <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
-#                  "flc": true, "section-size" : 0 } }
+#                  "flc": true, "section" :
+#                  [{"node": 0, "size": 67108864},
+#                  {"node": 1, "size": 29360128}]} }

The 'section-size' shouldn't be removed here - we still need the command fixed to bring back the 'section-size' as it should not have been deleted.

Quoted 1 line

Adding the 'section' docs is ok though.

Thanks Daniel, You mean I need add extra doc like below? 6.2 and 7.0 command description for @query-sgx ?

##
# @query-sgx:
#
# Returns information about SGX
#
# Returns: @SGXInfo
#
# Since: 6.2
#
# Example:
#
# -> { "execute": "query-sgx" }
# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
# "flc": true, "section-size" : 0 } }
#
# Since: 7.0
#
# Example:
#
# -> { "execute": "query-sgx" }
# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,

Quoted 3 lines
  #                  "flc": true,  "sections":
  #                  [{"node": 0, "size": 67108864},
  #                  {"node": 1, "size": 29360128}]} }

No, I'm saying you need to fix the query-sgx command so that it still reports 'section-size':

# Example:
#
# -> { "execute": "query-sgx" }
# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true,
# "flc": true, "section-size" : 0,
# "sections": [
# {"node": 0, "size": 67108864},
# {"node": 1, "size": 29360128}] } }

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|