@@ -4068,6 +4068,10 @@ contents of @code{iv.b64} to the second secret
ETEXI
+DEF("vhost-pci-slave", HAS_ARG, QEMU_OPTION_vhost_pci_slave,
+ "-vhost-pci-slave socket,chrdev={id}\n"
+ " creates a vhost-pci-slave",
+ QEMU_ARCH_I386)
HXCOMM This is the last statement. Insert new options before this line!
STEXI
@@ -509,6 +509,20 @@ static QemuOptsList qemu_fw_cfg_opts = {
},
};
+static QemuOptsList qemu_vhost_pci_slave_opts = {
+ .name = "vhost-pci-slave",
+ .implied_opt_name = "chardev",
+ .head = QTAILQ_HEAD_INITIALIZER(qemu_vhost_pci_slave_opts.head),
+ .desc = {
+ /*
+ * no elements => accept any
+ * sanity checking will happen later
+ * when setting device properties
+ */
+ { /* end of list */ }
+ },
+};
+
#ifdef CONFIG_LIBISCSI
static QemuOptsList qemu_iscsi_opts = {
.name = "iscsi",
@@ -3073,6 +3087,7 @@ int main(int argc, char **argv, char **envp)
qemu_add_opts(&qemu_icount_opts);
qemu_add_opts(&qemu_semihosting_config_opts);
qemu_add_opts(&qemu_fw_cfg_opts);
+ qemu_add_opts(&qemu_vhost_pci_slave_opts);
#ifdef CONFIG_LIBISCSI
qemu_add_opts(&qemu_iscsi_opts);
#endif
@@ -4044,6 +4059,12 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
break;
+ case QEMU_OPTION_vhost_pci_slave:
+ opts = qemu_opts_parse_noisily(qemu_find_opts("vhost-pci-slave"), optarg, false);
+ if (!opts) {
+ exit(1);
+ }
+ break;
default:
os_parse_cmd_args(popt->index, optarg);
}
An example of the command line option to create a vhost-pci-slave is: -chardev socket,id=slave1,server,wait=off,path=/opt/vhost-pci-slave -vhost-pci-slave socket,chardev=slave1 Signed-off-by: Wei Wang <wei.w.wang@intel.com> --- qemu-options.hx | 4 ++++ vl.c | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+)