From nobody Wed May 15 19:43:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549970701210892.3342687879381; Tue, 12 Feb 2019 03:25:01 -0800 (PST) Received: from localhost ([127.0.0.1]:37707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtWBJ-0005jk-3G for importer@patchew.org; Tue, 12 Feb 2019 06:24:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtWA0-00051Y-Jx for qemu-devel@nongnu.org; Tue, 12 Feb 2019 06:23:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtW9z-0003SO-K8 for qemu-devel@nongnu.org; Tue, 12 Feb 2019 06:23:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56448) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtW9z-0003OV-8Q; Tue, 12 Feb 2019 06:23:31 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 918B06699A; Tue, 12 Feb 2019 11:23:28 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-158.ams2.redhat.com [10.36.116.158]) by smtp.corp.redhat.com (Postfix) with ESMTP id 43253600C3; Tue, 12 Feb 2019 11:23:24 +0000 (UTC) From: David Hildenbrand To: qemu-devel@nongnu.org Date: Tue, 12 Feb 2019 12:23:23 +0100 Message-Id: <20190212112323.15904-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 12 Feb 2019 11:23:28 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2] s390x: add zPCI feature to "qemu" CPU model 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: Thomas Huth , Janosch Frank , David Hildenbrand , Cornelia Huck , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" As we now always have PCI support, let's add it to the "qemu" CPU model, taking care of backwards compatibility. Signed-off-by: David Hildenbrand --- v1 -> v2: - Use correct model identifiction of the z12 we emulate hw/s390x/s390-virtio-ccw.c | 3 +++ target/s390x/gen-features.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 3fb5c88af9..1a3414b642 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -657,7 +657,10 @@ DEFINE_CCW_MACHINE(4_0, "4.0", true); =20 static void ccw_machine_3_1_instance_options(MachineState *machine) { + static const S390FeatInit qemu_cpu_feat =3D { S390_FEAT_LIST_QEMU_V3_1= }; ccw_machine_4_0_instance_options(machine); + + s390_set_qemu_cpu_model(0x2827, 12, 2, qemu_cpu_feat); } =20 static void ccw_machine_3_1_class_options(MachineClass *mc) diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index b0e9b271e2..19bb8ac7f8 100644 --- a/target/s390x/gen-features.c +++ b/target/s390x/gen-features.c @@ -560,7 +560,7 @@ static uint16_t qemu_V2_11[] =3D { S390_FEAT_ZARCH, }; =20 -static uint16_t qemu_LATEST[] =3D { +static uint16_t qemu_V3_1[] =3D { S390_FEAT_DAT_ENH, S390_FEAT_IDTE_SEGMENT, S390_FEAT_STFLE, @@ -592,13 +592,16 @@ static uint16_t qemu_LATEST[] =3D { S390_FEAT_MSA_EXT_4, }; =20 +static uint16_t qemu_LATEST[] =3D { + S390_FEAT_ZPCI, +}; + /* add all new definitions before this point */ static uint16_t qemu_MAX[] =3D { /* z13+ features */ S390_FEAT_STFLE_53, /* generates a dependency warning, leave it out for now */ S390_FEAT_MSA_EXT_5, - S390_FEAT_ZPCI, }; =20 /****** END FEATURE DEFS ******/ @@ -708,6 +711,7 @@ static FeatGroupDefSpec FeatGroupDef[] =3D { *******************************/ static FeatGroupDefSpec QemuFeatDef[] =3D { QEMU_FEAT_INITIALIZER(V2_11), + QEMU_FEAT_INITIALIZER(V3_1), QEMU_FEAT_INITIALIZER(LATEST), QEMU_FEAT_INITIALIZER(MAX), }; --=20 2.17.2