1/* AUTOMATICALLY GENERATED, DO NOT MODIFY */
2
3/*
4 * Schema-defined QAPI/QMP commands
5 *
6 * Copyright IBM, Corp. 2011
7 * Copyright (C) 2014-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#include "qemu/osdep.h"
14#include "qapi/visitor.h"
15#include "qapi/qmp/qdict.h"
16#include "qapi/qobject-output-visitor.h"
17#include "qapi/qobject-input-visitor.h"
18#include "qapi/dealloc-visitor.h"
19#include "qapi/error.h"
20#include "qapi-visit-misc-target.h"
21#include "qapi-commands-misc-target.h"
22
23
24#if defined(TARGET_I386)
25void qmp_marshal_rtc_reset_reinjection(QDict *args, QObject **ret, Error **errp)
26{
27 Error *err = NULL;
28 Visitor *v = NULL;
29
30 if (args) {
31 v = qobject_input_visitor_new(QOBJECT(args));
32 visit_start_struct(v, NULL, NULL, 0, &err);
33 if (err) {
34 goto out;
35 }
36
37 if (!err) {
38 visit_check_struct(v, &err);
39 }
40 visit_end_struct(v, NULL);
41 if (err) {
42 goto out;
43 }
44 }
45
46 qmp_rtc_reset_reinjection(&err);
47
48out:
49 error_propagate(errp, err);
50 visit_free(v);
51 if (args) {
52 v = qapi_dealloc_visitor_new();
53 visit_start_struct(v, NULL, NULL, 0, NULL);
54
55 visit_end_struct(v, NULL);
56 visit_free(v);
57 }
58}
59#endif /* defined(TARGET_I386) */
60
61#if defined(TARGET_I386)
62static void qmp_marshal_output_SevInfo(SevInfo *ret_in, QObject **ret_out, Error **errp)
63{
64 Error *err = NULL;
65 Visitor *v;
66
67 v = qobject_output_visitor_new(ret_out);
68 visit_type_SevInfo(v, "unused", &ret_in, &err);
69 if (!err) {
70 visit_complete(v, ret_out);
71 }
72 error_propagate(errp, err);
73 visit_free(v);
74 v = qapi_dealloc_visitor_new();
75 visit_type_SevInfo(v, "unused", &ret_in, NULL);
76 visit_free(v);
77}
78#endif /* defined(TARGET_I386) */
79
80#if defined(TARGET_I386)
81void qmp_marshal_query_sev(QDict *args, QObject **ret, Error **errp)
82{
83 Error *err = NULL;
84 SevInfo *retval;
85 Visitor *v = NULL;
86
87 if (args) {
88 v = qobject_input_visitor_new(QOBJECT(args));
89 visit_start_struct(v, NULL, NULL, 0, &err);
90 if (err) {
91 goto out;
92 }
93
94 if (!err) {
95 visit_check_struct(v, &err);
96 }
97 visit_end_struct(v, NULL);
98 if (err) {
99 goto out;
100 }
101 }
102
103 retval = qmp_query_sev(&err);
104 if (err) {
105 goto out;
106 }
107
108 qmp_marshal_output_SevInfo(retval, ret, &err);
109
110out:
111 error_propagate(errp, err);
112 visit_free(v);
113 if (args) {
114 v = qapi_dealloc_visitor_new();
115 visit_start_struct(v, NULL, NULL, 0, NULL);
116
117 visit_end_struct(v, NULL);
118 visit_free(v);
119 }
120}
121#endif /* defined(TARGET_I386) */
122
123#if defined(TARGET_I386)
124static void qmp_marshal_output_SevLaunchMeasureInfo(SevLaunchMeasureInfo *ret_in, QObject **ret_out, Error **errp)
125{
126 Error *err = NULL;
127 Visitor *v;
128
129 v = qobject_output_visitor_new(ret_out);
130 visit_type_SevLaunchMeasureInfo(v, "unused", &ret_in, &err);
131 if (!err) {
132 visit_complete(v, ret_out);
133 }
134 error_propagate(errp, err);
135 visit_free(v);
136 v = qapi_dealloc_visitor_new();
137 visit_type_SevLaunchMeasureInfo(v, "unused", &ret_in, NULL);
138 visit_free(v);
139}
140#endif /* defined(TARGET_I386) */
141
142#if defined(TARGET_I386)
143void qmp_marshal_query_sev_launch_measure(QDict *args, QObject **ret, Error **errp)
144{
145 Error *err = NULL;
146 SevLaunchMeasureInfo *retval;
147 Visitor *v = NULL;
148
149 if (args) {
150 v = qobject_input_visitor_new(QOBJECT(args));
151 visit_start_struct(v, NULL, NULL, 0, &err);
152 if (err) {
153 goto out;
154 }
155
156 if (!err) {
157 visit_check_struct(v, &err);
158 }
159 visit_end_struct(v, NULL);
160 if (err) {
161 goto out;
162 }
163 }
164
165 retval = qmp_query_sev_launch_measure(&err);
166 if (err) {
167 goto out;
168 }
169
170 qmp_marshal_output_SevLaunchMeasureInfo(retval, ret, &err);
171
172out:
173 error_propagate(errp, err);
174 visit_free(v);
175 if (args) {
176 v = qapi_dealloc_visitor_new();
177 visit_start_struct(v, NULL, NULL, 0, NULL);
178
179 visit_end_struct(v, NULL);
180 visit_free(v);
181 }
182}
183#endif /* defined(TARGET_I386) */
184
185#if defined(TARGET_I386)
186static void qmp_marshal_output_SevCapability(SevCapability *ret_in, QObject **ret_out, Error **errp)
187{
188 Error *err = NULL;
189 Visitor *v;
190
191 v = qobject_output_visitor_new(ret_out);
192 visit_type_SevCapability(v, "unused", &ret_in, &err);
193 if (!err) {
194 visit_complete(v, ret_out);
195 }
196 error_propagate(errp, err);
197 visit_free(v);
198 v = qapi_dealloc_visitor_new();
199 visit_type_SevCapability(v, "unused", &ret_in, NULL);
200 visit_free(v);
201}
202#endif /* defined(TARGET_I386) */
203
204#if defined(TARGET_I386)
205void qmp_marshal_query_sev_capabilities(QDict *args, QObject **ret, Error **errp)
206{
207 Error *err = NULL;
208 SevCapability *retval;
209 Visitor *v = NULL;
210
211 if (args) {
212 v = qobject_input_visitor_new(QOBJECT(args));
213 visit_start_struct(v, NULL, NULL, 0, &err);
214 if (err) {
215 goto out;
216 }
217
218 if (!err) {
219 visit_check_struct(v, &err);
220 }
221 visit_end_struct(v, NULL);
222 if (err) {
223 goto out;
224 }
225 }
226
227 retval = qmp_query_sev_capabilities(&err);
228 if (err) {
229 goto out;
230 }
231
232 qmp_marshal_output_SevCapability(retval, ret, &err);
233
234out:
235 error_propagate(errp, err);
236 visit_free(v);
237 if (args) {
238 v = qapi_dealloc_visitor_new();
239 visit_start_struct(v, NULL, NULL, 0, NULL);
240
241 visit_end_struct(v, NULL);
242 visit_free(v);
243 }
244}
245#endif /* defined(TARGET_I386) */
246
247#if defined(TARGET_S390X)
248void qmp_marshal_dump_skeys(QDict *args, QObject **ret, Error **errp)
249{
250 Error *err = NULL;
251 Visitor *v;
252 q_obj_dump_skeys_arg arg = {0};
253
254 v = qobject_input_visitor_new(QOBJECT(args));
255 visit_start_struct(v, NULL, NULL, 0, &err);
256 if (err) {
257 goto out;
258 }
259 visit_type_q_obj_dump_skeys_arg_members(v, &arg, &err);
260 if (!err) {
261 visit_check_struct(v, &err);
262 }
263 visit_end_struct(v, NULL);
264 if (err) {
265 goto out;
266 }
267
268 qmp_dump_skeys(arg.filename, &err);
269
270out:
271 error_propagate(errp, err);
272 visit_free(v);
273 v = qapi_dealloc_visitor_new();
274 visit_start_struct(v, NULL, NULL, 0, NULL);
275 visit_type_q_obj_dump_skeys_arg_members(v, &arg, NULL);
276 visit_end_struct(v, NULL);
277 visit_free(v);
278}
279#endif /* defined(TARGET_S390X) */
280
281#if defined(TARGET_ARM)
282static void qmp_marshal_output_GICCapabilityList(GICCapabilityList *ret_in, QObject **ret_out, Error **errp)
283{
284 Error *err = NULL;
285 Visitor *v;
286
287 v = qobject_output_visitor_new(ret_out);
288 visit_type_GICCapabilityList(v, "unused", &ret_in, &err);
289 if (!err) {
290 visit_complete(v, ret_out);
291 }
292 error_propagate(errp, err);
293 visit_free(v);
294 v = qapi_dealloc_visitor_new();
295 visit_type_GICCapabilityList(v, "unused", &ret_in, NULL);
296 visit_free(v);
297}
298#endif /* defined(TARGET_ARM) */
299
300#if defined(TARGET_ARM)
301void qmp_marshal_query_gic_capabilities(QDict *args, QObject **ret, Error **errp)
302{
303 Error *err = NULL;
304 GICCapabilityList *retval;
305 Visitor *v = NULL;
306
307 if (args) {
308 v = qobject_input_visitor_new(QOBJECT(args));
309 visit_start_struct(v, NULL, NULL, 0, &err);
310 if (err) {
311 goto out;
312 }
313
314 if (!err) {
315 visit_check_struct(v, &err);
316 }
317 visit_end_struct(v, NULL);
318 if (err) {
319 goto out;
320 }
321 }
322
323 retval = qmp_query_gic_capabilities(&err);
324 if (err) {
325 goto out;
326 }
327
328 qmp_marshal_output_GICCapabilityList(retval, ret, &err);
329
330out:
331 error_propagate(errp, err);
332 visit_free(v);
333 if (args) {
334 v = qapi_dealloc_visitor_new();
335 visit_start_struct(v, NULL, NULL, 0, NULL);
336
337 visit_end_struct(v, NULL);
338 visit_free(v);
339 }
340}
341#endif /* defined(TARGET_ARM) */
342
343/* Dummy declaration to prevent empty .o file */
344char qapi_dummy_qapi_commands_misc_target_c;
345