[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 04/37] vl: add the vhost-pci-slave command line o
From: |
Wei Wang |
Subject: |
[Qemu-devel] [PATCH v1 04/37] vl: add the vhost-pci-slave command line option |
Date: |
Sat, 17 Dec 2016 18:43:14 +0800 |
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 <address@hidden>
---
qemu-options.hx | 4 ++++
vl.c | 21 +++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
index c534a2f..5d60a1d 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -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
diff --git a/vl.c b/vl.c
index d77dd86..10d7f89 100644
--- a/vl.c
+++ b/vl.c
@@ -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);
}
--
2.7.4
- [Qemu-devel] [PATCH v1 00/37] Implementation of vhost-pci for inter-vm commucation, Wei Wang, 2016/12/17
- [Qemu-devel] [PATCH v1 01/37] vhost-pci-net: the fundamental vhost-pci-net device emulation, Wei Wang, 2016/12/17
- [Qemu-devel] [PATCH v1 02/37] vhost-pci-net: the fundamental implementation of vhost-pci-net-pci, Wei Wang, 2016/12/17
- [Qemu-devel] [PATCH v1 04/37] vl: add the vhost-pci-slave command line option,
Wei Wang <=
- [Qemu-devel] [PATCH v1 03/37] vhost-user: share the vhost-user protocol related structures, Wei Wang, 2016/12/17
- [Qemu-devel] [PATCH v1 05/37] vhost-pci-slave: start the implementation of vhost-pci-slave, Wei Wang, 2016/12/17
- [Qemu-devel] [PATCH v1 06/37] vhost-pci-slave: set up the fundamental handlers for the server socket, Wei Wang, 2016/12/17
- [Qemu-devel] [PATCH v1 08/37] vhost-pci-slave/msg: VHOST_USER_SET_FEATURES, Wei Wang, 2016/12/17
- [Qemu-devel] [PATCH v1 07/37] vhost-pci-slave/msg: VHOST_USER_GET_FEATURES, Wei Wang, 2016/12/17
- [Qemu-devel] [PATCH v1 09/37] vhost-pci-slave/msg: VHOST_USER_GET_PROTOCOL_FEATURES, Wei Wang, 2016/12/17
- [Qemu-devel] [PATCH v1 10/37] vhost-pci-slave/msg: VHOST_USER_SET_PROTOCOL_FEATURES, Wei Wang, 2016/12/17
- [Qemu-devel] [PATCH v1 11/37] vhost-user/msg: VHOST_USER_PROTOCOL_F_SET_DEVICE_ID, Wei Wang, 2016/12/17
- [Qemu-devel] [PATCH v1 12/37] vhost-pci-slave/msg: VHOST_USER_SET_DEVICE_ID, Wei Wang, 2016/12/17
- [Qemu-devel] [PATCH v1 14/37] vhost-pci-slave/msg: VHOST_USER_SET_OWNER, Wei Wang, 2016/12/17