diff options
| author | Bharata B Rao <bharata@linux.vnet.ibm.com> | 2016-06-10 06:29:01 +0530 |
|---|---|---|
| committer | David Gibson <david@gibson.dropbear.id.au> | 2016-06-17 16:33:48 +1000 |
| commit | 3b542549661eb216580e8b7683e13caa3950da45 (patch) | |
| tree | 2f4b49c558b2f3073ca49107e20d2edeb03ec308 /include/hw/ppc/spapr_cpu_core.h | |
| parent | 3f97b53a682d2595747c926c00d78b9d406f1be0 (diff) | |
| download | focaccia-qemu-3b542549661eb216580e8b7683e13caa3950da45.tar.gz focaccia-qemu-3b542549661eb216580e8b7683e13caa3950da45.zip | |
spapr: Abstract CPU core device and type specific core devices
Add sPAPR specific abastract CPU core device that is based on generic CPU core device. Use this as base type to create sPAPR CPU specific core devices. TODO: - Add core types for other remaining CPU types - Handle CPU model alias correctly Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc/spapr_cpu_core.h')
| -rw-r--r-- | include/hw/ppc/spapr_cpu_core.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr_cpu_core.h b/include/hw/ppc/spapr_cpu_core.h new file mode 100644 index 0000000000..424edeccc9 --- /dev/null +++ b/include/hw/ppc/spapr_cpu_core.h @@ -0,0 +1,29 @@ +/* + * sPAPR CPU core device. + * + * Copyright (C) 2016 Bharata B Rao <bharata@linux.vnet.ibm.com> + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ +#ifndef HW_SPAPR_CPU_CORE_H +#define HW_SPAPR_CPU_CORE_H + +#include "hw/qdev.h" +#include "hw/cpu/core.h" +#include "target-ppc/cpu-qom.h" + +#define TYPE_SPAPR_CPU_CORE "spapr-cpu-core" +#define SPAPR_CPU_CORE(obj) \ + OBJECT_CHECK(sPAPRCPUCore, (obj), TYPE_SPAPR_CPU_CORE) + +typedef struct sPAPRCPUCore { + /*< private >*/ + CPUCore parent_obj; + + /*< public >*/ + void *threads; + ObjectClass *cpu_class; +} sPAPRCPUCore; + +#endif |