On 24.07.26 00:30, Connor Kite wrote:
Add a memory-isolation property to NetdevPassOptions and
NetDevVhostUserOptions in net.json.  This property will
be used for vhost-user devices to disable access to guest
memory from devices.

It will be passed into vhost_user_init() in a future patch.

Signed-off-by: Connor Kite <[email protected]>
---
  net/passt.c      |  7 +++++++
  net/vhost-user.c |  4 ++++
  qapi/net.json    | 15 +++++++++++----
  3 files changed, 22 insertions(+), 4 deletions(-)

[...]

diff --git a/qapi/net.json b/qapi/net.json
index 1a6382825c..4588c7014b 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -213,6 +213,9 @@
  #
  # @param: parameter to pass to passt command
  #
+# @memory-isolation: enable memory isolation.  Only has effect if
+#     using vhost-user.  (default: false)
+#
  # Since: 10.1
  ##
  { 'struct': 'NetdevPasstOptions',
@@ -250,7 +253,8 @@
      '*ipv6':               'bool',
      '*tcp-ports':          ['PasstPortForward'],
      '*udp-ports':          ['PasstPortForward'],
-    '*param':              ['PasstParameter'] },
+    '*param':              ['PasstParameter'],
+    '*memory-isolation':   'bool'},
      'if': 'CONFIG_PASST' }

I have a gut feeling there ought to be a better way to add an option the only works for vhost-user, but maybe not. I certainly don’t have a constructive suggestions. :)

(Apart from that, my only comments would be the QAPI “since” field missing, as Markus noted on the previous patch, and the patch ordering Stefan has noted.)

Hanna


Reply via email to