From nobody Mon Nov 10 12:49:04 2025 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 ARC-Seal: i=1; a=rsa-sha256; t=1556199168; cv=none; d=zoho.com; s=zohoarc; b=fxiF0nJngp5Z+DUMQp4x9Y6/kmKasCt7RaBIv6gw/EPRcYicBSqbTCQNesesimaYWzsTtGK014VqPz2fg4Sl1h2ZYlBNH+uLeMWmihUgAgYu+ETLj39LaKEGpQHabPxn2yvpYju4Wx2VQFsI/ibVU5SGi3tJ8CosKq+xL+cuIIY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556199168; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=8cBe4uLMrtbOu5uFwZq+pIVKrCIU/WR/Ju9F7HvJzCs=; b=lkc8wlF3eZekcnLH+zvUtt5EzN9tucvKiD0ZZEUZ/rig0WBCLGN29SrGGGpNOIEDgS0QkI3U1mlqap1bo7ru472aIe/ur7QGThwukBhHyIRN+UiXIOlUtc/STwz+lGdXYgYu6/73hCG41p3FOMbnh4deAYvaj2PMF/57Qts9Bo8= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 155619916859591.53480400691444; Thu, 25 Apr 2019 06:32:48 -0700 (PDT) Received: from localhost ([127.0.0.1]:57238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJeUU-0003dM-7w for importer@patchew.org; Thu, 25 Apr 2019 09:32:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJeK6-0003OI-7F for qemu-devel@nongnu.org; Thu, 25 Apr 2019 09:21:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJeK5-0003js-5N for qemu-devel@nongnu.org; Thu, 25 Apr 2019 09:21:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59920) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJeK4-0003jJ-Vq; Thu, 25 Apr 2019 09:21:57 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3FD17307EA92; Thu, 25 Apr 2019 13:21:56 +0000 (UTC) Received: from localhost (dhcp-192-187.str.redhat.com [10.33.192.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E1EB01001E6C; Thu, 25 Apr 2019 13:21:55 +0000 (UTC) From: Cornelia Huck To: Peter Maydell Date: Thu, 25 Apr 2019 15:21:25 +0200 Message-Id: <20190425132134.2839-11-cohuck@redhat.com> In-Reply-To: <20190425132134.2839-1-cohuck@redhat.com> References: <20190425132134.2839-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 25 Apr 2019 13:21:56 +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] [PULL 10/19] s390-bios: Extend find_dev() for non-virtio devices 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: "Jason J. Herne" , qemu-s390x@nongnu.org, qemu-devel@nongnu.org, Thomas Huth 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" From: "Jason J. Herne" We need a method for finding the subchannel of a dasd device. Let's modify find_dev to handle this since it mostly does what we need. Up to this point find_dev has been specific to only virtio devices. Signed-off-by: Jason J. Herne Acked-by: Halil Pasic Reviewed-by: Cornelia Huck Message-Id: <1554388475-18329-11-git-send-email-jjherne@linux.ibm.com> Signed-off-by: Thomas Huth --- pc-bios/s390-ccw/main.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c index e403b5f733e4..d04ea8972a0c 100644 --- a/pc-bios/s390-ccw/main.c +++ b/pc-bios/s390-ccw/main.c @@ -52,6 +52,12 @@ unsigned int get_loadparm_index(void) return atoui(loadparm_str); } =20 +/* + * Find the subchannel connected to the given device (dev_no) and fill in = the + * subchannel information block (schib) with the connected subchannel's in= fo. + * NOTE: The global variable blk_schid is updated to contain the subchannel + * information. + */ static bool find_dev(Schib *schib, int dev_no) { int i, r; @@ -65,15 +71,15 @@ static bool find_dev(Schib *schib, int dev_no) if (!schib->pmcw.dnv) { continue; } - if (!virtio_is_supported(blk_schid)) { - continue; - } + /* Skip net devices since no IPLB is created and therefore no - * no network bootloader has been loaded + * network bootloader has been loaded */ - if (virtio_get_device_type() =3D=3D VIRTIO_ID_NET && dev_no < 0) { + if (virtio_is_supported(blk_schid) && + virtio_get_device_type() =3D=3D VIRTIO_ID_NET && dev_no < 0) { continue; } + if ((dev_no < 0) || (schib->pmcw.dev =3D=3D dev_no)) { return true; } --=20 2.17.2