]> www.infradead.org Git - qemu-nvme.git/commitdiff
netdev: add more commands to preconfig mode
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 11 May 2021 15:39:55 +0000 (11:39 -0400)
committerJason Wang <jasowang@redhat.com>
Fri, 11 Jun 2021 02:30:13 +0000 (10:30 +0800)
Creating and destroying network backend does not require a fully
constructed machine.  Allow the related monitor commands to run before
machine initialization has concluded.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hmp-commands.hx
qapi/net.json

index 84dcc3aae6cf6ac0bacb35bb9824d53d94e5b6f6..8e45bce2cd9df410be0f8eb5b987239b27224cf6 100644 (file)
@@ -1269,6 +1269,7 @@ ERST
         .help       = "add host network device",
         .cmd        = hmp_netdev_add,
         .command_completion = netdev_add_completion,
+        .flags      = "p",
     },
 
 SRST
@@ -1283,6 +1284,7 @@ ERST
         .help       = "remove host network device",
         .cmd        = hmp_netdev_del,
         .command_completion = netdev_del_completion,
+        .flags      = "p",
     },
 
 SRST
index af3f5b0fdabd08e70f943245f2691350cf16a6d1..7fab2e7cd8aa5f5c504d3bad0c1e3d67037f117e 100644 (file)
@@ -55,7 +55,8 @@
 # <- { "return": {} }
 #
 ##
-{ 'command': 'netdev_add', 'data': 'Netdev', 'boxed': true }
+{ 'command': 'netdev_add', 'data': 'Netdev', 'boxed': true,
+  'allow-preconfig': true }
 
 ##
 # @netdev_del:
@@ -75,7 +76,8 @@
 # <- { "return": {} }
 #
 ##
-{ 'command': 'netdev_del', 'data': {'id': 'str'} }
+{ 'command': 'netdev_del', 'data': {'id': 'str'},
+  'allow-preconfig': true }
 
 ##
 # @NetLegacyNicOptions: