/* 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_MACHINE_COMMON_H
#define QAPI_TYPES_MACHINE_COMMON_H

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

typedef enum S390CpuEntitlement {
    S390_CPU_ENTITLEMENT_AUTO,
    S390_CPU_ENTITLEMENT_LOW,
    S390_CPU_ENTITLEMENT_MEDIUM,
    S390_CPU_ENTITLEMENT_HIGH,
    S390_CPU_ENTITLEMENT__MAX,
} S390CpuEntitlement;

#define S390CpuEntitlement_str(val) \
    qapi_enum_lookup(&S390CpuEntitlement_lookup, (val))

extern const QEnumLookup S390CpuEntitlement_lookup;

typedef enum CpuTopologyLevel {
    CPU_TOPOLOGY_LEVEL_THREAD,
    CPU_TOPOLOGY_LEVEL_CORE,
    CPU_TOPOLOGY_LEVEL_MODULE,
    CPU_TOPOLOGY_LEVEL_CLUSTER,
    CPU_TOPOLOGY_LEVEL_DIE,
    CPU_TOPOLOGY_LEVEL_SOCKET,
    CPU_TOPOLOGY_LEVEL_BOOK,
    CPU_TOPOLOGY_LEVEL_DRAWER,
    CPU_TOPOLOGY_LEVEL_DEFAULT,
    CPU_TOPOLOGY_LEVEL__MAX,
} CpuTopologyLevel;

#define CpuTopologyLevel_str(val) \
    qapi_enum_lookup(&CpuTopologyLevel_lookup, (val))

extern const QEnumLookup CpuTopologyLevel_lookup;

typedef enum CacheLevelAndType {
    CACHE_LEVEL_AND_TYPE_L1D,
    CACHE_LEVEL_AND_TYPE_L1I,
    CACHE_LEVEL_AND_TYPE_L2,
    CACHE_LEVEL_AND_TYPE_L3,
    CACHE_LEVEL_AND_TYPE__MAX,
} CacheLevelAndType;

#define CacheLevelAndType_str(val) \
    qapi_enum_lookup(&CacheLevelAndType_lookup, (val))

extern const QEnumLookup CacheLevelAndType_lookup;

typedef struct SmpCacheProperties SmpCacheProperties;

typedef struct SmpCachePropertiesList SmpCachePropertiesList;

typedef struct SmpCachePropertiesWrapper SmpCachePropertiesWrapper;

struct SmpCacheProperties {
    CacheLevelAndType cache;
    CpuTopologyLevel topology;
};

void qapi_free_SmpCacheProperties(SmpCacheProperties *obj);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(SmpCacheProperties, qapi_free_SmpCacheProperties)

struct SmpCachePropertiesList {
    SmpCachePropertiesList *next;
    SmpCacheProperties *value;
};

void qapi_free_SmpCachePropertiesList(SmpCachePropertiesList *obj);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(SmpCachePropertiesList, qapi_free_SmpCachePropertiesList)

struct SmpCachePropertiesWrapper {
    SmpCachePropertiesList *caches;
};

void qapi_free_SmpCachePropertiesWrapper(SmpCachePropertiesWrapper *obj);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(SmpCachePropertiesWrapper, qapi_free_SmpCachePropertiesWrapper)

#endif /* QAPI_TYPES_MACHINE_COMMON_H */
