From patchwork Fri Apr 26 11:09:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 1091484 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=de.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44rBKg0Tv5z9s5c for ; Fri, 26 Apr 2019 21:15:03 +1000 (AEST) Received: from localhost ([127.0.0.1]:44974 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJyon-00064J-0V for incoming@patchwork.ozlabs.org; Fri, 26 Apr 2019 07:15:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJylW-000397-Li for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:11:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJylV-00040E-GY for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:11:38 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:51704 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJylV-000401-8Q for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:11:37 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3QBBPMF065507 for ; Fri, 26 Apr 2019 07:11:36 -0400 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0a-001b2d01.pphosted.com with ESMTP id 2s4013ava6-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 26 Apr 2019 07:11:30 -0400 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Apr 2019 12:10:09 +0100 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 26 Apr 2019 12:10:07 +0100 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3QBA6XU5570916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Apr 2019 11:10:06 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E8B10C605B; Fri, 26 Apr 2019 11:10:05 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 38250C6055; Fri, 26 Apr 2019 11:10:05 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.17.106]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 26 Apr 2019 11:10:05 +0000 (GMT) From: Christian Borntraeger To: Cornelia Huck Date: Fri, 26 Apr 2019 07:09:54 -0400 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190426111003.21246-1-borntraeger@de.ibm.com> References: <20190426111003.21246-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19042611-0036-0000-0000-00000AAF4BA7 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010998; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01194610; UDB=6.00626339; IPR=6.00975446; MB=3.00026606; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-26 11:10:09 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19042611-0037-0000-0000-00004B8A6E6F Message-Id: <20190426111003.21246-2-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-26_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=827 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904260078 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v2 01/10] linux header sync 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" , Collin Walling , David Hildenbrand , qemu-devel , Halil Pasic , qemu-s390x , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" to be replaced by a proper one Signed-off-by: Christian Borntraeger --- linux-headers/asm-s390/kvm.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h index 0265482f8f..03ab5968c7 100644 --- a/linux-headers/asm-s390/kvm.h +++ b/linux-headers/asm-s390/kvm.h @@ -152,7 +152,10 @@ struct kvm_s390_vm_cpu_subfunc { __u8 pcc[16]; /* with MSA4 */ __u8 ppno[16]; /* with MSA5 */ __u8 kma[16]; /* with MSA8 */ - __u8 reserved[1808]; + __u8 kdsa[16]; /* with MSA9 */ + __u8 sortl[32]; /* with STFLE.150 */ + __u8 dfltcc[32]; /* with STFLE.151 */ + __u8 reserved[1728]; }; /* kvm attributes for crypto */ From patchwork Fri Apr 26 11:09:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 1091490 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=de.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44rBNN4sxKz9s00 for ; Fri, 26 Apr 2019 21:17:24 +1000 (AEST) Received: from localhost ([127.0.0.1]:45027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJyr4-0008Il-EE for incoming@patchwork.ozlabs.org; Fri, 26 Apr 2019 07:17:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJynM-0005MR-GK for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:13:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJynK-00067o-OM for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:13:32 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:43612 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJynK-000668-E0 for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:13:30 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3QB9icL009640 for ; Fri, 26 Apr 2019 07:13:27 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0b-001b2d01.pphosted.com with ESMTP id 2s3y27dm0x-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 26 Apr 2019 07:13:18 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Apr 2019 12:10:21 +0100 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 26 Apr 2019 12:10:08 +0100 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3QBA6Kv40042518 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Apr 2019 11:10:07 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E02A0C6059; Fri, 26 Apr 2019 11:10:06 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2575CC6057; Fri, 26 Apr 2019 11:10:06 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.17.106]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 26 Apr 2019 11:10:06 +0000 (GMT) From: Christian Borntraeger To: Cornelia Huck Date: Fri, 26 Apr 2019 07:09:55 -0400 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190426111003.21246-1-borntraeger@de.ibm.com> References: <20190426111003.21246-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19042611-0012-0000-0000-0000172C49EC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010998; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01194611; UDB=6.00626339; IPR=6.00975446; MB=3.00026607; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-26 11:10:20 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19042611-0013-0000-0000-000057047BB3 Message-Id: <20190426111003.21246-3-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-26_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=953 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904260078 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v2 02/10] s390x/cpumodel: ignore csske for expansion 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" , Collin Walling , David Hildenbrand , qemu-devel , Halil Pasic , qemu-s390x , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" csske will be removed in a future machine. Ignore it for expanding the cpu model. Otherwise qemu falls back to z9. Signed-off-by: Christian Borntraeger Cc: qemu-stable@nongnu.org --- target/s390x/cpu_models.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index e5afa15512..b4bb5de635 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -1322,6 +1322,8 @@ static void init_ignored_base_feat(void) S390_FEAT_KM_TDEA_192, S390_FEAT_KIMD_SHA_1, S390_FEAT_KLMD_SHA_1, + /* CSSKE is deprecated on newer generations */ + S390_FEAT_CONDITIONAL_SSKE, }; int i; From patchwork Fri Apr 26 11:09:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 1091482 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=de.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44rBJk0vQlz9s00 for ; Fri, 26 Apr 2019 21:14:14 +1000 (AEST) Received: from localhost ([127.0.0.1]:44952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJynz-0005FC-SG for incoming@patchwork.ozlabs.org; Fri, 26 Apr 2019 07:14:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJyks-0002Qt-1f for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:10:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJyko-0003Ki-Cu for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:10:56 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:53144) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJykm-0002lq-EO for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:10:54 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3QB8bDI092104 for ; Fri, 26 Apr 2019 07:10:12 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0a-001b2d01.pphosted.com with ESMTP id 2s3y21n6k9-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 26 Apr 2019 07:10:12 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Apr 2019 12:10:11 +0100 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 26 Apr 2019 12:10:09 +0100 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3QBA7g852494460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Apr 2019 11:10:08 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CD310C6055; Fri, 26 Apr 2019 11:10:07 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 135D8C6057; Fri, 26 Apr 2019 11:10:07 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.17.106]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 26 Apr 2019 11:10:06 +0000 (GMT) From: Christian Borntraeger To: Cornelia Huck Date: Fri, 26 Apr 2019 07:09:56 -0400 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190426111003.21246-1-borntraeger@de.ibm.com> References: <20190426111003.21246-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19042611-0016-0000-0000-000009A74D04 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010998; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01194611; UDB=6.00626339; IPR=6.00975446; MB=3.00026606; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-26 11:10:10 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19042611-0017-0000-0000-000042F775A0 Message-Id: <20190426111003.21246-4-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-26_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904260078 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH v2 03/10] s390x/cpumodel: Miscellaneous-Instruction-Extensions Facility 3 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" , Collin Walling , David Hildenbrand , qemu-devel , Halil Pasic , qemu-s390x , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Provide the "Miscellaneous-Instruction-Extensions Facility 3" via stfle.61. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand --- target/s390x/cpu_features.c | 1 + target/s390x/cpu_features_def.h | 1 + 2 files changed, 2 insertions(+) diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index 1843c84aaa..bbd8902087 100644 --- a/target/s390x/cpu_features.c +++ b/target/s390x/cpu_features.c @@ -83,6 +83,7 @@ static const S390FeatDef s390_features[] = { FEAT_INIT("minste2", S390_FEAT_TYPE_STFL, 58, "Miscellaneous-instruction-extensions facility 2"), FEAT_INIT("sema", S390_FEAT_TYPE_STFL, 59, "Semaphore-assist facility"), FEAT_INIT("tsi", S390_FEAT_TYPE_STFL, 60, "Time-slice Instrumentation facility"), + FEAT_INIT("minste3", S390_FEAT_TYPE_STFL, 61, "Miscellaneous-Instruction-Extensions Facility 3"), FEAT_INIT("ri", S390_FEAT_TYPE_STFL, 64, "CPU runtime-instrumentation facility"), FEAT_INIT("zpci", S390_FEAT_TYPE_STFL, 69, "z/PCI facility"), FEAT_INIT("aen", S390_FEAT_TYPE_STFL, 71, "General-purpose-adapter-event-notification facility"), diff --git a/target/s390x/cpu_features_def.h b/target/s390x/cpu_features_def.h index 5fc7e7bf01..31dd678301 100644 --- a/target/s390x/cpu_features_def.h +++ b/target/s390x/cpu_features_def.h @@ -71,6 +71,7 @@ typedef enum { S390_FEAT_MISC_INSTRUCTION_EXT, S390_FEAT_SEMAPHORE_ASSIST, S390_FEAT_TIME_SLICE_INSTRUMENTATION, + S390_FEAT_MISC_INSTRUCTION_EXT3, S390_FEAT_RUNTIME_INSTRUMENTATION, S390_FEAT_ZPCI, S390_FEAT_ADAPTER_EVENT_NOTIFICATION, From patchwork Fri Apr 26 11:09:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 1091488 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=de.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44rBMr6VNWz9s00 for ; Fri, 26 Apr 2019 21:16:56 +1000 (AEST) Received: from localhost ([127.0.0.1]:45023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJyqc-0007gP-Mn for incoming@patchwork.ozlabs.org; Fri, 26 Apr 2019 07:16:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJykv-0002Ww-VC for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:11:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJyku-0003Q8-3T for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:11:01 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46506 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJykt-0003MN-Uq for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:11:00 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3QB9ieZ009639 for ; Fri, 26 Apr 2019 07:10:57 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0b-001b2d01.pphosted.com with ESMTP id 2s3y27dm2k-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 26 Apr 2019 07:10:55 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Apr 2019 12:10:22 +0100 Received: from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 26 Apr 2019 12:10:10 +0100 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3QBA80H52232264 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Apr 2019 11:10:08 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C657CC6055; Fri, 26 Apr 2019 11:10:08 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 000B7C605A; Fri, 26 Apr 2019 11:10:07 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.17.106]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 26 Apr 2019 11:10:07 +0000 (GMT) From: Christian Borntraeger To: Cornelia Huck Date: Fri, 26 Apr 2019 07:09:57 -0400 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190426111003.21246-1-borntraeger@de.ibm.com> References: <20190426111003.21246-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19042611-0012-0000-0000-0000172C49ED X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010998; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01194611; UDB=6.00626339; IPR=6.00975446; MB=3.00026607; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-26 11:10:20 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19042611-0013-0000-0000-000057047BB8 Message-Id: <20190426111003.21246-5-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-26_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904260078 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v2 04/10] s390x/cpumodel: msa9 facility 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" , Collin Walling , David Hildenbrand , qemu-devel , Halil Pasic , qemu-s390x , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Provide the MSA9 facility (stfle.155). This also contains pckmo functions for key wrapping. Keep them in a separate group to disable those as a block if necessary. Signed-off-by: Christian Borntraeger --- target/s390x/cpu_features.c | 32 +++++++++++++++++++++++++ target/s390x/cpu_features.h | 1 + target/s390x/cpu_features_def.h | 31 ++++++++++++++++++++++++ target/s390x/cpu_models.c | 2 ++ target/s390x/gen-features.c | 42 +++++++++++++++++++++++++++++++++ target/s390x/kvm.c | 6 +++++ 6 files changed, 114 insertions(+) diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index bbd8902087..154e2bb354 100644 --- a/target/s390x/cpu_features.c +++ b/target/s390x/cpu_features.c @@ -108,6 +108,7 @@ static const S390FeatDef s390_features[] = { FEAT_INIT("irbm", S390_FEAT_TYPE_STFL, 145, "Insert-reference-bits-multiple facility"), FEAT_INIT("msa8-base", S390_FEAT_TYPE_STFL, 146, "Message-security-assist-extension-8 facility (excluding subfunctions)"), FEAT_INIT("cmmnt", S390_FEAT_TYPE_STFL, 147, "CMM: ESSA-enhancement (no translate) facility"), + FEAT_INIT("msa9-base", S390_FEAT_TYPE_STFL, 155, "Message-security-assist-extension-9 facility (excluding subfunctions)"), FEAT_INIT("etoken", S390_FEAT_TYPE_STFL, 156, "Etoken facility"), /* SCLP SCCB Byte 80 - 98 (bit numbers relative to byte-80) */ @@ -242,6 +243,11 @@ static const S390FeatDef s390_features[] = { FEAT_INIT("pckmo-aes-128", S390_FEAT_TYPE_PCKMO, 18, "PCKMO Encrypted-AES-128-Key"), FEAT_INIT("pckmo-aes-192", S390_FEAT_TYPE_PCKMO, 19, "PCKMO Encrypted-AES-192-Key"), FEAT_INIT("pckmo-aes-256", S390_FEAT_TYPE_PCKMO, 20, "PCKMO Encrypted-AES-256-Key"), + FEAT_INIT("pckmo-ecc-p256", S390_FEAT_TYPE_PCKMO, 32, "PCKMO Encrypt-ECC-P256-Key"), + FEAT_INIT("pckmo-ecc-p384", S390_FEAT_TYPE_PCKMO, 33, "PCKMO Encrypt-ECC-P384-Key"), + FEAT_INIT("pckmo-ecc-p521", S390_FEAT_TYPE_PCKMO, 34, "PCKMO Encrypt-ECC-P521-Key"), + FEAT_INIT("pckmo-ecc-ed25519", S390_FEAT_TYPE_PCKMO, 40 , "PCKMO Encrypt-ECC-Ed25519-Key"), + FEAT_INIT("pckmo-ecc-ed448", S390_FEAT_TYPE_PCKMO, 41 , "PCKMO Encrypt-ECC-Ed448-Key"), FEAT_INIT("kmctr-dea", S390_FEAT_TYPE_KMCTR, 1, "KMCTR DEA"), FEAT_INIT("kmctr-tdea-128", S390_FEAT_TYPE_KMCTR, 2, "KMCTR TDEA-128"), @@ -298,6 +304,13 @@ static const S390FeatDef s390_features[] = { FEAT_INIT("pcc-xts-aes-256", S390_FEAT_TYPE_PCC, 52, "PCC Compute-XTS-Parameter-Using-AES-256"), FEAT_INIT("pcc-xts-eaes-128", S390_FEAT_TYPE_PCC, 58, "PCC Compute-XTS-Parameter-Using-Encrypted-AES-128"), FEAT_INIT("pcc-xts-eaes-256", S390_FEAT_TYPE_PCC, 60, "PCC Compute-XTS-Parameter-Using-Encrypted-AES-256"), + FEAT_INIT("pcc-scalar-mult-p256", S390_FEAT_TYPE_PCC, 64, "PCC Scalar-Multiply-P256"), + FEAT_INIT("pcc-scalar-mult-p384", S390_FEAT_TYPE_PCC, 65, "PCC Scalar-Multiply-P384"), + FEAT_INIT("pcc-scalar-mult-p521", S390_FEAT_TYPE_PCC, 66, "PCC Scalar-Multiply-P521"), + FEAT_INIT("pcc-scalar-mult-ed25519", S390_FEAT_TYPE_PCC, 72, "PCC Scalar-Multiply-Ed25519"), + FEAT_INIT("pcc-scalar-mult-ed448", S390_FEAT_TYPE_PCC, 73, "PCC Scalar-Multiply-Ed448"), + FEAT_INIT("pcc-scalar-mult-x25519", S390_FEAT_TYPE_PCC, 80, "PCC Scalar-Multiply-X25519"), + FEAT_INIT("pcc-scalar-mult-x448", S390_FEAT_TYPE_PCC, 81, "PCC Scalar-Multiply-X448"), FEAT_INIT("ppno-sha-512-drng", S390_FEAT_TYPE_PPNO, 3, "PPNO SHA-512-DRNG"), FEAT_INIT("prno-trng-qrtcr", S390_FEAT_TYPE_PPNO, 112, "PRNO TRNG-Query-Raw-to-Conditioned-Ratio"), @@ -309,6 +322,22 @@ static const S390FeatDef s390_features[] = { FEAT_INIT("kma-gcm-eaes-128", S390_FEAT_TYPE_KMA, 26, "KMA GCM-Encrypted-AES-128"), FEAT_INIT("kma-gcm-eaes-192", S390_FEAT_TYPE_KMA, 27, "KMA GCM-Encrypted-AES-192"), FEAT_INIT("kma-gcm-eaes-256", S390_FEAT_TYPE_KMA, 28, "KMA GCM-Encrypted-AES-256"), + + FEAT_INIT("kdsa-ecdsa-verify-p256", S390_FEAT_TYPE_KDSA, 1, "KDSA ECDSA-Verify-P256"), + FEAT_INIT("kdsa-ecdsa-verify-p384", S390_FEAT_TYPE_KDSA, 2, "KDSA ECDSA-Verify-P384"), + FEAT_INIT("kdsa-ecdsa-verify-p521", S390_FEAT_TYPE_KDSA, 3, "KDSA ECDSA-Verify-P521"), + FEAT_INIT("kdsa-ecdsa-sign-p256", S390_FEAT_TYPE_KDSA, 9, "KDSA ECDSA-Sign-P256"), + FEAT_INIT("kdsa-ecdsa-sign-p384", S390_FEAT_TYPE_KDSA, 10, "KDSA ECDSA-Sign-P384"), + FEAT_INIT("kdsa-ecdsa-sign-p521", S390_FEAT_TYPE_KDSA, 11, "KDSA ECDSA-Sign-P521"), + FEAT_INIT("kdsa-eecdsa-sign-p256", S390_FEAT_TYPE_KDSA, 17, "KDSA Encrypted-ECDSA-Sign-P256"), + FEAT_INIT("kdsa-eecdsa-sign-p384", S390_FEAT_TYPE_KDSA, 18, "KDSA Encrypted-ECDSA-Sign-P384"), + FEAT_INIT("kdsa-eecdsa-sign-p521", S390_FEAT_TYPE_KDSA, 19, "KDSA Encrypted-ECDSA-Sign-P521"), + FEAT_INIT("kdsa-eddsa-verify-ed25519", S390_FEAT_TYPE_KDSA, 32, "KDSA EdDSA-Verify-Ed25519"), + FEAT_INIT("kdsa-eddsa-verify-ed448", S390_FEAT_TYPE_KDSA, 36, "KDSA EdDSA-Verify-Ed448"), + FEAT_INIT("kdsa-eddsa-sign-ed25519", S390_FEAT_TYPE_KDSA, 40, "KDSA EdDSA-Sign-Ed25519"), + FEAT_INIT("kdsa-eddsa-sign-ed448", S390_FEAT_TYPE_KDSA, 44, "KDSA EdDSA-Sign-Ed448"), + FEAT_INIT("kdsa-eeddsa-sign-ed25519", S390_FEAT_TYPE_KDSA, 48, "KDSA Encrypted-EdDSA-Sign-Ed25519"), + FEAT_INIT("kdsa-eeddsa-sign-ed448", S390_FEAT_TYPE_KDSA, 52, "KDSA Encrypted-EdDSA-Sign-Ed448"), }; const S390FeatDef *s390_feat_def(S390Feat feat) @@ -371,6 +400,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type, case S390_FEAT_TYPE_PCC: case S390_FEAT_TYPE_PPNO: case S390_FEAT_TYPE_KMA: + case S390_FEAT_TYPE_KDSA: set_be_bit(0, data); /* query is always available */ break; default: @@ -466,6 +496,8 @@ static S390FeatGroupDef s390_feature_groups[] = { FEAT_GROUP_INIT("msa6", MSA_EXT_6, "Message-security-assist-extension 6 facility"), FEAT_GROUP_INIT("msa7", MSA_EXT_7, "Message-security-assist-extension 7 facility"), FEAT_GROUP_INIT("msa8", MSA_EXT_8, "Message-security-assist-extension 8 facility"), + FEAT_GROUP_INIT("msa9", MSA_EXT_9, "Message-security-assist-extension 9 facility"), + FEAT_GROUP_INIT("msa9_pckmo", MSA_EXT_9_PCKMO, "Message-security-assist-extension 9 PCKMO subfunctions"), FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"), }; diff --git a/target/s390x/cpu_features.h b/target/s390x/cpu_features.h index effe790271..5ffd3db083 100644 --- a/target/s390x/cpu_features.h +++ b/target/s390x/cpu_features.h @@ -39,6 +39,7 @@ typedef enum { S390_FEAT_TYPE_PCC, S390_FEAT_TYPE_PPNO, S390_FEAT_TYPE_KMA, + S390_FEAT_TYPE_KDSA, } S390FeatType; /* Definition of a CPU feature */ diff --git a/target/s390x/cpu_features_def.h b/target/s390x/cpu_features_def.h index 31dd678301..030784811b 100644 --- a/target/s390x/cpu_features_def.h +++ b/target/s390x/cpu_features_def.h @@ -96,6 +96,7 @@ typedef enum { S390_FEAT_INSERT_REFERENCE_BITS_MULT, S390_FEAT_MSA_EXT_8, S390_FEAT_CMM_NT, + S390_FEAT_MSA_EXT_9, S390_FEAT_ETOKEN, /* Sclp Conf Char */ @@ -240,6 +241,11 @@ typedef enum { S390_FEAT_PCKMO_AES_128, S390_FEAT_PCKMO_AES_192, S390_FEAT_PCKMO_AES_256, + S390_FEAT_PCKMO_ECC_P256, + S390_FEAT_PCKMO_ECC_P384, + S390_FEAT_PCKMO_ECC_P521, + S390_FEAT_PCKMO_ECC_ED25519, + S390_FEAT_PCKMO_ECC_ED448, /* KMCTR */ S390_FEAT_KMCTR_DEA, @@ -300,6 +306,13 @@ typedef enum { S390_FEAT_PCC_XTS_AES_256, S390_FEAT_PCC_XTS_EAES_128, S390_FEAT_PCC_XTS_EAES_256, + S390_FEAT_PCC_SCALAR_MULT_P256, + S390_FEAT_PCC_SCALAR_MULT_P384, + S390_FEAT_PCC_SCALAR_MULT_P512, + S390_FEAT_PCC_SCALAR_MULT_ED25519, + S390_FEAT_PCC_SCALAR_MULT_ED448, + S390_FEAT_PCC_SCALAR_MULT_X25519, + S390_FEAT_PCC_SCALAR_MULT_X448, /* PPNO/PRNO */ S390_FEAT_PPNO_SHA_512_DRNG, @@ -313,6 +326,24 @@ typedef enum { S390_FEAT_KMA_GCM_EAES_128, S390_FEAT_KMA_GCM_EAES_192, S390_FEAT_KMA_GCM_EAES_256, + + /* KDSA */ + S390_FEAT_ECDSA_VERIFY_P256, + S390_FEAT_ECDSA_VERIFY_P384, + S390_FEAT_ECDSA_VERIFY_P512, + S390_FEAT_ECDSA_SIGN_P256, + S390_FEAT_ECDSA_SIGN_P384, + S390_FEAT_ECDSA_SIGN_P512, + S390_FEAT_EECDSA_SIGN_P256, + S390_FEAT_EECDSA_SIGN_P384, + S390_FEAT_EECDSA_SIGN_P512, + S390_FEAT_EDDSA_VERIFY_ED25519, + S390_FEAT_EDDSA_VERIFY_ED448, + S390_FEAT_EDDSA_SIGN_ED25519, + S390_FEAT_EDDSA_SIGN_ED448, + S390_FEAT_EEDDSA_SIGN_ED25519, + S390_FEAT_EEDDSA_SIGN_ED448, + S390_FEAT_MAX, } S390Feat; diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index b4bb5de635..d683635eb5 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -782,6 +782,8 @@ static void check_consistency(const S390CPUModel *model) { S390_FEAT_SIE_CMMA, S390_FEAT_SIE_GSLS }, { S390_FEAT_SIE_PFMFI, S390_FEAT_EDAT }, { S390_FEAT_MSA_EXT_8, S390_FEAT_MSA_EXT_3 }, + { S390_FEAT_MSA_EXT_9, S390_FEAT_MSA_EXT_3 }, + { S390_FEAT_MSA_EXT_9, S390_FEAT_MSA_EXT_4 }, { S390_FEAT_MULTIPLE_EPOCH, S390_FEAT_TOD_CLOCK_STEERING }, { S390_FEAT_VECTOR_PACKED_DECIMAL, S390_FEAT_VECTOR }, { S390_FEAT_VECTOR_ENH, S390_FEAT_VECTOR }, diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index e4739a6b9f..a2f9e2b43f 100644 --- a/target/s390x/gen-features.c +++ b/target/s390x/gen-features.c @@ -213,6 +213,38 @@ S390_FEAT_KMA_GCM_EAES_192, \ S390_FEAT_KMA_GCM_EAES_256 +#define S390_FEAT_GROUP_MSA_EXT_9 \ + S390_FEAT_MSA_EXT_9, \ + S390_FEAT_ECDSA_VERIFY_P256, \ + S390_FEAT_ECDSA_VERIFY_P384, \ + S390_FEAT_ECDSA_VERIFY_P512, \ + S390_FEAT_ECDSA_SIGN_P256, \ + S390_FEAT_ECDSA_SIGN_P384, \ + S390_FEAT_ECDSA_SIGN_P512, \ + S390_FEAT_EECDSA_SIGN_P256, \ + S390_FEAT_EECDSA_SIGN_P384, \ + S390_FEAT_EECDSA_SIGN_P512, \ + S390_FEAT_EDDSA_VERIFY_ED25519, \ + S390_FEAT_EDDSA_VERIFY_ED448, \ + S390_FEAT_EDDSA_SIGN_ED25519, \ + S390_FEAT_EDDSA_SIGN_ED448, \ + S390_FEAT_EEDDSA_SIGN_ED25519, \ + S390_FEAT_EEDDSA_SIGN_ED448, \ + S390_FEAT_PCC_SCALAR_MULT_P256, \ + S390_FEAT_PCC_SCALAR_MULT_P384, \ + S390_FEAT_PCC_SCALAR_MULT_P512, \ + S390_FEAT_PCC_SCALAR_MULT_ED25519, \ + S390_FEAT_PCC_SCALAR_MULT_ED448, \ + S390_FEAT_PCC_SCALAR_MULT_X25519, \ + S390_FEAT_PCC_SCALAR_MULT_X448 + +#define S390_FEAT_GROUP_MSA_EXT_9_PCKMO \ + S390_FEAT_PCKMO_ECC_P256, \ + S390_FEAT_PCKMO_ECC_P384, \ + S390_FEAT_PCKMO_ECC_P521, \ + S390_FEAT_PCKMO_ECC_ED25519, \ + S390_FEAT_PCKMO_ECC_ED448 + /* cpu feature groups */ static uint16_t group_PLO[] = { S390_FEAT_GROUP_PLO, @@ -254,6 +286,14 @@ static uint16_t group_MSA_EXT_8[] = { S390_FEAT_GROUP_MSA_EXT_8, }; +static uint16_t group_MSA_EXT_9[] = { + S390_FEAT_GROUP_MSA_EXT_9, +}; + +static uint16_t group_MSA_EXT_9_PCKMO[] = { + S390_FEAT_GROUP_MSA_EXT_9_PCKMO, +}; + /* Base features (in order of release) * Only non-hypervisor managed features belong here. * Base feature sets are static meaning they do not change in future QEMU @@ -709,6 +749,8 @@ static FeatGroupDefSpec FeatGroupDef[] = { FEAT_GROUP_INITIALIZER(MSA_EXT_6), FEAT_GROUP_INITIALIZER(MSA_EXT_7), FEAT_GROUP_INITIALIZER(MSA_EXT_8), + FEAT_GROUP_INITIALIZER(MSA_EXT_9), + FEAT_GROUP_INITIALIZER(MSA_EXT_9_PCKMO), FEAT_GROUP_INITIALIZER(MULTIPLE_EPOCH_PTFF), }; diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index 7df7be4a1b..de0b984b68 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -2073,6 +2073,9 @@ static int query_cpu_subfunc(S390FeatBitmap features) if (test_bit(S390_FEAT_MSA_EXT_8, features)) { s390_add_from_feat_block(features, S390_FEAT_TYPE_KMA, prop.kma); } + if (test_bit(S390_FEAT_MSA_EXT_9, features)) { + s390_add_from_feat_block(features, S390_FEAT_TYPE_KDSA, prop.kdsa); + } return 0; } @@ -2117,6 +2120,9 @@ static int configure_cpu_subfunc(const S390FeatBitmap features) if (test_bit(S390_FEAT_MSA_EXT_8, features)) { s390_fill_feat_block(features, S390_FEAT_TYPE_KMA, prop.kma); } + if (test_bit(S390_FEAT_MSA_EXT_9, features)) { + s390_fill_feat_block(features, S390_FEAT_TYPE_KDSA, prop.kdsa); + } return kvm_vm_ioctl(kvm_state, KVM_SET_DEVICE_ATTR, &attr); } From patchwork Fri Apr 26 11:09:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 1091483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=de.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44rBK76QGsz9s00 for ; Fri, 26 Apr 2019 21:14:35 +1000 (AEST) Received: from localhost ([127.0.0.1]:44970 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJyoL-0005ao-Qm for incoming@patchwork.ozlabs.org; Fri, 26 Apr 2019 07:14:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJylT-00036P-Hv for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:11:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJylS-0003y0-L4 for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:11:35 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50670 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJylQ-0003w8-Iw for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:11:34 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3QBBTCw065619 for ; Fri, 26 Apr 2019 07:11:31 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0a-001b2d01.pphosted.com with ESMTP id 2s4013ave8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 26 Apr 2019 07:11:30 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Apr 2019 12:10:13 +0100 Received: from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 26 Apr 2019 12:10:11 +0100 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3QBA9t233685660 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Apr 2019 11:10:09 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B349EC605A; Fri, 26 Apr 2019 11:10:09 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ED68BC6057; Fri, 26 Apr 2019 11:10:08 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.17.106]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 26 Apr 2019 11:10:08 +0000 (GMT) From: Christian Borntraeger To: Cornelia Huck Date: Fri, 26 Apr 2019 07:09:58 -0400 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190426111003.21246-1-borntraeger@de.ibm.com> References: <20190426111003.21246-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19042611-0016-0000-0000-000009A74D05 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010998; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01194611; UDB=6.00626339; IPR=6.00975446; MB=3.00026606; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-26 11:10:12 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19042611-0017-0000-0000-000042F775A4 Message-Id: <20190426111003.21246-6-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-26_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904260078 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v2 05/10] s390x/cpumodel: vector enhancements 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" , Collin Walling , David Hildenbrand , qemu-devel , Halil Pasic , qemu-s390x , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Add vector enhancements to the cpu model. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand --- target/s390x/cpu_features.c | 2 ++ target/s390x/cpu_features_def.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index 154e2bb354..35873253be 100644 --- a/target/s390x/cpu_features.c +++ b/target/s390x/cpu_features.c @@ -108,6 +108,8 @@ static const S390FeatDef s390_features[] = { FEAT_INIT("irbm", S390_FEAT_TYPE_STFL, 145, "Insert-reference-bits-multiple facility"), FEAT_INIT("msa8-base", S390_FEAT_TYPE_STFL, 146, "Message-security-assist-extension-8 facility (excluding subfunctions)"), FEAT_INIT("cmmnt", S390_FEAT_TYPE_STFL, 147, "CMM: ESSA-enhancement (no translate) facility"), + FEAT_INIT("vxeh2", S390_FEAT_TYPE_STFL, 148, "Vector Enhancements facility 2"), + FEAT_INIT("vxbeh", S390_FEAT_TYPE_STFL, 152, "Vector BCD enhancements facility 1"), FEAT_INIT("msa9-base", S390_FEAT_TYPE_STFL, 155, "Message-security-assist-extension-9 facility (excluding subfunctions)"), FEAT_INIT("etoken", S390_FEAT_TYPE_STFL, 156, "Etoken facility"), diff --git a/target/s390x/cpu_features_def.h b/target/s390x/cpu_features_def.h index 030784811b..ce2223c9d7 100644 --- a/target/s390x/cpu_features_def.h +++ b/target/s390x/cpu_features_def.h @@ -96,6 +96,8 @@ typedef enum { S390_FEAT_INSERT_REFERENCE_BITS_MULT, S390_FEAT_MSA_EXT_8, S390_FEAT_CMM_NT, + S390_FEAT_VECTOR_ENH2, + S390_FEAT_VECTOR_BCD_ENH, S390_FEAT_MSA_EXT_9, S390_FEAT_ETOKEN, From patchwork Fri Apr 26 11:09:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 1091491 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=de.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44rBP95Kn8z9s00 for ; Fri, 26 Apr 2019 21:18:05 +1000 (AEST) Received: from localhost ([127.0.0.1]:45035 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJyrh-0000fq-HI for incoming@patchwork.ozlabs.org; Fri, 26 Apr 2019 07:18:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJyms-0004t3-6w for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:13:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJymp-0005cW-BN for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:13:02 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56010 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJymp-0005af-6x for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:12:59 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3QBCrDd108326 for ; Fri, 26 Apr 2019 07:12:58 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0b-001b2d01.pphosted.com with ESMTP id 2s3x5grtk1-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 26 Apr 2019 07:12:49 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Apr 2019 12:10:14 +0100 Received: from b03cxnp08027.gho.boulder.ibm.com (9.17.130.19) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 26 Apr 2019 12:10:12 +0100 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3QBAAms34210028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Apr 2019 11:10:10 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9FFBDC605A; Fri, 26 Apr 2019 11:10:10 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DA879C6057; Fri, 26 Apr 2019 11:10:09 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.17.106]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 26 Apr 2019 11:10:09 +0000 (GMT) From: Christian Borntraeger To: Cornelia Huck Date: Fri, 26 Apr 2019 07:09:59 -0400 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190426111003.21246-1-borntraeger@de.ibm.com> References: <20190426111003.21246-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19042611-0020-0000-0000-00000EDD4C78 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010998; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01194610; UDB=6.00626339; IPR=6.00975446; MB=3.00026606; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-26 11:10:14 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19042611-0021-0000-0000-000065935DB2 Message-Id: <20190426111003.21246-7-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-26_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904260078 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v2 06/10] s390x/cpumodel: enhanced sort facility 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" , Collin Walling , David Hildenbrand , qemu-devel , Halil Pasic , qemu-s390x , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" add the enhanced sort facility. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand --- target/s390x/cpu_features.c | 10 ++++++++++ target/s390x/cpu_features.h | 1 + target/s390x/cpu_features_def.h | 8 ++++++++ target/s390x/gen-features.c | 14 ++++++++++++++ target/s390x/kvm.c | 6 ++++++ 5 files changed, 39 insertions(+) diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index 35873253be..1d19b3072e 100644 --- a/target/s390x/cpu_features.c +++ b/target/s390x/cpu_features.c @@ -109,6 +109,7 @@ static const S390FeatDef s390_features[] = { FEAT_INIT("msa8-base", S390_FEAT_TYPE_STFL, 146, "Message-security-assist-extension-8 facility (excluding subfunctions)"), FEAT_INIT("cmmnt", S390_FEAT_TYPE_STFL, 147, "CMM: ESSA-enhancement (no translate) facility"), FEAT_INIT("vxeh2", S390_FEAT_TYPE_STFL, 148, "Vector Enhancements facility 2"), + FEAT_INIT("esort-base", S390_FEAT_TYPE_STFL, 150, "Enhanced-sort facility (excluding subfunctions)"), FEAT_INIT("vxbeh", S390_FEAT_TYPE_STFL, 152, "Vector BCD enhancements facility 1"), FEAT_INIT("msa9-base", S390_FEAT_TYPE_STFL, 155, "Message-security-assist-extension-9 facility (excluding subfunctions)"), FEAT_INIT("etoken", S390_FEAT_TYPE_STFL, 156, "Etoken facility"), @@ -340,6 +341,12 @@ static const S390FeatDef s390_features[] = { FEAT_INIT("kdsa-eddsa-sign-ed448", S390_FEAT_TYPE_KDSA, 44, "KDSA EdDSA-Sign-Ed448"), FEAT_INIT("kdsa-eeddsa-sign-ed25519", S390_FEAT_TYPE_KDSA, 48, "KDSA Encrypted-EdDSA-Sign-Ed25519"), FEAT_INIT("kdsa-eeddsa-sign-ed448", S390_FEAT_TYPE_KDSA, 52, "KDSA Encrypted-EdDSA-Sign-Ed448"), + + FEAT_INIT("sortl-sflr", S390_FEAT_TYPE_SORTL, 1, "SORTL SFLR"), + FEAT_INIT("sortl-svlr", S390_FEAT_TYPE_SORTL, 2, "SORTL SVLR"), + FEAT_INIT("sortl-32", S390_FEAT_TYPE_SORTL, 130, "SORTL 32 input lists"), + FEAT_INIT("sortl-128", S390_FEAT_TYPE_SORTL, 132, "SORTL 128 input lists"), + FEAT_INIT("sortl-f0", S390_FEAT_TYPE_SORTL, 192, "SORTL format 0 parameter-block"), }; const S390FeatDef *s390_feat_def(S390Feat feat) @@ -403,6 +410,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type, case S390_FEAT_TYPE_PPNO: case S390_FEAT_TYPE_KMA: case S390_FEAT_TYPE_KDSA: + case S390_FEAT_TYPE_SORTL: set_be_bit(0, data); /* query is always available */ break; default: @@ -430,6 +438,7 @@ void s390_add_from_feat_block(S390FeatBitmap features, S390FeatType type, nr_bits = 16384; break; case S390_FEAT_TYPE_PLO: + case S390_FEAT_TYPE_SORTL: nr_bits = 256; break; default: @@ -501,6 +510,7 @@ static S390FeatGroupDef s390_feature_groups[] = { FEAT_GROUP_INIT("msa9", MSA_EXT_9, "Message-security-assist-extension 9 facility"), FEAT_GROUP_INIT("msa9_pckmo", MSA_EXT_9_PCKMO, "Message-security-assist-extension 9 PCKMO subfunctions"), FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"), + FEAT_GROUP_INIT("esort", ENH_SORT, "Enhanced-sort facility"), }; const S390FeatGroupDef *s390_feat_group_def(S390FeatGroup group) diff --git a/target/s390x/cpu_features.h b/target/s390x/cpu_features.h index 5ffd3db083..3b8c5b25dd 100644 --- a/target/s390x/cpu_features.h +++ b/target/s390x/cpu_features.h @@ -40,6 +40,7 @@ typedef enum { S390_FEAT_TYPE_PPNO, S390_FEAT_TYPE_KMA, S390_FEAT_TYPE_KDSA, + S390_FEAT_TYPE_SORTL, } S390FeatType; /* Definition of a CPU feature */ diff --git a/target/s390x/cpu_features_def.h b/target/s390x/cpu_features_def.h index ce2223c9d7..bb8585847f 100644 --- a/target/s390x/cpu_features_def.h +++ b/target/s390x/cpu_features_def.h @@ -97,6 +97,7 @@ typedef enum { S390_FEAT_MSA_EXT_8, S390_FEAT_CMM_NT, S390_FEAT_VECTOR_ENH2, + S390_FEAT_ESORT_BASE, S390_FEAT_VECTOR_BCD_ENH, S390_FEAT_MSA_EXT_9, S390_FEAT_ETOKEN, @@ -346,6 +347,13 @@ typedef enum { S390_FEAT_EEDDSA_SIGN_ED25519, S390_FEAT_EEDDSA_SIGN_ED448, + /* SORTL */ + S390_FEAT_SORTL_SFLR, + S390_FEAT_SORTL_SVLR, + S390_FEAT_SORTL_32, + S390_FEAT_SORTL_128, + S390_FEAT_SORTL_F0, + S390_FEAT_MAX, } S390Feat; diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index a2f9e2b43f..0a62cc5631 100644 --- a/target/s390x/gen-features.c +++ b/target/s390x/gen-features.c @@ -245,6 +245,15 @@ S390_FEAT_PCKMO_ECC_ED25519, \ S390_FEAT_PCKMO_ECC_ED448 +#define S390_FEAT_GROUP_ENH_SORT \ + S390_FEAT_ESORT_BASE, \ + S390_FEAT_SORTL_SFLR, \ + S390_FEAT_SORTL_SVLR, \ + S390_FEAT_SORTL_32, \ + S390_FEAT_SORTL_128, \ + S390_FEAT_SORTL_F0 + + /* cpu feature groups */ static uint16_t group_PLO[] = { S390_FEAT_GROUP_PLO, @@ -294,6 +303,10 @@ static uint16_t group_MSA_EXT_9_PCKMO[] = { S390_FEAT_GROUP_MSA_EXT_9_PCKMO, }; +static uint16_t group_ENH_SORT[] = { + S390_FEAT_GROUP_ENH_SORT, +}; + /* Base features (in order of release) * Only non-hypervisor managed features belong here. * Base feature sets are static meaning they do not change in future QEMU @@ -752,6 +765,7 @@ static FeatGroupDefSpec FeatGroupDef[] = { FEAT_GROUP_INITIALIZER(MSA_EXT_9), FEAT_GROUP_INITIALIZER(MSA_EXT_9_PCKMO), FEAT_GROUP_INITIALIZER(MULTIPLE_EPOCH_PTFF), + FEAT_GROUP_INITIALIZER(ENH_SORT), }; #define QEMU_FEAT_INITIALIZER(_name) \ diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index de0b984b68..f91f436a31 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -2076,6 +2076,9 @@ static int query_cpu_subfunc(S390FeatBitmap features) if (test_bit(S390_FEAT_MSA_EXT_9, features)) { s390_add_from_feat_block(features, S390_FEAT_TYPE_KDSA, prop.kdsa); } + if (test_bit(S390_FEAT_ESORT_BASE, features)) { + s390_add_from_feat_block(features, S390_FEAT_TYPE_SORTL, prop.sortl); + } return 0; } @@ -2123,6 +2126,9 @@ static int configure_cpu_subfunc(const S390FeatBitmap features) if (test_bit(S390_FEAT_MSA_EXT_9, features)) { s390_fill_feat_block(features, S390_FEAT_TYPE_KDSA, prop.kdsa); } + if (test_bit(S390_FEAT_ESORT_BASE, features)) { + s390_fill_feat_block(features, S390_FEAT_TYPE_SORTL, prop.sortl); + } return kvm_vm_ioctl(kvm_state, KVM_SET_DEVICE_ATTR, &attr); } From patchwork Fri Apr 26 11:10:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 1091495 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=de.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44rBRl1PzCz9s00 for ; Fri, 26 Apr 2019 21:20:19 +1000 (AEST) Received: from localhost ([127.0.0.1]:45054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJyts-0002SR-Mx for incoming@patchwork.ozlabs.org; Fri, 26 Apr 2019 07:20:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJylG-0002vK-LY for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:11:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJylE-0003kn-3M for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:11:22 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:52760) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJylD-0002pu-OM for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:11:20 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3QB8bTG102062 for ; Fri, 26 Apr 2019 07:10:16 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0a-001b2d01.pphosted.com with ESMTP id 2s40uj035d-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 26 Apr 2019 07:10:16 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Apr 2019 12:10:15 +0100 Received: from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 26 Apr 2019 12:10:13 +0100 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3QBABHT66650322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Apr 2019 11:10:11 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8DB30C6055; Fri, 26 Apr 2019 11:10:11 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C6BEEC6057; Fri, 26 Apr 2019 11:10:10 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.17.106]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 26 Apr 2019 11:10:10 +0000 (GMT) From: Christian Borntraeger To: Cornelia Huck Date: Fri, 26 Apr 2019 07:10:00 -0400 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190426111003.21246-1-borntraeger@de.ibm.com> References: <20190426111003.21246-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19042611-0016-0000-0000-000009A74D06 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010998; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01194611; UDB=6.00626339; IPR=6.00975446; MB=3.00026606; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-26 11:10:14 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19042611-0017-0000-0000-000042F775AA Message-Id: <20190426111003.21246-8-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-26_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904260078 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH v2 07/10] s390x/cpumodel: add Deflate-conversion facility 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" , Collin Walling , David Hildenbrand , qemu-devel , Halil Pasic , qemu-s390x , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" add the deflate conversion facility. Signed-off-by: Christian Borntraeger --- target/s390x/cpu_features.c | 9 +++++++++ target/s390x/cpu_features.h | 1 + target/s390x/cpu_features_def.h | 7 +++++++ target/s390x/gen-features.c | 12 ++++++++++++ target/s390x/kvm.c | 6 ++++++ 5 files changed, 35 insertions(+) diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index 1d19b3072e..f64f581c86 100644 --- a/target/s390x/cpu_features.c +++ b/target/s390x/cpu_features.c @@ -110,6 +110,7 @@ static const S390FeatDef s390_features[] = { FEAT_INIT("cmmnt", S390_FEAT_TYPE_STFL, 147, "CMM: ESSA-enhancement (no translate) facility"), FEAT_INIT("vxeh2", S390_FEAT_TYPE_STFL, 148, "Vector Enhancements facility 2"), FEAT_INIT("esort-base", S390_FEAT_TYPE_STFL, 150, "Enhanced-sort facility (excluding subfunctions)"), + FEAT_INIT("deflate-base", S390_FEAT_TYPE_STFL, 151, "Deflate-conversion facility (excluding subfunctions)"), FEAT_INIT("vxbeh", S390_FEAT_TYPE_STFL, 152, "Vector BCD enhancements facility 1"), FEAT_INIT("msa9-base", S390_FEAT_TYPE_STFL, 155, "Message-security-assist-extension-9 facility (excluding subfunctions)"), FEAT_INIT("etoken", S390_FEAT_TYPE_STFL, 156, "Etoken facility"), @@ -347,6 +348,11 @@ static const S390FeatDef s390_features[] = { FEAT_INIT("sortl-32", S390_FEAT_TYPE_SORTL, 130, "SORTL 32 input lists"), FEAT_INIT("sortl-128", S390_FEAT_TYPE_SORTL, 132, "SORTL 128 input lists"), FEAT_INIT("sortl-f0", S390_FEAT_TYPE_SORTL, 192, "SORTL format 0 parameter-block"), + + FEAT_INIT("dfltcc-gdht", S390_FEAT_TYPE_DFLTCC, 1, "DFLTCC GDHT"), + FEAT_INIT("dfltcc-cmpr", S390_FEAT_TYPE_DFLTCC, 2, "DFLTCC CMPR"), + FEAT_INIT("dfltcc-xpnd", S390_FEAT_TYPE_DFLTCC, 4, "DFLTCC XPND"), + FEAT_INIT("dfltcc-f0", S390_FEAT_TYPE_DFLTCC, 192, "DFLTCC format 0 parameter-block"), }; const S390FeatDef *s390_feat_def(S390Feat feat) @@ -411,6 +417,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type, case S390_FEAT_TYPE_KMA: case S390_FEAT_TYPE_KDSA: case S390_FEAT_TYPE_SORTL: + case S390_FEAT_TYPE_DFLTCC: set_be_bit(0, data); /* query is always available */ break; default: @@ -439,6 +446,7 @@ void s390_add_from_feat_block(S390FeatBitmap features, S390FeatType type, break; case S390_FEAT_TYPE_PLO: case S390_FEAT_TYPE_SORTL: + case S390_FEAT_TYPE_DFLTCC: nr_bits = 256; break; default: @@ -511,6 +519,7 @@ static S390FeatGroupDef s390_feature_groups[] = { FEAT_GROUP_INIT("msa9_pckmo", MSA_EXT_9_PCKMO, "Message-security-assist-extension 9 PCKMO subfunctions"), FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"), FEAT_GROUP_INIT("esort", ENH_SORT, "Enhanced-sort facility"), + FEAT_GROUP_INIT("deflate", DEFLATE_CONVERSION, "Deflate-conversion facility"), }; const S390FeatGroupDef *s390_feat_group_def(S390FeatGroup group) diff --git a/target/s390x/cpu_features.h b/target/s390x/cpu_features.h index 3b8c5b25dd..da695a8346 100644 --- a/target/s390x/cpu_features.h +++ b/target/s390x/cpu_features.h @@ -41,6 +41,7 @@ typedef enum { S390_FEAT_TYPE_KMA, S390_FEAT_TYPE_KDSA, S390_FEAT_TYPE_SORTL, + S390_FEAT_TYPE_DFLTCC, } S390FeatType; /* Definition of a CPU feature */ diff --git a/target/s390x/cpu_features_def.h b/target/s390x/cpu_features_def.h index bb8585847f..292b17b35d 100644 --- a/target/s390x/cpu_features_def.h +++ b/target/s390x/cpu_features_def.h @@ -98,6 +98,7 @@ typedef enum { S390_FEAT_CMM_NT, S390_FEAT_VECTOR_ENH2, S390_FEAT_ESORT_BASE, + S390_FEAT_DEFLATE_BASE, S390_FEAT_VECTOR_BCD_ENH, S390_FEAT_MSA_EXT_9, S390_FEAT_ETOKEN, @@ -354,6 +355,12 @@ typedef enum { S390_FEAT_SORTL_128, S390_FEAT_SORTL_F0, + /* DEFLATE */ + S390_FEAT_DEFLATE_GHDT, + S390_FEAT_DEFLATE_CMPR, + S390_FEAT_DEFLATE_XPND, + S390_FEAT_DEFLATE_F0, + S390_FEAT_MAX, } S390Feat; diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index 0a62cc5631..8fc2e8e72f 100644 --- a/target/s390x/gen-features.c +++ b/target/s390x/gen-features.c @@ -254,6 +254,13 @@ S390_FEAT_SORTL_F0 +#define S390_FEAT_GROUP_DEFLATE_CONVERSION \ + S390_FEAT_DEFLATE_BASE, \ + S390_FEAT_DEFLATE_GHDT, \ + S390_FEAT_DEFLATE_CMPR, \ + S390_FEAT_DEFLATE_XPND, \ + S390_FEAT_DEFLATE_F0 + /* cpu feature groups */ static uint16_t group_PLO[] = { S390_FEAT_GROUP_PLO, @@ -307,6 +314,10 @@ static uint16_t group_ENH_SORT[] = { S390_FEAT_GROUP_ENH_SORT, }; +static uint16_t group_DEFLATE_CONVERSION[] = { + S390_FEAT_GROUP_DEFLATE_CONVERSION, +}; + /* Base features (in order of release) * Only non-hypervisor managed features belong here. * Base feature sets are static meaning they do not change in future QEMU @@ -766,6 +777,7 @@ static FeatGroupDefSpec FeatGroupDef[] = { FEAT_GROUP_INITIALIZER(MSA_EXT_9_PCKMO), FEAT_GROUP_INITIALIZER(MULTIPLE_EPOCH_PTFF), FEAT_GROUP_INITIALIZER(ENH_SORT), + FEAT_GROUP_INITIALIZER(DEFLATE_CONVERSION), }; #define QEMU_FEAT_INITIALIZER(_name) \ diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index f91f436a31..e5e2b691f2 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -2079,6 +2079,9 @@ static int query_cpu_subfunc(S390FeatBitmap features) if (test_bit(S390_FEAT_ESORT_BASE, features)) { s390_add_from_feat_block(features, S390_FEAT_TYPE_SORTL, prop.sortl); } + if (test_bit(S390_FEAT_DEFLATE_BASE, features)) { + s390_add_from_feat_block(features, S390_FEAT_TYPE_DFLTCC, prop.dfltcc); + } return 0; } @@ -2129,6 +2132,9 @@ static int configure_cpu_subfunc(const S390FeatBitmap features) if (test_bit(S390_FEAT_ESORT_BASE, features)) { s390_fill_feat_block(features, S390_FEAT_TYPE_SORTL, prop.sortl); } + if (test_bit(S390_FEAT_DEFLATE_BASE, features)) { + s390_fill_feat_block(features, S390_FEAT_TYPE_DFLTCC, prop.dfltcc); + } return kvm_vm_ioctl(kvm_state, KVM_SET_DEVICE_ATTR, &attr); } From patchwork Fri Apr 26 11:10:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 1091480 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=de.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44rBFy0sKsz9s00 for ; Fri, 26 Apr 2019 21:11:49 +1000 (AEST) Received: from localhost ([127.0.0.1]:44932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJylf-0002Mq-Qe for incoming@patchwork.ozlabs.org; Fri, 26 Apr 2019 07:11:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJyko-0002JQ-9z for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:10:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJykl-0003Ir-KD for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:10:54 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45128 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJykl-0003IM-0L for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:10:51 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3QB9ja1009690 for ; Fri, 26 Apr 2019 07:10:50 -0400 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0b-001b2d01.pphosted.com with ESMTP id 2s3y27dkgx-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 26 Apr 2019 07:10:46 -0400 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Apr 2019 12:10:15 +0100 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 26 Apr 2019 12:10:13 +0100 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3QBACmT65536182 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Apr 2019 11:10:12 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 794C6C605A; Fri, 26 Apr 2019 11:10:12 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B46A1C6059; Fri, 26 Apr 2019 11:10:11 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.17.106]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 26 Apr 2019 11:10:11 +0000 (GMT) From: Christian Borntraeger To: Cornelia Huck Date: Fri, 26 Apr 2019 07:10:01 -0400 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190426111003.21246-1-borntraeger@de.ibm.com> References: <20190426111003.21246-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19042611-0036-0000-0000-00000AAF4BA8 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010998; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01194610; UDB=6.00626339; IPR=6.00975446; MB=3.00026606; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-26 11:10:15 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19042611-0037-0000-0000-00004B8A6E7D Message-Id: <20190426111003.21246-9-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-26_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=811 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904260078 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v2 08/10] s390x/cpumodel: add gen15 defintions 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" , Collin Walling , David Hildenbrand , qemu-devel , Halil Pasic , qemu-s390x , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" add several new features (msa9, sort, deflate, additional vector instructions, new general purpose instructions) to generation 15. Also disable csske and bpb from the default model. This will allow to migrate gen15 machines to future machines that do not have these features. Signed-off-by: Christian Borntraeger --- target/s390x/gen-features.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index 8fc2e8e72f..6260f56dc1 100644 --- a/target/s390x/gen-features.c +++ b/target/s390x/gen-features.c @@ -419,6 +419,10 @@ static uint16_t base_GEN14_GA1[] = { #define base_GEN14_GA2 EmptyFeat +static uint16_t base_GEN15_GA1[] = { + S390_FEAT_MISC_INSTRUCTION_EXT3, +}; + /* Full features (in order of release) * Automatically includes corresponding base features. * Full features are all features this hardware supports even if kvm/QEMU do not @@ -548,6 +552,16 @@ static uint16_t full_GEN14_GA1[] = { #define full_GEN14_GA2 EmptyFeat +static uint16_t full_GEN15_GA1[] = { + S390_FEAT_VECTOR_ENH2, + S390_FEAT_GROUP_ENH_SORT, + S390_FEAT_GROUP_DEFLATE_CONVERSION, + S390_FEAT_VECTOR_BCD_ENH, + S390_FEAT_GROUP_MSA_EXT_9, + S390_FEAT_GROUP_MSA_EXT_9_PCKMO, + S390_FEAT_ETOKEN, +}; + /* Default features (in order of release) * Automatically includes corresponding base features. * Default features are all features this version of QEMU supports for this @@ -624,6 +638,16 @@ static uint16_t default_GEN14_GA1[] = { #define default_GEN14_GA2 EmptyFeat +static uint16_t default_GEN15_GA1[] = { + S390_FEAT_VECTOR_ENH2, + S390_FEAT_GROUP_ENH_SORT, + S390_FEAT_GROUP_DEFLATE_CONVERSION, + S390_FEAT_VECTOR_BCD_ENH, + S390_FEAT_GROUP_MSA_EXT_9, + S390_FEAT_GROUP_MSA_EXT_9_PCKMO, + S390_FEAT_ETOKEN, +}; + /* QEMU (CPU model) features */ static uint16_t qemu_V2_11[] = { @@ -740,6 +764,7 @@ static CpuFeatDefSpec CpuFeatDef[] = { CPU_FEAT_INITIALIZER(GEN13_GA2), CPU_FEAT_INITIALIZER(GEN14_GA1), CPU_FEAT_INITIALIZER(GEN14_GA2), + CPU_FEAT_INITIALIZER(GEN15_GA1), }; #define FEAT_GROUP_INITIALIZER(_name) \ From patchwork Fri Apr 26 11:10:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 1091477 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=de.ibm.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44rBFY5nyrz9s00 for ; Fri, 26 Apr 2019 21:11:28 +1000 (AEST) Received: from localhost ([127.0.0.1]:44924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJylI-0001xO-8W for incoming@patchwork.ozlabs.org; Fri, 26 Apr 2019 07:11:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJykV-0001vc-Ae for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:10:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJykU-00035n-D5 for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:10:35 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35066) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJykU-00033o-26 for qemu-devel@nongnu.org; Fri, 26 Apr 2019 07:10:34 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3QB8dfW085147 for ; Fri, 26 Apr 2019 07:10:32 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 2s3y20nmt9-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 26 Apr 2019 07:10:27 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Apr 2019 12:10:22 +0100 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 26 Apr 2019 12:10:15 +0100 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3QBADNw15007820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Apr 2019 11:10:13 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 664ABC6059; Fri, 26 Apr 2019 11:10:13 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A03FDC6055; Fri, 26 Apr 2019 11:10:12 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.17.106]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 26 Apr 2019 11:10:12 +0000 (GMT) From: Christian Borntraeger To: Cornelia Huck Date: Fri, 26 Apr 2019 07:10:02 -0400 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190426111003.21246-1-borntraeger@de.ibm.com> References: <20190426111003.21246-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19042611-0012-0000-0000-0000172C49F1 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010998; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01194611; UDB=6.00626339; IPR=6.00975446; MB=3.00026607; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-26 11:10:20 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19042611-0013-0000-0000-000057047BC5 Message-Id: <20190426111003.21246-10-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-26_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=492 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904260078 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH v2 09/10] s390x/cpumodel: disable csske and bpb from gen15 cpu models onwards 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" , Collin Walling , David Hildenbrand , qemu-devel , Halil Pasic , qemu-s390x , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" These facilities are deprecated and no longer needed. Signed-off-by: Christian Borntraeger --- target/s390x/gen-features.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index 6260f56dc1..c346b76bdf 100644 --- a/target/s390x/gen-features.c +++ b/target/s390x/gen-features.c @@ -13,6 +13,7 @@ #include #include +#include #include "cpu_features_def.h" #define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) @@ -833,6 +834,11 @@ static void set_bits(uint64_t list[], BitSpec bits) } } +static inline void clear_bit(uint64_t list[], unsigned long nr) +{ + list[nr / 64] &= ~(1ULL << (nr % 64)); +} + static void print_feature_defs(void) { uint64_t base_feat[S390_FEAT_MAX / 64 + 1] = {}; @@ -843,6 +849,12 @@ static void print_feature_defs(void) printf("\n/* CPU model feature list data */\n"); for (i = 0; i < ARRAY_SIZE(CpuFeatDef); i++) { + /* With gen15 CSSKE and BPB are deprecated */ + if (strcmp(CpuFeatDef[i].name, "S390_FEAT_LIST_GEN15_GA1") == 0) { + clear_bit(base_feat, S390_FEAT_CONDITIONAL_SSKE); + clear_bit(default_feat, S390_FEAT_CONDITIONAL_SSKE); + clear_bit(default_feat, S390_FEAT_BPB); + } set_bits(base_feat, CpuFeatDef[i].base_bits); /* add the base to the default features */ set_bits(default_feat, CpuFeatDef[i].base_bits);