blob: 385423f02db61989f33f5dd86faf53eb726bdbc0 [file] [log] [blame]
Paolo Bonzini4d454572012-11-26 16:03:42 +01001/*
Greg Kurzaf8b38b2016-06-06 11:52:34 +02002 * 9p
Paolo Bonzini4d454572012-11-26 16:03:42 +01003 *
4 * This work is licensed under the terms of the GNU GPL, version 2 or
5 * later. See the COPYING file in the top-level directory.
6 */
7
Peter Maydellfbc04122016-01-26 18:17:10 +00008#include "qemu/osdep.h"
Paolo Bonzini4d454572012-11-26 16:03:42 +01009#include "qemu/config-file.h"
10#include "qemu/option.h"
11#include "qemu/module.h"
12
13static QemuOptsList qemu_fsdev_opts = {
14 .name = "fsdev",
15 .implied_opt_name = "fsdriver",
16 .head = QTAILQ_HEAD_INITIALIZER(qemu_fsdev_opts.head),
17 .desc = {
18 {
19 .name = "fsdriver",
20 .type = QEMU_OPT_STRING,
21 }, {
22 .name = "path",
23 .type = QEMU_OPT_STRING,
24 }, {
25 .name = "security_model",
26 .type = QEMU_OPT_STRING,
27 }, {
28 .name = "writeout",
29 .type = QEMU_OPT_STRING,
30 }, {
31 .name = "readonly",
32 .type = QEMU_OPT_BOOL,
33
34 }, {
35 .name = "socket",
36 .type = QEMU_OPT_STRING,
37 }, {
38 .name = "sock_fd",
39 .type = QEMU_OPT_NUMBER,
Pradeep Jagadeeshb8bbdb82017-02-28 10:31:46 +010040 }, {
41 .name = "throttling.iops-total",
42 .type = QEMU_OPT_NUMBER,
43 .help = "limit total I/O operations per second",
44 }, {
45 .name = "throttling.iops-read",
46 .type = QEMU_OPT_NUMBER,
47 .help = "limit read operations per second",
48 }, {
49 .name = "throttling.iops-write",
50 .type = QEMU_OPT_NUMBER,
51 .help = "limit write operations per second",
52 }, {
53 .name = "throttling.bps-total",
54 .type = QEMU_OPT_NUMBER,
55 .help = "limit total bytes per second",
56 }, {
57 .name = "throttling.bps-read",
58 .type = QEMU_OPT_NUMBER,
59 .help = "limit read bytes per second",
60 }, {
61 .name = "throttling.bps-write",
62 .type = QEMU_OPT_NUMBER,
63 .help = "limit write bytes per second",
64 }, {
65 .name = "throttling.iops-total-max",
66 .type = QEMU_OPT_NUMBER,
67 .help = "I/O operations burst",
68 }, {
69 .name = "throttling.iops-read-max",
70 .type = QEMU_OPT_NUMBER,
71 .help = "I/O operations read burst",
72 }, {
73 .name = "throttling.iops-write-max",
74 .type = QEMU_OPT_NUMBER,
75 .help = "I/O operations write burst",
76 }, {
77 .name = "throttling.bps-total-max",
78 .type = QEMU_OPT_NUMBER,
79 .help = "total bytes burst",
80 }, {
81 .name = "throttling.bps-read-max",
82 .type = QEMU_OPT_NUMBER,
83 .help = "total bytes read burst",
84 }, {
85 .name = "throttling.bps-write-max",
86 .type = QEMU_OPT_NUMBER,
87 .help = "total bytes write burst",
88 }, {
89 .name = "throttling.iops-total-max-length",
90 .type = QEMU_OPT_NUMBER,
91 .help = "length of the iops-total-max burst period, in seconds",
92 }, {
93 .name = "throttling.iops-read-max-length",
94 .type = QEMU_OPT_NUMBER,
95 .help = "length of the iops-read-max burst period, in seconds",
96 }, {
97 .name = "throttling.iops-write-max-length",
98 .type = QEMU_OPT_NUMBER,
99 .help = "length of the iops-write-max burst period, in seconds",
100 }, {
101 .name = "throttling.bps-total-max-length",
102 .type = QEMU_OPT_NUMBER,
103 .help = "length of the bps-total-max burst period, in seconds",
104 }, {
105 .name = "throttling.bps-read-max-length",
106 .type = QEMU_OPT_NUMBER,
107 .help = "length of the bps-read-max burst period, in seconds",
108 }, {
109 .name = "throttling.bps-write-max-length",
110 .type = QEMU_OPT_NUMBER,
111 .help = "length of the bps-write-max burst period, in seconds",
112 }, {
113 .name = "throttling.iops-size",
114 .type = QEMU_OPT_NUMBER,
115 .help = "when limiting by iops max size of an I/O in bytes",
Paolo Bonzini4d454572012-11-26 16:03:42 +0100116 },
Paolo Bonzini4d454572012-11-26 16:03:42 +0100117 { /*End of list */ }
118 },
119};
120
121static QemuOptsList qemu_virtfs_opts = {
122 .name = "virtfs",
123 .implied_opt_name = "fsdriver",
124 .head = QTAILQ_HEAD_INITIALIZER(qemu_virtfs_opts.head),
125 .desc = {
126 {
127 .name = "fsdriver",
128 .type = QEMU_OPT_STRING,
129 }, {
130 .name = "path",
131 .type = QEMU_OPT_STRING,
132 }, {
133 .name = "mount_tag",
134 .type = QEMU_OPT_STRING,
135 }, {
136 .name = "security_model",
137 .type = QEMU_OPT_STRING,
138 }, {
139 .name = "writeout",
140 .type = QEMU_OPT_STRING,
141 }, {
142 .name = "readonly",
143 .type = QEMU_OPT_BOOL,
144 }, {
145 .name = "socket",
146 .type = QEMU_OPT_STRING,
147 }, {
148 .name = "sock_fd",
149 .type = QEMU_OPT_NUMBER,
150 },
151
152 { /*End of list */ }
153 },
154};
155
156static void fsdev_register_config(void)
157{
158 qemu_add_opts(&qemu_fsdev_opts);
159 qemu_add_opts(&qemu_virtfs_opts);
160}
Eduardo Habkost34294e22016-02-16 18:59:07 -0200161opts_init(fsdev_register_config);