/* * QEMU PowerPC CPU QOM header (target agnostic) * * Copyright (c) 2012 SUSE LINUX Products GmbH * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see * */ #ifndef QEMU_PPC_CPU_QOM_H #define QEMU_PPC_CPU_QOM_H #include "exec/gdbstub.h" #include "hw/core/cpu.h" #ifdef TARGET_PPC64 #define TYPE_POWERPC_CPU "powerpc64-cpu" #else #define TYPE_POWERPC_CPU "powerpc-cpu" #endif OBJECT_DECLARE_CPU_TYPE(PowerPCCPU, PowerPCCPUClass, POWERPC_CPU) #define POWERPC_CPU_TYPE_SUFFIX "-" TYPE_POWERPC_CPU #define POWERPC_CPU_TYPE_NAME(model) model POWERPC_CPU_TYPE_SUFFIX #define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host") #ifndef CONFIG_USER_ONLY typedef struct PPCTimebase { uint64_t guest_timebase; int64_t time_of_the_day_ns; bool runstate_paused; } PPCTimebase; extern const VMStateDescription vmstate_ppc_timebase; #define VMSTATE_PPC_TIMEBASE_V(_field, _state, _version) { \ .name = (stringify(_field)), \ .version_id = (_version), \ .size = sizeof(PPCTimebase), \ .vmsd = &vmstate_ppc_timebase, \ .flags = VMS_STRUCT, \ .offset = vmstate_offset_value(_state, _field, PPCTimebase), \ } void cpu_ppc_clock_vm_state_change(void *opaque, bool running, RunState state); #endif #endif