From nobody Mon Feb 9 08:58:09 2026 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.zoho.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 1493117776623984.2194739963631; Tue, 25 Apr 2017 03:56:16 -0700 (PDT) Received: from localhost ([::1]:48379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2y8l-00082u-4S for importer@patchew.org; Tue, 25 Apr 2017 06:56:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2xzo-0000Lj-F8 for qemu-devel@nongnu.org; Tue, 25 Apr 2017 06:47:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2xzk-0001HT-CG for qemu-devel@nongnu.org; Tue, 25 Apr 2017 06:47:00 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38794) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d2xzk-0001GU-43 for qemu-devel@nongnu.org; Tue, 25 Apr 2017 06:46:56 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v3PAcnnJ031509 for ; Tue, 25 Apr 2017 06:46:55 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2a24a41uh5-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 25 Apr 2017 06:46:54 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Apr 2017 11:46:51 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 25 Apr 2017 11:46:48 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v3PAkmgw14352788; Tue, 25 Apr 2017 10:46:48 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 219994C04E; Tue, 25 Apr 2017 11:45:58 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EC7AE4C040; Tue, 25 Apr 2017 11:45:57 +0100 (BST) Received: from gondolin.boeblingen.de.ibm.com (unknown [9.152.224.84]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 25 Apr 2017 11:45:57 +0100 (BST) From: Cornelia Huck To: qemu-devel@nongnu.org Date: Tue, 25 Apr 2017 12:46:32 +0200 X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170425104633.6130-1-cornelia.huck@de.ibm.com> References: <20170425104633.6130-1-cornelia.huck@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17042510-0040-0000-0000-000003740BBF X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17042510-0041-0000-0000-00002519FCEC Message-Id: <20170425104633.6130-11-cornelia.huck@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-04-25_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704250193 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 10/11] pc-bios/s390-ccw: add boot entry selection to El Torito routine 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: Cornelia Huck , borntraeger@de.ibm.com, Farhan Ali , agraf@suse.de, "Eugene \(jno\) Dvurechenski" 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" From: "Eugene (jno) Dvurechenski" If there is no LOADPARM given or '0' specified, then IPL the first matched entry. Otherwise IPL the matching entry of that number. Signed-off-by: Eugene (jno) Dvurechenski Signed-off-by: Farhan Ali Reviewed-by: Christian Borntraeger Signed-off-by: Cornelia Huck --- pc-bios/s390-ccw/bootmap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c index e974350b6f..523fa78c5f 100644 --- a/pc-bios/s390-ccw/bootmap.c +++ b/pc-bios/s390-ccw/bootmap.c @@ -655,6 +655,7 @@ static IsoBcSection *find_iso_bc_entry(void) IsoBcEntry *e =3D (IsoBcEntry *)sec; uint32_t offset =3D find_iso_bc(); int i; + unsigned int loadparm =3D get_loadparm_index(); =20 if (!offset) { return NULL; @@ -675,7 +676,11 @@ static IsoBcSection *find_iso_bc_entry(void) for (i =3D 1; i < ISO_BC_ENTRY_PER_SECTOR; i++) { if (e[i].id =3D=3D ISO_BC_BOOTABLE_SECTION) { if (is_iso_bc_entry_compatible(&e[i].body.sect)) { - return &e[i].body.sect; + if (loadparm <=3D 1) { + /* found, default, or unspecified */ + return &e[i].body.sect; + } + loadparm--; } } } --=20 2.11.0