From patchwork Mon Sep 18 08:55:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 9955737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E85C960385 for ; Mon, 18 Sep 2017 08:56:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5AE728BDE for ; Mon, 18 Sep 2017 08:56:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA64028BF0; Mon, 18 Sep 2017 08:56:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6567C28BDE for ; Mon, 18 Sep 2017 08:56:33 +0000 (UTC) Received: from localhost ([::1]:35317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtrqy-00062J-5s for patchwork-qemu-devel@patchwork.kernel.org; Mon, 18 Sep 2017 04:56:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtrqJ-000629-6H for qemu-devel@nongnu.org; Mon, 18 Sep 2017 04:55:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtrqI-0004yc-An for qemu-devel@nongnu.org; Mon, 18 Sep 2017 04:55:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48688) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dtrqI-0004u9-4g for qemu-devel@nongnu.org; Mon, 18 Sep 2017 04:55:50 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DCAB5C04B928; Mon, 18 Sep 2017 08:55:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DCAB5C04B928 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=cohuck@redhat.com Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9C2B418A45; Mon, 18 Sep 2017 08:55:45 +0000 (UTC) From: Cornelia Huck To: qemu-devel@nongnu.org Date: Mon, 18 Sep 2017 10:55:42 +0200 Message-Id: <20170918085542.13265-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 18 Sep 2017 08:55:49 +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 v3] 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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: We can tweak s390_has_feat() to always indicate the zpci facility bit when no cpu model is available (on 2.7 and previous compat machines). Fixes: d32bd032d8 ("s390x/ccw: create s390 phb conditionally") Acked-by: Christian Borntraeger Signed-off-by: Cornelia Huck --- v2->v3: - no longer RFC (I tested a bit more) - removed unrelated hunk - more verbose patch description I'll wait a bit for more acks/reviews and will probably send a pull request for s390x tomorrow or so before the amount of queued patches gets out of hand... --- target/s390x/cpu_models.c | 3 +++ 1 file changed, 3 insertions(+) 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 == S390_FEAT_ZPCI) { + return true; + } return 0; } return test_bit(feat, cpu->model->features);