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
19typedef struct QMPCapabilityList QMPCapabilityList;
20
21typedef struct q_obj_qmp_capabilities_arg q_obj_qmp_capabilities_arg;
22
23typedef 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
31extern const QEnumLookup QMPCapability_lookup;
32
33typedef struct VersionTriple VersionTriple;
34
35typedef struct VersionInfo VersionInfo;
36
37typedef struct CommandInfo CommandInfo;
38
39typedef struct CommandInfoList CommandInfoList;
40
41typedef 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
51extern const QEnumLookup LostTickPolicy_lookup;
52
53typedef struct q_obj_add_client_arg q_obj_add_client_arg;
54
55typedef struct NameInfo NameInfo;
56
57typedef struct KvmInfo KvmInfo;
58
59typedef struct UuidInfo UuidInfo;
60
61typedef struct EventInfo EventInfo;
62
63typedef struct EventInfoList EventInfoList;
64
65typedef struct IOThreadInfo IOThreadInfo;
66
67typedef struct IOThreadInfoList IOThreadInfoList;
68
69typedef struct BalloonInfo BalloonInfo;
70
71typedef struct q_obj_BALLOON_CHANGE_arg q_obj_BALLOON_CHANGE_arg;
72
73typedef struct PciMemoryRange PciMemoryRange;
74
75typedef struct PciMemoryRegion PciMemoryRegion;
76
77typedef struct PciBusInfo PciBusInfo;
78
79typedef struct PciDeviceInfoList PciDeviceInfoList;
80
81typedef struct PciBridgeInfo PciBridgeInfo;
82
83typedef struct PciDeviceClass PciDeviceClass;
84
85typedef struct PciDeviceId PciDeviceId;
86
87typedef struct PciMemoryRegionList PciMemoryRegionList;
88
89typedef struct PciDeviceInfo PciDeviceInfo;
90
91typedef struct PciInfo PciInfo;
92
93typedef struct PciInfoList PciInfoList;
94
95typedef struct q_obj_memsave_arg q_obj_memsave_arg;
96
97typedef struct q_obj_pmemsave_arg q_obj_pmemsave_arg;
98
99typedef struct q_obj_balloon_arg q_obj_balloon_arg;
100
101typedef struct q_obj_human_monitor_command_arg q_obj_human_monitor_command_arg;
102
103typedef struct q_obj_change_arg q_obj_change_arg;
104
105typedef struct q_obj_xen_set_global_dirty_log_arg q_obj_xen_set_global_dirty_log_arg;
106
107typedef struct q_obj_getfd_arg q_obj_getfd_arg;
108
109typedef struct q_obj_closefd_arg q_obj_closefd_arg;
110
111typedef struct MemoryInfo MemoryInfo;
112
113typedef struct AddfdInfo AddfdInfo;
114
115typedef struct q_obj_add_fd_arg q_obj_add_fd_arg;
116
117typedef struct q_obj_remove_fd_arg q_obj_remove_fd_arg;
118
119typedef struct FdsetFdInfo FdsetFdInfo;
120
121typedef struct FdsetFdInfoList FdsetFdInfoList;
122
123typedef struct FdsetInfo FdsetInfo;
124
125typedef struct FdsetInfoList FdsetInfoList;
126
127typedef struct AcpiTableOptions AcpiTableOptions;
128
129typedef 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
140extern const QEnumLookup CommandLineParameterType_lookup;
141
142typedef struct CommandLineParameterInfo CommandLineParameterInfo;
143
144typedef struct CommandLineParameterInfoList CommandLineParameterInfoList;
145
146typedef struct CommandLineOptionInfo CommandLineOptionInfo;
147
148typedef struct q_obj_query_command_line_options_arg q_obj_query_command_line_options_arg;
149
150typedef struct CommandLineOptionInfoList CommandLineOptionInfoList;
151
152typedef struct PCDIMMDeviceInfo PCDIMMDeviceInfo;
153
154typedef struct VirtioPMEMDeviceInfo VirtioPMEMDeviceInfo;
155
156typedef struct q_obj_PCDIMMDeviceInfo_wrapper q_obj_PCDIMMDeviceInfo_wrapper;
157
158typedef struct q_obj_VirtioPMEMDeviceInfo_wrapper q_obj_VirtioPMEMDeviceInfo_wrapper;
159
160typedef 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
170extern const QEnumLookup MemoryDeviceInfoKind_lookup;
171
172typedef struct MemoryDeviceInfo MemoryDeviceInfo;
173
174typedef struct MemoryDeviceInfoList MemoryDeviceInfoList;
175
176typedef struct q_obj_MEM_UNPLUG_ERROR_arg q_obj_MEM_UNPLUG_ERROR_arg;
177
178typedef 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
187extern const QEnumLookup ACPISlotType_lookup;
188
189typedef struct ACPIOSTInfo ACPIOSTInfo;
190
191typedef struct ACPIOSTInfoList ACPIOSTInfoList;
192
193typedef struct q_obj_ACPI_DEVICE_OST_arg q_obj_ACPI_DEVICE_OST_arg;
194
195typedef 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
205extern const QEnumLookup ReplayMode_lookup;
206
207typedef struct q_obj_xen_load_devices_state_arg q_obj_xen_load_devices_state_arg;
208
209typedef struct GuidInfo GuidInfo;
210
211struct QMPCapabilityList {
212 QMPCapabilityList *next;
213 QMPCapability value;
214};
215
216void qapi_free_QMPCapabilityList(QMPCapabilityList *obj);
217
218struct q_obj_qmp_capabilities_arg {
219 bool has_enable;
220 QMPCapabilityList *enable;
221};
222
223struct VersionTriple {
224 int64_t major;
225 int64_t minor;
226 int64_t micro;
227};
228
229void qapi_free_VersionTriple(VersionTriple *obj);
230
231struct VersionInfo {
232 VersionTriple *qemu;
233 char *package;
234};
235
236void qapi_free_VersionInfo(VersionInfo *obj);
237
238struct CommandInfo {
239 char *name;
240};
241
242void qapi_free_CommandInfo(CommandInfo *obj);
243
244struct CommandInfoList {
245 CommandInfoList *next;
246 CommandInfo *value;
247};
248
249void qapi_free_CommandInfoList(CommandInfoList *obj);
250
251struct 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
260struct NameInfo {
261 bool has_name;
262 char *name;
263};
264
265void qapi_free_NameInfo(NameInfo *obj);
266
267struct KvmInfo {
268 bool enabled;
269 bool present;
270};
271
272void qapi_free_KvmInfo(KvmInfo *obj);
273
274struct UuidInfo {
275 char *UUID;
276};
277
278void qapi_free_UuidInfo(UuidInfo *obj);
279
280struct EventInfo {
281 char *name;
282};
283
284void qapi_free_EventInfo(EventInfo *obj);
285
286struct EventInfoList {
287 EventInfoList *next;
288 EventInfo *value;
289};
290
291void qapi_free_EventInfoList(EventInfoList *obj);
292
293struct 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
301void qapi_free_IOThreadInfo(IOThreadInfo *obj);
302
303struct IOThreadInfoList {
304 IOThreadInfoList *next;
305 IOThreadInfo *value;
306};
307
308void qapi_free_IOThreadInfoList(IOThreadInfoList *obj);
309
310struct BalloonInfo {
311 int64_t actual;
312};
313
314void qapi_free_BalloonInfo(BalloonInfo *obj);
315
316struct q_obj_BALLOON_CHANGE_arg {
317 int64_t actual;
318};
319
320struct PciMemoryRange {
321 int64_t base;
322 int64_t limit;
323};
324
325void qapi_free_PciMemoryRange(PciMemoryRange *obj);
326
327struct 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
338void qapi_free_PciMemoryRegion(PciMemoryRegion *obj);
339
340struct 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
349void qapi_free_PciBusInfo(PciBusInfo *obj);
350
351struct PciDeviceInfoList {
352 PciDeviceInfoList *next;
353 PciDeviceInfo *value;
354};
355
356void qapi_free_PciDeviceInfoList(PciDeviceInfoList *obj);
357
358struct PciBridgeInfo {
359 PciBusInfo *bus;
360 bool has_devices;
361 PciDeviceInfoList *devices;
362};
363
364void qapi_free_PciBridgeInfo(PciBridgeInfo *obj);
365
366struct PciDeviceClass {
367 bool has_desc;
368 char *desc;
369 int64_t q_class;
370};
371
372void qapi_free_PciDeviceClass(PciDeviceClass *obj);
373
374struct 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
383void qapi_free_PciDeviceId(PciDeviceId *obj);
384
385struct PciMemoryRegionList {
386 PciMemoryRegionList *next;
387 PciMemoryRegion *value;
388};
389
390void qapi_free_PciMemoryRegionList(PciMemoryRegionList *obj);
391
392struct 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
406void qapi_free_PciDeviceInfo(PciDeviceInfo *obj);
407
408struct PciInfo {
409 int64_t bus;
410 PciDeviceInfoList *devices;
411};
412
413void qapi_free_PciInfo(PciInfo *obj);
414
415struct PciInfoList {
416 PciInfoList *next;
417 PciInfo *value;
418};
419
420void qapi_free_PciInfoList(PciInfoList *obj);
421
422struct 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
430struct q_obj_pmemsave_arg {
431 int64_t val;
432 int64_t size;
433 char *filename;
434};
435
436struct q_obj_balloon_arg {
437 int64_t value;
438};
439
440struct q_obj_human_monitor_command_arg {
441 char *command_line;
442 bool has_cpu_index;
443 int64_t cpu_index;
444};
445
446struct q_obj_change_arg {
447 char *device;
448 char *target;
449 bool has_arg;
450 char *arg;
451};
452
453struct q_obj_xen_set_global_dirty_log_arg {
454 bool enable;
455};
456
457struct q_obj_getfd_arg {
458 char *fdname;
459};
460
461struct q_obj_closefd_arg {
462 char *fdname;
463};
464
465struct MemoryInfo {
466 uint64_t base_memory;
467 bool has_plugged_memory;
468 uint64_t plugged_memory;
469};
470
471void qapi_free_MemoryInfo(MemoryInfo *obj);
472
473struct AddfdInfo {
474 int64_t fdset_id;
475 int64_t fd;
476};
477
478void qapi_free_AddfdInfo(AddfdInfo *obj);
479
480struct q_obj_add_fd_arg {
481 bool has_fdset_id;
482 int64_t fdset_id;
483 bool has_opaque;
484 char *opaque;
485};
486
487struct q_obj_remove_fd_arg {
488 int64_t fdset_id;
489 bool has_fd;
490 int64_t fd;
491};
492
493struct FdsetFdInfo {
494 int64_t fd;
495 bool has_opaque;
496 char *opaque;
497};
498
499void qapi_free_FdsetFdInfo(FdsetFdInfo *obj);
500
501struct FdsetFdInfoList {
502 FdsetFdInfoList *next;
503 FdsetFdInfo *value;
504};
505
506void qapi_free_FdsetFdInfoList(FdsetFdInfoList *obj);
507
508struct FdsetInfo {
509 int64_t fdset_id;
510 FdsetFdInfoList *fds;
511};
512
513void qapi_free_FdsetInfo(FdsetInfo *obj);
514
515struct FdsetInfoList {
516 FdsetInfoList *next;
517 FdsetInfo *value;
518};
519
520void qapi_free_FdsetInfoList(FdsetInfoList *obj);
521
522struct 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
543void qapi_free_AcpiTableOptions(AcpiTableOptions *obj);
544
545struct 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
554void qapi_free_CommandLineParameterInfo(CommandLineParameterInfo *obj);
555
556struct CommandLineParameterInfoList {
557 CommandLineParameterInfoList *next;
558 CommandLineParameterInfo *value;
559};
560
561void qapi_free_CommandLineParameterInfoList(CommandLineParameterInfoList *obj);
562
563struct CommandLineOptionInfo {
564 char *option;
565 CommandLineParameterInfoList *parameters;
566};
567
568void qapi_free_CommandLineOptionInfo(CommandLineOptionInfo *obj);
569
570struct q_obj_query_command_line_options_arg {
571 bool has_option;
572 char *option;
573};
574
575struct CommandLineOptionInfoList {
576 CommandLineOptionInfoList *next;
577 CommandLineOptionInfo *value;
578};
579
580void qapi_free_CommandLineOptionInfoList(CommandLineOptionInfoList *obj);
581
582struct 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
594void qapi_free_PCDIMMDeviceInfo(PCDIMMDeviceInfo *obj);
595
596struct VirtioPMEMDeviceInfo {
597 bool has_id;
598 char *id;
599 uint64_t memaddr;
600 uint64_t size;
601 char *memdev;
602};
603
604void qapi_free_VirtioPMEMDeviceInfo(VirtioPMEMDeviceInfo *obj);
605
606struct q_obj_PCDIMMDeviceInfo_wrapper {
607 PCDIMMDeviceInfo *data;
608};
609
610struct q_obj_VirtioPMEMDeviceInfo_wrapper {
611 VirtioPMEMDeviceInfo *data;
612};
613
614struct 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
623void qapi_free_MemoryDeviceInfo(MemoryDeviceInfo *obj);
624
625struct MemoryDeviceInfoList {
626 MemoryDeviceInfoList *next;
627 MemoryDeviceInfo *value;
628};
629
630void qapi_free_MemoryDeviceInfoList(MemoryDeviceInfoList *obj);
631
632struct q_obj_MEM_UNPLUG_ERROR_arg {
633 char *device;
634 char *msg;
635};
636
637struct 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
646void qapi_free_ACPIOSTInfo(ACPIOSTInfo *obj);
647
648struct ACPIOSTInfoList {
649 ACPIOSTInfoList *next;
650 ACPIOSTInfo *value;
651};
652
653void qapi_free_ACPIOSTInfoList(ACPIOSTInfoList *obj);
654
655struct q_obj_ACPI_DEVICE_OST_arg {
656 ACPIOSTInfo *info;
657};
658
659struct q_obj_xen_load_devices_state_arg {
660 char *filename;
661};
662
663struct GuidInfo {
664 char *guid;
665};
666
667void qapi_free_GuidInfo(GuidInfo *obj);
668
669#endif /* QAPI_TYPES_MISC_H */
670