1 | /* AUTOMATICALLY GENERATED, DO NOT MODIFY */ |
2 | |
3 | /* |
4 | * Schema-defined QAPI types |
5 | * |
6 | * Copyright IBM, Corp. 2011 |
7 | * Copyright (c) 2013-2018 Red Hat Inc. |
8 | * |
9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. |
10 | * See the COPYING.LIB file in the top-level directory. |
11 | */ |
12 | |
13 | #ifndef QAPI_TYPES_MISC_H |
14 | #define QAPI_TYPES_MISC_H |
15 | |
16 | #include "qapi/qapi-builtin-types.h" |
17 | #include "qapi-types-common.h" |
18 | |
19 | typedef struct QMPCapabilityList QMPCapabilityList; |
20 | |
21 | typedef struct q_obj_qmp_capabilities_arg q_obj_qmp_capabilities_arg; |
22 | |
23 | typedef enum QMPCapability { |
24 | QMP_CAPABILITY_OOB, |
25 | QMP_CAPABILITY__MAX, |
26 | } QMPCapability; |
27 | |
28 | #define QMPCapability_str(val) \ |
29 | qapi_enum_lookup(&QMPCapability_lookup, (val)) |
30 | |
31 | extern const QEnumLookup QMPCapability_lookup; |
32 | |
33 | typedef struct VersionTriple VersionTriple; |
34 | |
35 | typedef struct VersionInfo VersionInfo; |
36 | |
37 | typedef struct CommandInfo CommandInfo; |
38 | |
39 | typedef struct CommandInfoList CommandInfoList; |
40 | |
41 | typedef enum LostTickPolicy { |
42 | LOST_TICK_POLICY_DISCARD, |
43 | LOST_TICK_POLICY_DELAY, |
44 | LOST_TICK_POLICY_SLEW, |
45 | LOST_TICK_POLICY__MAX, |
46 | } LostTickPolicy; |
47 | |
48 | #define LostTickPolicy_str(val) \ |
49 | qapi_enum_lookup(&LostTickPolicy_lookup, (val)) |
50 | |
51 | extern const QEnumLookup LostTickPolicy_lookup; |
52 | |
53 | typedef struct q_obj_add_client_arg q_obj_add_client_arg; |
54 | |
55 | typedef struct NameInfo NameInfo; |
56 | |
57 | typedef struct KvmInfo KvmInfo; |
58 | |
59 | typedef struct UuidInfo UuidInfo; |
60 | |
61 | typedef struct EventInfo EventInfo; |
62 | |
63 | typedef struct EventInfoList EventInfoList; |
64 | |
65 | typedef struct IOThreadInfo IOThreadInfo; |
66 | |
67 | typedef struct IOThreadInfoList IOThreadInfoList; |
68 | |
69 | typedef struct BalloonInfo BalloonInfo; |
70 | |
71 | typedef struct q_obj_BALLOON_CHANGE_arg q_obj_BALLOON_CHANGE_arg; |
72 | |
73 | typedef struct PciMemoryRange PciMemoryRange; |
74 | |
75 | typedef struct PciMemoryRegion PciMemoryRegion; |
76 | |
77 | typedef struct PciBusInfo PciBusInfo; |
78 | |
79 | typedef struct PciDeviceInfoList PciDeviceInfoList; |
80 | |
81 | typedef struct PciBridgeInfo PciBridgeInfo; |
82 | |
83 | typedef struct PciDeviceClass PciDeviceClass; |
84 | |
85 | typedef struct PciDeviceId PciDeviceId; |
86 | |
87 | typedef struct PciMemoryRegionList PciMemoryRegionList; |
88 | |
89 | typedef struct PciDeviceInfo PciDeviceInfo; |
90 | |
91 | typedef struct PciInfo PciInfo; |
92 | |
93 | typedef struct PciInfoList PciInfoList; |
94 | |
95 | typedef struct q_obj_memsave_arg q_obj_memsave_arg; |
96 | |
97 | typedef struct q_obj_pmemsave_arg q_obj_pmemsave_arg; |
98 | |
99 | typedef struct q_obj_balloon_arg q_obj_balloon_arg; |
100 | |
101 | typedef struct q_obj_human_monitor_command_arg q_obj_human_monitor_command_arg; |
102 | |
103 | typedef struct q_obj_change_arg q_obj_change_arg; |
104 | |
105 | typedef struct q_obj_xen_set_global_dirty_log_arg q_obj_xen_set_global_dirty_log_arg; |
106 | |
107 | typedef struct q_obj_getfd_arg q_obj_getfd_arg; |
108 | |
109 | typedef struct q_obj_closefd_arg q_obj_closefd_arg; |
110 | |
111 | typedef struct MemoryInfo MemoryInfo; |
112 | |
113 | typedef struct AddfdInfo AddfdInfo; |
114 | |
115 | typedef struct q_obj_add_fd_arg q_obj_add_fd_arg; |
116 | |
117 | typedef struct q_obj_remove_fd_arg q_obj_remove_fd_arg; |
118 | |
119 | typedef struct FdsetFdInfo FdsetFdInfo; |
120 | |
121 | typedef struct FdsetFdInfoList FdsetFdInfoList; |
122 | |
123 | typedef struct FdsetInfo FdsetInfo; |
124 | |
125 | typedef struct FdsetInfoList FdsetInfoList; |
126 | |
127 | typedef struct AcpiTableOptions AcpiTableOptions; |
128 | |
129 | typedef enum CommandLineParameterType { |
130 | COMMAND_LINE_PARAMETER_TYPE_STRING, |
131 | COMMAND_LINE_PARAMETER_TYPE_BOOLEAN, |
132 | COMMAND_LINE_PARAMETER_TYPE_NUMBER, |
133 | COMMAND_LINE_PARAMETER_TYPE_SIZE, |
134 | COMMAND_LINE_PARAMETER_TYPE__MAX, |
135 | } CommandLineParameterType; |
136 | |
137 | #define CommandLineParameterType_str(val) \ |
138 | qapi_enum_lookup(&CommandLineParameterType_lookup, (val)) |
139 | |
140 | extern const QEnumLookup CommandLineParameterType_lookup; |
141 | |
142 | typedef struct CommandLineParameterInfo CommandLineParameterInfo; |
143 | |
144 | typedef struct CommandLineParameterInfoList CommandLineParameterInfoList; |
145 | |
146 | typedef struct CommandLineOptionInfo CommandLineOptionInfo; |
147 | |
148 | typedef struct q_obj_query_command_line_options_arg q_obj_query_command_line_options_arg; |
149 | |
150 | typedef struct CommandLineOptionInfoList CommandLineOptionInfoList; |
151 | |
152 | typedef struct PCDIMMDeviceInfo PCDIMMDeviceInfo; |
153 | |
154 | typedef struct VirtioPMEMDeviceInfo VirtioPMEMDeviceInfo; |
155 | |
156 | typedef struct q_obj_PCDIMMDeviceInfo_wrapper q_obj_PCDIMMDeviceInfo_wrapper; |
157 | |
158 | typedef struct q_obj_VirtioPMEMDeviceInfo_wrapper q_obj_VirtioPMEMDeviceInfo_wrapper; |
159 | |
160 | typedef enum MemoryDeviceInfoKind { |
161 | MEMORY_DEVICE_INFO_KIND_DIMM, |
162 | MEMORY_DEVICE_INFO_KIND_NVDIMM, |
163 | MEMORY_DEVICE_INFO_KIND_VIRTIO_PMEM, |
164 | MEMORY_DEVICE_INFO_KIND__MAX, |
165 | } MemoryDeviceInfoKind; |
166 | |
167 | #define MemoryDeviceInfoKind_str(val) \ |
168 | qapi_enum_lookup(&MemoryDeviceInfoKind_lookup, (val)) |
169 | |
170 | extern const QEnumLookup MemoryDeviceInfoKind_lookup; |
171 | |
172 | typedef struct MemoryDeviceInfo MemoryDeviceInfo; |
173 | |
174 | typedef struct MemoryDeviceInfoList MemoryDeviceInfoList; |
175 | |
176 | typedef struct q_obj_MEM_UNPLUG_ERROR_arg q_obj_MEM_UNPLUG_ERROR_arg; |
177 | |
178 | typedef enum ACPISlotType { |
179 | ACPI_SLOT_TYPE_DIMM, |
180 | ACPI_SLOT_TYPE_CPU, |
181 | ACPI_SLOT_TYPE__MAX, |
182 | } ACPISlotType; |
183 | |
184 | #define ACPISlotType_str(val) \ |
185 | qapi_enum_lookup(&ACPISlotType_lookup, (val)) |
186 | |
187 | extern const QEnumLookup ACPISlotType_lookup; |
188 | |
189 | typedef struct ACPIOSTInfo ACPIOSTInfo; |
190 | |
191 | typedef struct ACPIOSTInfoList ACPIOSTInfoList; |
192 | |
193 | typedef struct q_obj_ACPI_DEVICE_OST_arg q_obj_ACPI_DEVICE_OST_arg; |
194 | |
195 | typedef enum ReplayMode { |
196 | REPLAY_MODE_NONE, |
197 | REPLAY_MODE_RECORD, |
198 | REPLAY_MODE_PLAY, |
199 | REPLAY_MODE__MAX, |
200 | } ReplayMode; |
201 | |
202 | #define ReplayMode_str(val) \ |
203 | qapi_enum_lookup(&ReplayMode_lookup, (val)) |
204 | |
205 | extern const QEnumLookup ReplayMode_lookup; |
206 | |
207 | typedef struct q_obj_xen_load_devices_state_arg q_obj_xen_load_devices_state_arg; |
208 | |
209 | typedef struct GuidInfo GuidInfo; |
210 | |
211 | struct QMPCapabilityList { |
212 | QMPCapabilityList *next; |
213 | QMPCapability value; |
214 | }; |
215 | |
216 | void qapi_free_QMPCapabilityList(QMPCapabilityList *obj); |
217 | |
218 | struct q_obj_qmp_capabilities_arg { |
219 | bool has_enable; |
220 | QMPCapabilityList *enable; |
221 | }; |
222 | |
223 | struct VersionTriple { |
224 | int64_t major; |
225 | int64_t minor; |
226 | int64_t micro; |
227 | }; |
228 | |
229 | void qapi_free_VersionTriple(VersionTriple *obj); |
230 | |
231 | struct VersionInfo { |
232 | VersionTriple *qemu; |
233 | char *package; |
234 | }; |
235 | |
236 | void qapi_free_VersionInfo(VersionInfo *obj); |
237 | |
238 | struct CommandInfo { |
239 | char *name; |
240 | }; |
241 | |
242 | void qapi_free_CommandInfo(CommandInfo *obj); |
243 | |
244 | struct CommandInfoList { |
245 | CommandInfoList *next; |
246 | CommandInfo *value; |
247 | }; |
248 | |
249 | void qapi_free_CommandInfoList(CommandInfoList *obj); |
250 | |
251 | struct q_obj_add_client_arg { |
252 | char *protocol; |
253 | char *fdname; |
254 | bool has_skipauth; |
255 | bool skipauth; |
256 | bool has_tls; |
257 | bool tls; |
258 | }; |
259 | |
260 | struct NameInfo { |
261 | bool has_name; |
262 | char *name; |
263 | }; |
264 | |
265 | void qapi_free_NameInfo(NameInfo *obj); |
266 | |
267 | struct KvmInfo { |
268 | bool enabled; |
269 | bool present; |
270 | }; |
271 | |
272 | void qapi_free_KvmInfo(KvmInfo *obj); |
273 | |
274 | struct UuidInfo { |
275 | char *UUID; |
276 | }; |
277 | |
278 | void qapi_free_UuidInfo(UuidInfo *obj); |
279 | |
280 | struct EventInfo { |
281 | char *name; |
282 | }; |
283 | |
284 | void qapi_free_EventInfo(EventInfo *obj); |
285 | |
286 | struct EventInfoList { |
287 | EventInfoList *next; |
288 | EventInfo *value; |
289 | }; |
290 | |
291 | void qapi_free_EventInfoList(EventInfoList *obj); |
292 | |
293 | struct IOThreadInfo { |
294 | char *id; |
295 | int64_t thread_id; |
296 | int64_t poll_max_ns; |
297 | int64_t poll_grow; |
298 | int64_t poll_shrink; |
299 | }; |
300 | |
301 | void qapi_free_IOThreadInfo(IOThreadInfo *obj); |
302 | |
303 | struct IOThreadInfoList { |
304 | IOThreadInfoList *next; |
305 | IOThreadInfo *value; |
306 | }; |
307 | |
308 | void qapi_free_IOThreadInfoList(IOThreadInfoList *obj); |
309 | |
310 | struct BalloonInfo { |
311 | int64_t actual; |
312 | }; |
313 | |
314 | void qapi_free_BalloonInfo(BalloonInfo *obj); |
315 | |
316 | struct q_obj_BALLOON_CHANGE_arg { |
317 | int64_t actual; |
318 | }; |
319 | |
320 | struct PciMemoryRange { |
321 | int64_t base; |
322 | int64_t limit; |
323 | }; |
324 | |
325 | void qapi_free_PciMemoryRange(PciMemoryRange *obj); |
326 | |
327 | struct PciMemoryRegion { |
328 | int64_t bar; |
329 | char *type; |
330 | int64_t address; |
331 | int64_t size; |
332 | bool has_prefetch; |
333 | bool prefetch; |
334 | bool has_mem_type_64; |
335 | bool mem_type_64; |
336 | }; |
337 | |
338 | void qapi_free_PciMemoryRegion(PciMemoryRegion *obj); |
339 | |
340 | struct PciBusInfo { |
341 | int64_t number; |
342 | int64_t secondary; |
343 | int64_t subordinate; |
344 | PciMemoryRange *io_range; |
345 | PciMemoryRange *memory_range; |
346 | PciMemoryRange *prefetchable_range; |
347 | }; |
348 | |
349 | void qapi_free_PciBusInfo(PciBusInfo *obj); |
350 | |
351 | struct PciDeviceInfoList { |
352 | PciDeviceInfoList *next; |
353 | PciDeviceInfo *value; |
354 | }; |
355 | |
356 | void qapi_free_PciDeviceInfoList(PciDeviceInfoList *obj); |
357 | |
358 | struct PciBridgeInfo { |
359 | PciBusInfo *bus; |
360 | bool has_devices; |
361 | PciDeviceInfoList *devices; |
362 | }; |
363 | |
364 | void qapi_free_PciBridgeInfo(PciBridgeInfo *obj); |
365 | |
366 | struct PciDeviceClass { |
367 | bool has_desc; |
368 | char *desc; |
369 | int64_t q_class; |
370 | }; |
371 | |
372 | void qapi_free_PciDeviceClass(PciDeviceClass *obj); |
373 | |
374 | struct PciDeviceId { |
375 | int64_t device; |
376 | int64_t vendor; |
377 | bool has_subsystem; |
378 | int64_t subsystem; |
379 | bool has_subsystem_vendor; |
380 | int64_t subsystem_vendor; |
381 | }; |
382 | |
383 | void qapi_free_PciDeviceId(PciDeviceId *obj); |
384 | |
385 | struct PciMemoryRegionList { |
386 | PciMemoryRegionList *next; |
387 | PciMemoryRegion *value; |
388 | }; |
389 | |
390 | void qapi_free_PciMemoryRegionList(PciMemoryRegionList *obj); |
391 | |
392 | struct PciDeviceInfo { |
393 | int64_t bus; |
394 | int64_t slot; |
395 | int64_t function; |
396 | PciDeviceClass *class_info; |
397 | PciDeviceId *id; |
398 | bool has_irq; |
399 | int64_t irq; |
400 | char *qdev_id; |
401 | bool has_pci_bridge; |
402 | PciBridgeInfo *pci_bridge; |
403 | PciMemoryRegionList *regions; |
404 | }; |
405 | |
406 | void qapi_free_PciDeviceInfo(PciDeviceInfo *obj); |
407 | |
408 | struct PciInfo { |
409 | int64_t bus; |
410 | PciDeviceInfoList *devices; |
411 | }; |
412 | |
413 | void qapi_free_PciInfo(PciInfo *obj); |
414 | |
415 | struct PciInfoList { |
416 | PciInfoList *next; |
417 | PciInfo *value; |
418 | }; |
419 | |
420 | void qapi_free_PciInfoList(PciInfoList *obj); |
421 | |
422 | struct q_obj_memsave_arg { |
423 | int64_t val; |
424 | int64_t size; |
425 | char *filename; |
426 | bool has_cpu_index; |
427 | int64_t cpu_index; |
428 | }; |
429 | |
430 | struct q_obj_pmemsave_arg { |
431 | int64_t val; |
432 | int64_t size; |
433 | char *filename; |
434 | }; |
435 | |
436 | struct q_obj_balloon_arg { |
437 | int64_t value; |
438 | }; |
439 | |
440 | struct q_obj_human_monitor_command_arg { |
441 | char *command_line; |
442 | bool has_cpu_index; |
443 | int64_t cpu_index; |
444 | }; |
445 | |
446 | struct q_obj_change_arg { |
447 | char *device; |
448 | char *target; |
449 | bool has_arg; |
450 | char *arg; |
451 | }; |
452 | |
453 | struct q_obj_xen_set_global_dirty_log_arg { |
454 | bool enable; |
455 | }; |
456 | |
457 | struct q_obj_getfd_arg { |
458 | char *fdname; |
459 | }; |
460 | |
461 | struct q_obj_closefd_arg { |
462 | char *fdname; |
463 | }; |
464 | |
465 | struct MemoryInfo { |
466 | uint64_t base_memory; |
467 | bool has_plugged_memory; |
468 | uint64_t plugged_memory; |
469 | }; |
470 | |
471 | void qapi_free_MemoryInfo(MemoryInfo *obj); |
472 | |
473 | struct AddfdInfo { |
474 | int64_t fdset_id; |
475 | int64_t fd; |
476 | }; |
477 | |
478 | void qapi_free_AddfdInfo(AddfdInfo *obj); |
479 | |
480 | struct q_obj_add_fd_arg { |
481 | bool has_fdset_id; |
482 | int64_t fdset_id; |
483 | bool has_opaque; |
484 | char *opaque; |
485 | }; |
486 | |
487 | struct q_obj_remove_fd_arg { |
488 | int64_t fdset_id; |
489 | bool has_fd; |
490 | int64_t fd; |
491 | }; |
492 | |
493 | struct FdsetFdInfo { |
494 | int64_t fd; |
495 | bool has_opaque; |
496 | char *opaque; |
497 | }; |
498 | |
499 | void qapi_free_FdsetFdInfo(FdsetFdInfo *obj); |
500 | |
501 | struct FdsetFdInfoList { |
502 | FdsetFdInfoList *next; |
503 | FdsetFdInfo *value; |
504 | }; |
505 | |
506 | void qapi_free_FdsetFdInfoList(FdsetFdInfoList *obj); |
507 | |
508 | struct FdsetInfo { |
509 | int64_t fdset_id; |
510 | FdsetFdInfoList *fds; |
511 | }; |
512 | |
513 | void qapi_free_FdsetInfo(FdsetInfo *obj); |
514 | |
515 | struct FdsetInfoList { |
516 | FdsetInfoList *next; |
517 | FdsetInfo *value; |
518 | }; |
519 | |
520 | void qapi_free_FdsetInfoList(FdsetInfoList *obj); |
521 | |
522 | struct AcpiTableOptions { |
523 | bool has_sig; |
524 | char *sig; |
525 | bool has_rev; |
526 | uint8_t rev; |
527 | bool has_oem_id; |
528 | char *oem_id; |
529 | bool has_oem_table_id; |
530 | char *oem_table_id; |
531 | bool has_oem_rev; |
532 | uint32_t oem_rev; |
533 | bool has_asl_compiler_id; |
534 | char *asl_compiler_id; |
535 | bool has_asl_compiler_rev; |
536 | uint32_t asl_compiler_rev; |
537 | bool has_file; |
538 | char *file; |
539 | bool has_data; |
540 | char *data; |
541 | }; |
542 | |
543 | void qapi_free_AcpiTableOptions(AcpiTableOptions *obj); |
544 | |
545 | struct CommandLineParameterInfo { |
546 | char *name; |
547 | CommandLineParameterType type; |
548 | bool has_help; |
549 | char *help; |
550 | bool has_q_default; |
551 | char *q_default; |
552 | }; |
553 | |
554 | void qapi_free_CommandLineParameterInfo(CommandLineParameterInfo *obj); |
555 | |
556 | struct CommandLineParameterInfoList { |
557 | CommandLineParameterInfoList *next; |
558 | CommandLineParameterInfo *value; |
559 | }; |
560 | |
561 | void qapi_free_CommandLineParameterInfoList(CommandLineParameterInfoList *obj); |
562 | |
563 | struct CommandLineOptionInfo { |
564 | char *option; |
565 | CommandLineParameterInfoList *parameters; |
566 | }; |
567 | |
568 | void qapi_free_CommandLineOptionInfo(CommandLineOptionInfo *obj); |
569 | |
570 | struct q_obj_query_command_line_options_arg { |
571 | bool has_option; |
572 | char *option; |
573 | }; |
574 | |
575 | struct CommandLineOptionInfoList { |
576 | CommandLineOptionInfoList *next; |
577 | CommandLineOptionInfo *value; |
578 | }; |
579 | |
580 | void qapi_free_CommandLineOptionInfoList(CommandLineOptionInfoList *obj); |
581 | |
582 | struct PCDIMMDeviceInfo { |
583 | bool has_id; |
584 | char *id; |
585 | int64_t addr; |
586 | int64_t size; |
587 | int64_t slot; |
588 | int64_t node; |
589 | char *memdev; |
590 | bool hotplugged; |
591 | bool hotpluggable; |
592 | }; |
593 | |
594 | void qapi_free_PCDIMMDeviceInfo(PCDIMMDeviceInfo *obj); |
595 | |
596 | struct VirtioPMEMDeviceInfo { |
597 | bool has_id; |
598 | char *id; |
599 | uint64_t memaddr; |
600 | uint64_t size; |
601 | char *memdev; |
602 | }; |
603 | |
604 | void qapi_free_VirtioPMEMDeviceInfo(VirtioPMEMDeviceInfo *obj); |
605 | |
606 | struct q_obj_PCDIMMDeviceInfo_wrapper { |
607 | PCDIMMDeviceInfo *data; |
608 | }; |
609 | |
610 | struct q_obj_VirtioPMEMDeviceInfo_wrapper { |
611 | VirtioPMEMDeviceInfo *data; |
612 | }; |
613 | |
614 | struct MemoryDeviceInfo { |
615 | MemoryDeviceInfoKind type; |
616 | union { /* union tag is @type */ |
617 | q_obj_PCDIMMDeviceInfo_wrapper dimm; |
618 | q_obj_PCDIMMDeviceInfo_wrapper nvdimm; |
619 | q_obj_VirtioPMEMDeviceInfo_wrapper virtio_pmem; |
620 | } u; |
621 | }; |
622 | |
623 | void qapi_free_MemoryDeviceInfo(MemoryDeviceInfo *obj); |
624 | |
625 | struct MemoryDeviceInfoList { |
626 | MemoryDeviceInfoList *next; |
627 | MemoryDeviceInfo *value; |
628 | }; |
629 | |
630 | void qapi_free_MemoryDeviceInfoList(MemoryDeviceInfoList *obj); |
631 | |
632 | struct q_obj_MEM_UNPLUG_ERROR_arg { |
633 | char *device; |
634 | char *msg; |
635 | }; |
636 | |
637 | struct ACPIOSTInfo { |
638 | bool has_device; |
639 | char *device; |
640 | char *slot; |
641 | ACPISlotType slot_type; |
642 | int64_t source; |
643 | int64_t status; |
644 | }; |
645 | |
646 | void qapi_free_ACPIOSTInfo(ACPIOSTInfo *obj); |
647 | |
648 | struct ACPIOSTInfoList { |
649 | ACPIOSTInfoList *next; |
650 | ACPIOSTInfo *value; |
651 | }; |
652 | |
653 | void qapi_free_ACPIOSTInfoList(ACPIOSTInfoList *obj); |
654 | |
655 | struct q_obj_ACPI_DEVICE_OST_arg { |
656 | ACPIOSTInfo *info; |
657 | }; |
658 | |
659 | struct q_obj_xen_load_devices_state_arg { |
660 | char *filename; |
661 | }; |
662 | |
663 | struct GuidInfo { |
664 | char *guid; |
665 | }; |
666 | |
667 | void qapi_free_GuidInfo(GuidInfo *obj); |
668 | |
669 | #endif /* QAPI_TYPES_MISC_H */ |
670 | |