1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20#ifndef QEMU_S390_CPU_QOM_H
21#define QEMU_S390_CPU_QOM_H
22
23#include "hw/core/cpu.h"
24
25#define TYPE_S390_CPU "s390x-cpu"
26
27#define S390_CPU_CLASS(klass) \
28 OBJECT_CLASS_CHECK(S390CPUClass, (klass), TYPE_S390_CPU)
29#define S390_CPU(obj) \
30 OBJECT_CHECK(S390CPU, (obj), TYPE_S390_CPU)
31#define S390_CPU_GET_CLASS(obj) \
32 OBJECT_GET_CLASS(S390CPUClass, (obj), TYPE_S390_CPU)
33
34typedef struct S390CPUModel S390CPUModel;
35typedef struct S390CPUDef S390CPUDef;
36
37typedef enum cpu_reset_type {
38 S390_CPU_RESET_NORMAL,
39 S390_CPU_RESET_INITIAL,
40 S390_CPU_RESET_CLEAR,
41} cpu_reset_type;
42
43
44
45
46
47
48
49
50
51
52
53typedef struct S390CPUClass {
54
55 CPUClass parent_class;
56
57 const S390CPUDef *cpu_def;
58 bool kvm_required;
59 bool is_static;
60 bool is_migration_safe;
61 const char *desc;
62
63 DeviceRealize parent_realize;
64 DeviceReset parent_reset;
65 void (*load_normal)(CPUState *cpu);
66 void (*reset)(CPUState *cpu, cpu_reset_type type);
67} S390CPUClass;
68
69typedef struct S390CPU S390CPU;
70typedef struct CPUS390XState CPUS390XState;
71
72#endif
73