[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 17/38] target/s390x: move some s390x typedefs to c
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL v2 17/38] target/s390x: move some s390x typedefs to cpu-qom.h |
Date: |
Tue, 19 Sep 2017 18:43:16 +0200 |
From: David Hildenbrand <address@hidden>
This allows us to drop inclusion of cpu_models.h in cpu-qom.h, and
prepares for using cpu-qom.h as a s390 specific version of typedefs.h
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
target/s390x/cpu-qom.h | 5 ++++-
target/s390x/cpu.h | 5 +++--
target/s390x/cpu_models.h | 8 ++++----
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h
index 4e936e7788..2435cd8390 100644
--- a/target/s390x/cpu-qom.h
+++ b/target/s390x/cpu-qom.h
@@ -21,7 +21,6 @@
#define QEMU_S390_CPU_QOM_H
#include "qom/cpu.h"
-#include "cpu_models.h"
#define TYPE_S390_CPU "s390-cpu"
@@ -32,6 +31,9 @@
#define S390_CPU_GET_CLASS(obj) \
OBJECT_GET_CLASS(S390CPUClass, (obj), TYPE_S390_CPU)
+typedef struct S390CPUModel S390CPUModel;
+typedef struct S390CPUDef S390CPUDef;
+
/**
* S390CPUClass:
* @parent_realize: The parent class' realize handler.
@@ -62,5 +64,6 @@ typedef struct S390CPUClass {
} S390CPUClass;
typedef struct S390CPU S390CPU;
+typedef struct CPUS390XState CPUS390XState;
#endif
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index 372f7d8885..4a0a59dfbc 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -25,6 +25,7 @@
#include "qemu-common.h"
#include "cpu-qom.h"
+#include "cpu_models.h"
#define TARGET_LONG_BITS 64
@@ -80,7 +81,7 @@ typedef struct MchkQueue {
uint16_t type;
} MchkQueue;
-typedef struct CPUS390XState {
+struct CPUS390XState {
uint64_t regs[16]; /* GP registers */
/*
* The floating point registers are part of the vector registers.
@@ -174,7 +175,7 @@ typedef struct CPUS390XState {
/* currently processed sigp order */
uint8_t sigp_order;
-} CPUS390XState;
+};
static inline CPU_DoubleU *get_freg(CPUS390XState *cs, int nr)
{
diff --git a/target/s390x/cpu_models.h b/target/s390x/cpu_models.h
index c0bee15d7a..4c6dee1871 100644
--- a/target/s390x/cpu_models.h
+++ b/target/s390x/cpu_models.h
@@ -17,7 +17,7 @@
#include "qom/cpu.h"
/* static CPU definition */
-typedef struct S390CPUDef {
+struct S390CPUDef {
const char *name; /* name exposed to the user */
const char *desc; /* description exposed to the user */
uint8_t gen; /* hw generation identification */
@@ -37,10 +37,10 @@ typedef struct S390CPUDef {
S390FeatBitmap full_feat;
/* used to init full_feat from generated data */
S390FeatInit full_init;
-} S390CPUDef;
+};
/* CPU model based on a CPU definition */
-typedef struct S390CPUModel {
+struct S390CPUModel {
const S390CPUDef *def;
S390FeatBitmap features;
/* values copied from the "host" model, can change during migration */
@@ -48,7 +48,7 @@ typedef struct S390CPUModel {
uint32_t cpu_id; /* CPU id */
uint8_t cpu_id_format; /* CPU id format bit */
uint8_t cpu_ver; /* CPU version, usually "ff" for kvm */
-} S390CPUModel;
+};
/*
* CPU ID
--
2.13.5
- [Qemu-devel] [PULL v2 07/38] s390x/css: drop data-check in interpretation, (continued)
- [Qemu-devel] [PULL v2 07/38] s390x/css: drop data-check in interpretation, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 08/38] s390x/css: fix NULL handling for CCW addresses, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 09/38] s390x/css: remove unused error handling branch, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 10/38] s390: set DHCP client architecure id for netboot, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 11/38] exec, dump, i386, ppc, s390x: don't include exec/cpu-all.h explicitly, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 12/38] cpu: drop old comments describing members, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 13/38] s390x: get rid of s390-virtio.c, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 14/38] s390x: rename s390-virtio.h to s390-virtio-hcall.h, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 15/38] s390x: move s390_virtio_hypercall() to s390-virtio-hcall.h, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 16/38] s390x: move subsystem_reset() to s390-virtio-ccw.h, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 17/38] target/s390x: move some s390x typedefs to cpu-qom.h,
Cornelia Huck <=
- [Qemu-devel] [PULL v2 18/38] s390x: move sclp_service_call() to sclp.h, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 19/38] target/s390x: use trigger_pgm_exception() in s390_cpu_handle_mmu_fault(), Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 20/38] target/s390x: use program_interrupt() in per_check_exception(), Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 21/38] s390x: allow only 1 CPU with TCG, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 22/38] target/s390x: set cpu->id for linux user when realizing, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 23/38] target/s390x: use "core-id" for cpu number/address/id handling, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 24/38] target/s390x: rename next_cpu_id to next_core_id, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 25/38] s390x: print CPU definitions in sorted order, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 26/38] s390x: allow cpu hotplug via device_add, Cornelia Huck, 2017/09/19
- [Qemu-devel] [PULL v2 27/38] s390x: CPU hot unplug via device_del cannot work for now, Cornelia Huck, 2017/09/19