/* AUTOMATICALLY GENERATED by qapi-gen.py DO NOT MODIFY */

/*
 * Schema-defined QAPI types
 *
 * Copyright IBM, Corp. 2011
 * Copyright (c) 2013-2018 Red Hat Inc.
 *
 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
 * See the COPYING.LIB file in the top-level directory.
 */

#ifndef QAPI_TYPES_ACCELERATOR_H
#define QAPI_TYPES_ACCELERATOR_H

#include "qapi/qapi-builtin-types.h"
#include "qapi-types-common.h"

typedef struct KvmInfo KvmInfo;

typedef enum Accelerator {
    ACCELERATOR_HVF,
    ACCELERATOR_KVM,
    ACCELERATOR_MSHV,
    ACCELERATOR_NVMM,
    ACCELERATOR_QTEST,
    ACCELERATOR_TCG,
    ACCELERATOR_WHPX,
    ACCELERATOR_XEN,
    ACCELERATOR__MAX,
} Accelerator;

#define Accelerator_str(val) \
    qapi_enum_lookup(&Accelerator_lookup, (val))

extern const QEnumLookup Accelerator_lookup;

typedef struct AcceleratorList AcceleratorList;

typedef struct AcceleratorInfo AcceleratorInfo;

struct KvmInfo {
    bool enabled;
    bool present;
};

void qapi_free_KvmInfo(KvmInfo *obj);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(KvmInfo, qapi_free_KvmInfo)

struct AcceleratorList {
    AcceleratorList *next;
    Accelerator value;
};

void qapi_free_AcceleratorList(AcceleratorList *obj);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(AcceleratorList, qapi_free_AcceleratorList)

struct AcceleratorInfo {
    Accelerator enabled;
    AcceleratorList *present;
};

void qapi_free_AcceleratorInfo(AcceleratorInfo *obj);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(AcceleratorInfo, qapi_free_AcceleratorInfo)

#endif /* QAPI_TYPES_ACCELERATOR_H */
