From nobody Tue May 7 13:24:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505493684366349.7797870169484; Fri, 15 Sep 2017 09:41:24 -0700 (PDT) Received: from localhost ([::1]:54223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dstgB-0005Mk-Gc for importer@patchew.org; Fri, 15 Sep 2017 12:41:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dstet-0004fa-NS for qemu-devel@nongnu.org; Fri, 15 Sep 2017 12:40:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dstes-00074c-Tq for qemu-devel@nongnu.org; Fri, 15 Sep 2017 12:40:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33452) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dstes-00073Q-Nv for qemu-devel@nongnu.org; Fri, 15 Sep 2017 12:40:02 -0400 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 A5724821C3; Fri, 15 Sep 2017 16:40:01 +0000 (UTC) Received: from localhost (ovpn-116-44.ams2.redhat.com [10.36.116.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 464EF70475; Fri, 15 Sep 2017 16:39:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A5724821C3 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=cohuck@redhat.com From: Cornelia Huck To: qemu-devel@nongnu.org Date: Fri, 15 Sep 2017 18:39:52 +0200 Message-Id: <20170915163952.32147-2-cohuck@redhat.com> In-Reply-To: <20170915163952.32147-1-cohuck@redhat.com> References: <20170915163952.32147-1-cohuck@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.28]); Fri, 15 Sep 2017 16:40:01 +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 RFC v2 1/1] s390x/ccw: create s390 phb for compat reasons as well 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: thuth@redhat.com, zyimin@linux.vnet.ibm.com, david@redhat.com, Cornelia Huck , pmorel@linux.vnet.ibm.com, agraf@suse.de, borntraeger@de.ibm.com, pasic@linux.vnet.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" d32bd032d8 ("s390x/ccw: create s390 phb conditionally") made registering the s390 pci host bridge conditional on presense of the zpci facility bit. Sadly, that breaks migration from machines that did not use the cpu model (2.7 and previous). Create the s390 phb for pre-cpu model machines as well. Fixes: d32bd032d8 ("s390x/ccw: create s390 phb conditionally") Signed-off-by: Cornelia Huck Acked-by: Christian Borntraeger --- hw/s390x/s390-virtio-ccw.c | 2 ++ target/s390x/cpu_models.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 0471407187..907abc7a32 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -269,6 +269,8 @@ static void s390_create_virtio_net(BusState *bus, const= char *name) } } =20 +static S390CcwMachineClass *get_machine_class(void); + static void ccw_init(MachineState *machine) { int ret; diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index c295e641e6..5169379db5 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -196,6 +196,9 @@ bool s390_has_feat(S390Feat feat) } } #endif + if (feat =3D=3D S390_FEAT_ZPCI) { + return true; + } return 0; } return test_bit(feat, cpu->model->features); --=20 2.13.5