1 /* 2 * QEMU CPU cluster 3 * 4 * Copyright (c) 2018 GreenSocs SAS 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version 2 9 * of the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, see 18 * <http://www.gnu.org/licenses/gpl-2.0.html> 19 */ 20 #ifndef HW_CPU_CLUSTER_H 21 #define HW_CPU_CLUSTER_H 22 23 #include "qemu/osdep.h" 24 #include "hw/qdev.h" 25 26 /* 27 * CPU Cluster type 28 * 29 * A cluster is a group of CPUs which are all identical and have the same view 30 * of the rest of the system. It is mainly an internal QEMU representation and 31 * does not necessarily match with the notion of clusters on the real hardware. 32 * 33 * If CPUs are not identical (for example, Cortex-A53 and Cortex-A57 CPUs in an 34 * Arm big.LITTLE system) they should be in different clusters. If the CPUs do 35 * not have the same view of memory (for example the main CPU and a management 36 * controller processor) they should be in different clusters. 37 */ 38 39 #define TYPE_CPU_CLUSTER "cpu-cluster" 40 #define CPU_CLUSTER(obj) \ 41 OBJECT_CHECK(CPUClusterState, (obj), TYPE_CPU_CLUSTER) 42 43 /** 44 * CPUClusterState: 45 * @cluster_id: The cluster ID. This value is for internal use only and should 46 * not be exposed directly to the user or to the guest. 47 * 48 * State of a CPU cluster. 49 */ 50 typedef struct CPUClusterState { 51 /*< private >*/ 52 DeviceState parent_obj; 53 54 /*< public >*/ 55 uint32_t cluster_id; 56 } CPUClusterState; 57 58 #endif 59