{"id":2233184,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2233184/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505201905.997996-15-zycai@linux.ibm.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.2/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260505201905.997996-15-zycai@linux.ibm.com>","list_archive_url":null,"date":"2026-05-05T20:18:46","name":"[v11,14/32] s390x/ipl: Introduce IPL Information Report Block (IIRB)","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"d99166cd99d7e67961d9ef526475fdba8071f45d","submitter":{"id":90643,"url":"http://patchwork.ozlabs.org/api/1.2/people/90643/?format=json","name":"Zhuoying Cai","email":"zycai@linux.ibm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505201905.997996-15-zycai@linux.ibm.com/mbox/","series":[{"id":502896,"url":"http://patchwork.ozlabs.org/api/1.2/series/502896/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502896","date":"2026-05-05T20:18:37","name":"Secure IPL Support for SCSI Scheme of virtio-blk/virtio-scsi Devices","version":11,"mbox":"http://patchwork.ozlabs.org/series/502896/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2233184/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2233184/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=E0TfN4n6;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g98zF218Kz1yJx\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 06:20:57 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wKMF5-0007mk-Jm; Tue, 05 May 2026 16:19:43 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <zycai@linux.ibm.com>)\n id 1wKMF3-0007kG-P1; Tue, 05 May 2026 16:19:41 -0400","from mx0b-001b2d01.pphosted.com ([148.163.158.5])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <zycai@linux.ibm.com>)\n id 1wKMF1-0000Fr-Ve; Tue, 05 May 2026 16:19:41 -0400","from pps.filterd (m0360072.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 645HKrvF2578306; Tue, 5 May 2026 20:19:36 GMT","from ppma11.dal12v.mail.ibm.com\n (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219])\n by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4dw9y4n721-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Tue, 05 May 2026 20:19:35 +0000 (GMT)","from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1])\n by ppma11.dal12v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id\n 645K9Q12015549;\n Tue, 5 May 2026 20:19:35 GMT","from smtprelay02.wdc07v.mail.ibm.com ([172.16.1.69])\n by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 4dwx9yb253-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Tue, 05 May 2026 20:19:35 +0000 (GMT)","from smtpav02.wdc07v.mail.ibm.com (smtpav02.wdc07v.mail.ibm.com\n [10.39.53.229])\n by smtprelay02.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 645KJXJp26280568\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n Tue, 5 May 2026 20:19:33 GMT","from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 7CE2558059;\n Tue,  5 May 2026 20:19:33 +0000 (GMT)","from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id D44DF5805E;\n Tue,  5 May 2026 20:19:31 +0000 (GMT)","from fedora-workstation.pok.ibm.com (unknown [9.12.79.241])\n by smtpav02.wdc07v.mail.ibm.com (Postfix) with ESMTP;\n Tue,  5 May 2026 20:19:31 +0000 (GMT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n :content-transfer-encoding:content-type:date:from:in-reply-to\n :message-id:mime-version:references:subject:to; s=pp1; bh=p2lWYc\n Qj09rovlfJi1pd/B+GTn7Bripb2R74MBKZsj4=; b=E0TfN4n6d99i4jaLvt8kF4\n oAerY/ikLYA4Rl3koCw+JfLLK0KiEaFo1CHk7OQQYSqcxHXBPe1gY5DEW9USB3z4\n bBq4w4cl3UyzuuZa4pTKD4I+3H3VmLw7WlWrQ795D0R9ocsTh2eu1VYd3gUGksbk\n +moUsg6ug5gSpt49xp1Y0B3ZyrkIEmHlZ1QFiThlpjyfz82HFiuo2z28d1uvUuwy\n b42haPEXxHXkmEjY/DECg/sSh8CBCdyj7OJOtqH+ICmSuigRGlLc+sFggnYrWERw\n e9VDrL8EU9Dpi5uw2f5zVT9noZP+pI+Cn1DeBsdqWn0CVf0CKRqwg+OZKnRCyi/A\n ==","From":"Zhuoying Cai <zycai@linux.ibm.com>","To":"qemu-s390x@nongnu.org, qemu-devel@nongnu.org","Cc":"jrossi@linux.ibm.com, cohuck@redhat.com, berrange@redhat.com,\n richard.henderson@linaro.org, david@kernel.org, walling@linux.ibm.com,\n jjherne@linux.ibm.com, pasic@linux.ibm.com, borntraeger@linux.ibm.com,\n farman@linux.ibm.com, mjrosato@linux.ibm.com, iii@linux.ibm.com,\n eblake@redhat.com, armbru@redhat.com, zycai@linux.ibm.com,\n alifm@linux.ibm.com, brueckner@linux.ibm.com,\n pierrick.bouvier@oss.qualcomm.com, jdaley@linux.ibm.com","Subject":"[PATCH v11 14/32] s390x/ipl: Introduce IPL Information Report Block\n (IIRB)","Date":"Tue,  5 May 2026 16:18:46 -0400","Message-ID":"<20260505201905.997996-15-zycai@linux.ibm.com>","X-Mailer":"git-send-email 2.54.0","In-Reply-To":"<20260505201905.997996-1-zycai@linux.ibm.com>","References":"<20260505201905.997996-1-zycai@linux.ibm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-TM-AS-GCONF":"00","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNTA1MDE5NSBTYWx0ZWRfX2C31Sw0eemjj\n Lu2nduQMi+MMIpjoEDvZTBJ0UFoS8cShYfWQWBAM07sRidUQ0J5U1c1865NRkoHvgzuV+i99jyO\n zOOA++8PvWWnGI91HSYB0Dc+Jpw9nqzpXJRtq0ukEdRJpOnWHWSkH0NjFzVRKhEn4IwuGj1xCkF\n woHGUgvm2Q/ikM4fTg+jehyCIPFoe3P5QEYnODAiUO6glD0oXdh5/GuDXYVU5PMGIFBDszCtzs6\n Z4R3qN9PujxowFubdkaAetv4jg//VJloqJ6WuMewqxCR2fyWjkX8988aR7iacxfHuILlUfRX+6R\n g/pCAFj/Rd46Iy9Id6TqWMozdojJKPEh1jiXxwTpIlvLixMrK5LLFvvou3DWONQd/cud9hTZDfr\n CUanE3FEZqkBl6niZfTvqcoXFPVdBC9OmNrbvD6XWAbr5FCMu32zQdvLJbdn+uig8yCjIEzKQ0Y\n ZIVIe4y4iFKkgbcJnBQ==","X-Authority-Analysis":"v=2.4 cv=J4GaKgnS c=1 sm=1 tr=0 ts=69fa50d7 cx=c_pps\n a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17\n a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=RnoormkPH1_aCDwRdu11:22 a=RzCfie-kr_QcCd8fBx8p:22 a=VnNF1IyMAAAA:8\n a=1NTGDykL02WXTEG3Jz0A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10","X-Proofpoint-GUID":"vRIdOLX0cdx8qBlhl3TVTYhW1c9bqF2K","X-Proofpoint-ORIG-GUID":"vRIdOLX0cdx8qBlhl3TVTYhW1c9bqF2K","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-05-05_02,2026-04-30_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n impostorscore=0 clxscore=1015 malwarescore=0 bulkscore=0 suspectscore=0\n priorityscore=1501 spamscore=0 phishscore=0 adultscore=0 lowpriorityscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605050195","Received-SPF":"pass client-ip=148.163.158.5; envelope-from=zycai@linux.ibm.com;\n helo=mx0b-001b2d01.pphosted.com","X-Spam_score_int":"-26","X-Spam_score":"-2.7","X-Spam_bar":"--","X-Spam_report":"(-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7,\n RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"The IPL information report block (IIRB) contains information used\nto locate IPL records and to report the results of signature verification\nof one or more secure components of the load device.\n\nIIRB is stored immediately following the IPL Parameter Block. Results on\ncomponent verification in any case (failure or success) are stored.\n\nThe IIRB data is reserved and protected by the guest kernel during early\nboot to prevent it from being overwritten before the certificate data is\npermanently saved.\n\nSigned-off-by: Zhuoying Cai <zycai@linux.ibm.com>\nReviewed-by: Farhan Ali<alifm@linux.ibm.com>\nReviewed-by: Collin Walling <walling@linux.ibm.com>\n---\n docs/specs/s390x-secure-ipl.rst | 21 +++++++++++\n include/hw/s390x/ipl/qipl.h     | 62 +++++++++++++++++++++++++++++++++\n 2 files changed, 83 insertions(+)","diff":"diff --git a/docs/specs/s390x-secure-ipl.rst b/docs/specs/s390x-secure-ipl.rst\nindex f35e868e4c..c858d5b74b 100644\n--- a/docs/specs/s390x-secure-ipl.rst\n+++ b/docs/specs/s390x-secure-ipl.rst\n@@ -97,3 +97,24 @@ Subcode 1 - perform signature verification\n     * ``0x0302``: PKCS#7 format signature is invalid\n     * ``0x0402``: signature-verification failed\n     * ``0x0502``: length of Diag508SigVerifBlock is invalid\n+\n+IPL Information Report Block\n+^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+The IPL Parameter Block (IPLPB), utilized for IPL operation, is extended with an\n+IPL Information Report Block (IIRB), which contains the results from secure IPL\n+operations such as:\n+\n+* component data\n+* verification results\n+* certificate data\n+\n+During early boot, the guest kernel reserves the memory region\n+containing the IIRB. This preserves the data while the guest kernel is\n+operating and during re-IPL.\n+\n+The guest kernel uses the contents in the IIRB for:\n+\n+* Boot logging: reports which components were loaded and verified.\n+* kexec operations: builds the next kernel’s IPL report from the existing one.\n+* Keying: installs IPL certificates into the platform trusted keyring.\ndiff --git a/include/hw/s390x/ipl/qipl.h b/include/hw/s390x/ipl/qipl.h\nindex ed1a91182a..45d25264f4 100644\n--- a/include/hw/s390x/ipl/qipl.h\n+++ b/include/hw/s390x/ipl/qipl.h\n@@ -32,6 +32,9 @@ typedef enum S390IplType S390IplType;\n #define QEMU_DEFAULT_IPL S390_IPL_TYPE_CCW\n \n #define MAX_CERTIFICATES  64\n+/* largest supported block size - same as VIRTIO_DASD_DEFAULT_BLOCK_SIZE */\n+#define VIRTIO_MAX_BLOCK_SIZE   4096\n+#define MAX_COMP_ENTRIES        ((VIRTIO_MAX_BLOCK_SIZE - 32) / 32)\n \n /*\n  * The QEMU IPL Parameters will be stored at absolute address\n@@ -146,4 +149,63 @@ union IplParameterBlock {\n } QEMU_PACKED;\n typedef union IplParameterBlock IplParameterBlock;\n \n+struct IplInfoReportBlockHeader {\n+    uint32_t len;\n+    uint8_t  flags;\n+    uint8_t  reserved1[11];\n+};\n+typedef struct IplInfoReportBlockHeader IplInfoReportBlockHeader;\n+\n+struct IplInfoBlockHeader {\n+    uint32_t len;\n+    uint8_t  type;\n+    uint8_t  reserved1[11];\n+};\n+typedef struct IplInfoBlockHeader IplInfoBlockHeader;\n+\n+enum IplInfoBlockType {\n+    IPL_INFO_BLOCK_TYPE_CERTIFICATES = 1,\n+    IPL_INFO_BLOCK_TYPE_COMPONENTS = 2,\n+};\n+\n+struct IplSignatureCertificateEntry {\n+    uint64_t addr;\n+    uint64_t len;\n+};\n+typedef struct IplSignatureCertificateEntry IplSignatureCertificateEntry;\n+\n+struct IplSignatureCertificateList {\n+    IplInfoBlockHeader            ipl_info_header;\n+    IplSignatureCertificateEntry  cert_entries[MAX_CERTIFICATES];\n+};\n+typedef struct IplSignatureCertificateList IplSignatureCertificateList;\n+\n+#define S390_IPL_DEV_COMP_FLAG_SC  0x80\n+#define S390_IPL_DEV_COMP_FLAG_CSV 0x40\n+\n+struct IplDeviceComponentEntry {\n+    uint64_t addr;\n+    uint64_t len;\n+    uint8_t  flags;\n+    uint8_t  reserved1[5];\n+    uint16_t cert_index;\n+    uint8_t  reserved2[8];\n+};\n+typedef struct IplDeviceComponentEntry IplDeviceComponentEntry;\n+\n+struct IplDeviceComponentList {\n+    IplInfoBlockHeader       ipl_info_header;\n+    IplDeviceComponentEntry  device_entries[MAX_COMP_ENTRIES];\n+};\n+typedef struct IplDeviceComponentList IplDeviceComponentList;\n+\n+#define COMP_LIST_MAX   sizeof(IplDeviceComponentList)\n+#define CERT_LIST_MAX   sizeof(IplSignatureCertificateList)\n+\n+struct IplInfoReportBlock {\n+    IplInfoReportBlockHeader     hdr;\n+    uint8_t                      info_blks[COMP_LIST_MAX + CERT_LIST_MAX];\n+};\n+typedef struct IplInfoReportBlock IplInfoReportBlock;\n+\n #endif\n","prefixes":["v11","14/32"]}