Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2219402/?format=api
{ "id": 2219402, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2219402/?format=api", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.0/projects/14/?format=api", "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": "" }, "msgid": "<20260402221453.1602899-22-zycai@linux.ibm.com>", "date": "2026-04-02T22:14:43", "name": "[v10,21/30] s390x: Guest support for Secure-IPL Code Loading Attributes Facility (SCLAF)", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "a3196b7b76779cc332d6417feeb8fd8e1fa810d0", "submitter": { "id": 90643, "url": "http://patchwork.ozlabs.org/api/1.0/people/90643/?format=api", "name": "Zhuoying Cai", "email": "zycai@linux.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260402221453.1602899-22-zycai@linux.ibm.com/mbox/", "series": [ { "id": 498557, "url": "http://patchwork.ozlabs.org/api/1.0/series/498557/?format=api", "date": "2026-04-02T22:14:35", "name": "Secure IPL Support for SCSI Scheme of virtio-blk/virtio-scsi Devices", "version": 10, "mbox": "http://patchwork.ozlabs.org/series/498557/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2219402/checks/", "tags": {}, "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=lPEIS+aJ;\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=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.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 4fmx8d62gxz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 03 Apr 2026 09:18:57 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1w8QKy-0001wj-Il; Thu, 02 Apr 2026 18:16:28 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.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 1w8QKJ-0000s2-96; Thu, 02 Apr 2026 18:15:56 -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 1w8QKH-0004qU-Cm; Thu, 02 Apr 2026 18:15:47 -0400", "from pps.filterd (m0356516.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 632ERdHa033664; Thu, 2 Apr 2026 22:15:42 GMT", "from ppma13.dal12v.mail.ibm.com\n (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221])\n by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4d64dgx0ru-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Thu, 02 Apr 2026 22:15:41 +0000 (GMT)", "from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1])\n by ppma13.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id\n 632L0Mnx031034;\n Thu, 2 Apr 2026 22:15:40 GMT", "from smtprelay04.wdc07v.mail.ibm.com ([172.16.1.71])\n by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 4d6uhk3rpd-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Thu, 02 Apr 2026 22:15:40 +0000", "from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com\n [10.241.53.104])\n by smtprelay04.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 632MFdF958065194\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n Thu, 2 Apr 2026 22:15:39 GMT", "from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 01F6958069;\n Thu, 2 Apr 2026 22:15:39 +0000 (GMT)", "from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 753FF58067;\n Thu, 2 Apr 2026 22:15:37 +0000 (GMT)", "from fedora-workstation.ibmuc.com (unknown [9.61.183.185])\n by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP;\n Thu, 2 Apr 2026 22:15:37 +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=7zX/Xq\n zcDmyiBxYFgEav1Dbsdut6KXzGOwr0CnsSLWM=; b=lPEIS+aJdB2Sw+y7h4UB6h\n XqBJENhvysCjlqgz1Y0koM1GNndcyArSklcq8j8ATH3yUWnVBwDlsYGf0y3Jfy4a\n F54P2qBiVGBWqd4EccqHX7OY6ok7CHpnivETtq6y5B/IF9nJHWAaB9xvywN/Y+HC\n UfpJ0PVbDxTyaJjSQKUMANTDplsdyvk0sktMiTvHbalZHGrkadjhGVA9Ypd5I+t1\n zLOfVICt+gAwiu7uO3DTXLVhwnoO84oN3ppQwzoEaa3zs+RWFKi8FTs21P1nuLIG\n 52pu4nilSdQHvXK2YmzV4CVlFV5zNvwimjNH2WbyFV8MPzB8ywVRcSEZHOsZ3UiA\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, pierrick.bouvier@linaro.org,\n david@kernel.org, walling@linux.ibm.com, jjherne@linux.ibm.com,\n pasic@linux.ibm.com, borntraeger@linux.ibm.com, farman@linux.ibm.com,\n mjrosato@linux.ibm.com, iii@linux.ibm.com, eblake@redhat.com,\n armbru@redhat.com, zycai@linux.ibm.com, alifm@linux.ibm.com,\n brueckner@linux.ibm.com, jdaley@linux.ibm.com", "Subject": "[PATCH v10 21/30] s390x: Guest support for Secure-IPL Code Loading\n Attributes Facility (SCLAF)", "Date": "Thu, 2 Apr 2026 18:14:43 -0400", "Message-ID": "<20260402221453.1602899-22-zycai@linux.ibm.com>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260402221453.1602899-1-zycai@linux.ibm.com>", "References": "<20260402221453.1602899-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": "AW1haW4tMjYwNDAyMDE5NSBTYWx0ZWRfX6oQPdwjJ/qrd\n bE0nq2D/xTPFSCKMIpWDS87AZq8h5OWOoVs0xBMRsUWTnH06EoFYaytdhfNFk10hH0F8waBK7eN\n eAG16ufxcgHejhQ/Z+3oeK7Zda0xAPszGDNCRcKdkXLN8hLxTkh/2iYNcHEf1+9ln3Nyl9dAtZ0\n jGHaqAyVAi/AHtsRLf/0Uxw5TG8A0J1BukwzZy4uPaR5UXieRoLai8jvpFpiobljqPUAbEOWNF4\n pKF7c1D+6m1l7mzGtbM0aWnn8IazJDaNQ63aZllIASk31YcUg7uPLXVBozjKCLkdH8Z9n7ndTlb\n sCd/lCRzk99tzD/seLrGaLRZ3JWjywjfnYQbmvMjNPmQ1b0LC/xgaJRHcMr4H0doxgrdUVdtULf\n R7d2WtWVaxQ+9M7x6RkVMm5+O3NDNrLXPra90hTXvH5ZtGqwmCT0oqeOumBzTK1gTy78DcTlgr3\n eHRry6QhDJA4fhhubgQ==", "X-Authority-Analysis": "v=2.4 cv=QKZlhwLL c=1 sm=1 tr=0 ts=69ceea8d cx=c_pps\n a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17\n a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VnNF1IyMAAAA:8\n a=s2GHSiDfQs-ooOV4uGMA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10", "X-Proofpoint-GUID": "Lb8wds_gHwIwokHcIqe1Y8EOsjHB9qqG", "X-Proofpoint-ORIG-GUID": "Lb8wds_gHwIwokHcIqe1Y8EOsjHB9qqG", "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-04-02_04,2026-04-02_05,2025-10-01_01", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n lowpriorityscore=0 phishscore=0 adultscore=0 impostorscore=0 clxscore=1015\n spamscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 malwarescore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2604020195", "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,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,\n SPF_HELO_NONE=0.001, 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 secure-IPL-code-loading-attributes facility (SCLAF)\nprovides additional security during secure IPL.\n\nAvailability of SCLAF is determined by byte 136 bit 3 of the\nSCLP Read Info block.\n\nThis feature is available starting with the gen16 CPU model.\n\nSigned-off-by: Zhuoying Cai <zycai@linux.ibm.com>\nReviewed-by: Collin Walling <walling@linux.ibm.com>\n---\n docs/specs/s390x-secure-ipl.rst | 18 ++++++++++++++++++\n target/s390x/cpu_features.c | 2 ++\n target/s390x/cpu_features_def.h.inc | 1 +\n target/s390x/cpu_models.c | 3 +++\n target/s390x/gen-features.c | 2 ++\n target/s390x/kvm/kvm.c | 1 +\n 6 files changed, 27 insertions(+)", "diff": "diff --git a/docs/specs/s390x-secure-ipl.rst b/docs/specs/s390x-secure-ipl.rst\nindex d82fb97d5d..756246c45a 100644\n--- a/docs/specs/s390x-secure-ipl.rst\n+++ b/docs/specs/s390x-secure-ipl.rst\n@@ -118,3 +118,21 @@ The guest kernel uses the contents in the IIRB for:\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.\n+\n+Secure Code Loading Attributes Facility\n+---------------------------------------\n+\n+The Secure Code Loading Attributes Facility (SCLAF) enhances system security\n+during the IPL by enforcing additional verification rules.\n+\n+When SCLAF is available, its behavior depends on the IPL mode. It introduces\n+verification of both signed and unsigned components to help ensure that only\n+authorized code is loaded during the IPL process. Any errors detected by SCLAF\n+are reported in the IIRB.\n+\n+Unsigned components are restricted to load addresses at or above absolute\n+storage address ``0x2000``.\n+\n+Signed components must include a Secure Code Loading Attribute Block (SCLAB),\n+which is appended at the very end of the component. The SCLAB defines security\n+attributes for handling the signed code.\ndiff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c\nindex 200bd8c15b..29ea3bfec2 100644\n--- a/target/s390x/cpu_features.c\n+++ b/target/s390x/cpu_features.c\n@@ -120,6 +120,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type,\n * - All SIE facilities because SIE is not available\n * - DIAG318\n * - Secure IPL Facility\n+ * - Secure IPL Code Loading Attributes Facility\n *\n * As VMs can move in and out of protected mode the CPU model\n * doesn't protect us from that problem because it is only\n@@ -152,6 +153,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type,\n break;\n case S390_FEAT_TYPE_SCLP_FAC_IPL:\n clear_be_bit(s390_feat_def(S390_FEAT_SIPL)->bit, data);\n+ clear_be_bit(s390_feat_def(S390_FEAT_SCLAF)->bit, data);\n break;\n default:\n return;\ndiff --git a/target/s390x/cpu_features_def.h.inc b/target/s390x/cpu_features_def.h.inc\nindex bcf8a666e4..f6ba9e87e1 100644\n--- a/target/s390x/cpu_features_def.h.inc\n+++ b/target/s390x/cpu_features_def.h.inc\n@@ -142,6 +142,7 @@ DEF_FEAT(CERT_STORE, \"cstore\", SCLP_FAC134, 5, \"Certificate Store functions\")\n \n /* Features exposed via SCLP SCCB Facilities byte 136 - 137 (bit numbers relative to byte-136) */\n DEF_FEAT(SIPL, \"sipl\", SCLP_FAC_IPL, 1, \"Secure-IPL facility\")\n+DEF_FEAT(SCLAF, \"sclaf\", SCLP_FAC_IPL, 3, \"Secure-IPL-code-loading-attributes facility\")\n \n /* Features exposed via SCLP CPU info. */\n DEF_FEAT(SIE_F2, \"sief2\", SCLP_CPU, 4, \"SIE: interception format 2 (Virtual SIE)\")\ndiff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c\nindex a52e34aa95..7de727a256 100644\n--- a/target/s390x/cpu_models.c\n+++ b/target/s390x/cpu_models.c\n@@ -264,6 +264,7 @@ bool s390_has_feat(S390Feat feat)\n case S390_FEAT_SIE_PFMFI:\n case S390_FEAT_SIE_IBS:\n case S390_FEAT_SIPL:\n+ case S390_FEAT_SCLAF:\n case S390_FEAT_CONFIGURATION_TOPOLOGY:\n return false;\n break;\n@@ -509,6 +510,8 @@ static void check_consistency(const S390CPUModel *model)\n { S390_FEAT_DIAG_318, S390_FEAT_EXTENDED_LENGTH_SCCB },\n { S390_FEAT_CERT_STORE, S390_FEAT_EXTENDED_LENGTH_SCCB },\n { S390_FEAT_SIPL, S390_FEAT_EXTENDED_LENGTH_SCCB },\n+ { S390_FEAT_SCLAF, S390_FEAT_EXTENDED_LENGTH_SCCB },\n+ { S390_FEAT_SCLAF, S390_FEAT_SIPL },\n { S390_FEAT_NNPA, S390_FEAT_VECTOR },\n { S390_FEAT_RDP, S390_FEAT_LOCAL_TLB_CLEARING },\n { S390_FEAT_UV_FEAT_AP, S390_FEAT_AP },\ndiff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c\nindex bd2060ab93..c3e0c6ceff 100644\n--- a/target/s390x/gen-features.c\n+++ b/target/s390x/gen-features.c\n@@ -722,6 +722,7 @@ static uint16_t full_GEN16_GA1[] = {\n S390_FEAT_UV_FEAT_AP_INTR,\n S390_FEAT_CERT_STORE,\n S390_FEAT_SIPL,\n+ S390_FEAT_SCLAF,\n };\n \n static uint16_t full_GEN17_GA1[] = {\n@@ -924,6 +925,7 @@ static uint16_t qemu_MAX[] = {\n S390_FEAT_EXTENDED_LENGTH_SCCB,\n S390_FEAT_CERT_STORE,\n S390_FEAT_SIPL,\n+ S390_FEAT_SCLAF,\n };\n \n /****** END FEATURE DEFS ******/\ndiff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c\nindex 40197cca7a..6b7c606742 100644\n--- a/target/s390x/kvm/kvm.c\n+++ b/target/s390x/kvm/kvm.c\n@@ -2520,6 +2520,7 @@ bool kvm_s390_get_host_cpu_model(S390CPUModel *model, Error **errp)\n \n /* Some Secure IPL facilities are emulated by QEMU */\n set_bit(S390_FEAT_SIPL, model->features);\n+ set_bit(S390_FEAT_SCLAF, model->features);\n \n /* Test for Ultravisor features that influence secure guest behavior */\n query_uv_feat_guest(model->features);\n", "prefixes": [ "v10", "21/30" ] }