From patchwork Mon Sep 11 15:21:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 812424 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xrX241xw9z9s7B for ; Tue, 12 Sep 2017 01:30:52 +1000 (AEST) Received: from localhost ([::1]:58427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drQfi-0002z5-7R for incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 11:30:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drQXj-0004N0-Lx for qemu-devel@nongnu.org; Mon, 11 Sep 2017 11:22:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drQXf-0000Lm-Kx for qemu-devel@nongnu.org; Mon, 11 Sep 2017 11:22:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42946) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1drQXf-0000Jc-DA for qemu-devel@nongnu.org; Mon, 11 Sep 2017 11:22:31 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7AAEF356C2; Mon, 11 Sep 2017 15:22:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7AAEF356C2 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com Received: from t460s.redhat.com (ovpn-116-48.ams2.redhat.com [10.36.116.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 68F156B25A; Mon, 11 Sep 2017 15:22:27 +0000 (UTC) From: David Hildenbrand To: qemu-devel@nongnu.org Date: Mon, 11 Sep 2017 17:21:36 +0200 Message-Id: <20170911152150.12535-8-david@redhat.com> In-Reply-To: <20170911152150.12535-1-david@redhat.com> References: <20170911152150.12535-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 11 Sep 2017 15:22:30 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v4 07/21] target/s390x: move some s390x typedefs to cpu-qom.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matthew Rosato , thuth@redhat.com, Eduardo Habkost , david@redhat.com, cohuck@redhat.com, Richard Henderson , Alexander Graf , Markus Armbruster , borntraeger@de.ibm.com, Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 --- 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