1 /* 2 * CPU core abstract device 3 * 4 * Copyright (C) 2016 Bharata B Rao <bharata@linux.vnet.ibm.com> 5 * 6 * This work is licensed under the terms of the GNU GPL, version 2 or later. 7 * See the COPYING file in the top-level directory. 8 */ 9 #ifndef HW_CPU_CORE_H 10 #define HW_CPU_CORE_H 11 12 #include "hw/qdev-core.h" 13 #include "qom/object.h" 14 15 #define TYPE_CPU_CORE "cpu-core" 16 17 typedef struct CPUCore CPUCore; 18 DECLARE_INSTANCE_CHECKER(CPUCore, CPU_CORE, 19 TYPE_CPU_CORE) 20 21 struct CPUCore { 22 /*< private >*/ 23 DeviceState parent_obj; 24 25 /*< public >*/ 26 int core_id; 27 int nr_threads; 28 }; 29 30 /* Note: topology field names need to be kept in sync with 31 * 'CpuInstanceProperties' */ 32 33 #define CPU_CORE_PROP_CORE_ID "core-id" 34 35 #endif 36