From nobody Tue Sep 30 01:51:56 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=de.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1556529169; cv=none; d=zoho.com; s=zohoarc; b=PLlQZmeQv9z6tOGgRVQX+lukA67gou741S78Ai4Yl54bqZfu5UCMAlc1dJINhFWmn+AfzDltoR3hQTOhO8GunFUrdEFIP2fP33WsCr3tBVE2hnXMqoyEqXSRcWE0YpH5/S/Hi0oGKWRHcweP/zbuN1pAY2NfEIcvU/7M5xGxe4Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556529169; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=5wO60nurqSzWUlCWW6aTzYBRVJIDjwgyc0WV8rGcKEQ=; b=Nv9F8n3hK8L5pbXjnLTrQUPR93SrXh4ptdEmf+TNdbGy1CZGUPNh5cPLsaI+Kdiairjbm83+XCKWHTTgqA2/0Fb5x2WjDoQIv+vi+SwcGB01rBULdJqjwytHx59P6I8A8osDDP2pE2ybaeVZCLSP1JEnmY4l2XsObdlvNiosOEw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1556529169391322.6676213571061; Mon, 29 Apr 2019 02:12:49 -0700 (PDT) Received: from localhost ([127.0.0.1]:54425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hL2LA-0005eg-9s for importer@patchew.org; Mon, 29 Apr 2019 05:12:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hL2GS-0001Sg-76 for qemu-devel@nongnu.org; Mon, 29 Apr 2019 05:07:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hL2Bj-0000Pm-KU for qemu-devel@nongnu.org; Mon, 29 Apr 2019 05:03:05 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:39526 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 1hL2Bj-0000PP-E8 for qemu-devel@nongnu.org; Mon, 29 Apr 2019 05:03:03 -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 x3T8redM057778 for ; Mon, 29 Apr 2019 05:03:02 -0400 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0b-001b2d01.pphosted.com with ESMTP id 2s5w0gb69a-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 29 Apr 2019 05:03:02 -0400 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 29 Apr 2019 10:03:01 +0100 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 29 Apr 2019 10:02:59 +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 x3T92vmw11469308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 Apr 2019 09:02:57 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D2AC1C6059; Mon, 29 Apr 2019 09:02:57 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1B3FCC605F; Mon, 29 Apr 2019 09:02:57 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.17.106]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 29 Apr 2019 09:02:56 +0000 (GMT) From: Christian Borntraeger To: Cornelia Huck Date: Mon, 29 Apr 2019 05:02:48 -0400 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190429090250.7648-1-borntraeger@de.ibm.com> References: <20190429090250.7648-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19042909-8235-0000-0000-00000E88EA68 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011015; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01195994; UDB=6.00627178; IPR=6.00976844; MB=3.00026644; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-29 09:03:01 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19042909-8236-0000-0000-0000455650BE Message-Id: <20190429090250.7648-8-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-29_04:, , 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-1904290066 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v3 7/9] 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" add the deflate conversion facility. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand --- 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[] =3D { FEAT_INIT("cmmnt", S390_FEAT_TYPE_STFL, 147, "CMM: ESSA-enhancement (n= o translate) facility"), FEAT_INIT("vxeh2", S390_FEAT_TYPE_STFL, 148, "Vector Enhancements faci= lity 2"), FEAT_INIT("esort-base", S390_FEAT_TYPE_STFL, 150, "Enhanced-sort facil= ity (excluding subfunctions)"), + FEAT_INIT("deflate-base", S390_FEAT_TYPE_STFL, 151, "Deflate-conversio= n 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-ass= ist-extension-9 facility (excluding subfunctions)"), FEAT_INIT("etoken", S390_FEAT_TYPE_STFL, 156, "Etoken facility"), @@ -347,6 +348,11 @@ static const S390FeatDef s390_features[] =3D { 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 lis= ts"), FEAT_INIT("sortl-f0", S390_FEAT_TYPE_SORTL, 192, "SORTL format 0 param= eter-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 pa= rameter-block"), }; =20 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 =3D 256; break; default: @@ -511,6 +519,7 @@ static S390FeatGroupDef s390_feature_groups[] =3D { FEAT_GROUP_INIT("msa9_pckmo", MSA_EXT_9_PCKMO, "Message-security-assis= t-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 fac= ility"), }; =20 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; =20 /* Definition of a CPU feature */ diff --git a/target/s390x/cpu_features_def.h b/target/s390x/cpu_features_de= f.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, =20 + /* DEFLATE */ + S390_FEAT_DEFLATE_GHDT, + S390_FEAT_DEFLATE_CMPR, + S390_FEAT_DEFLATE_XPND, + S390_FEAT_DEFLATE_F0, + S390_FEAT_MAX, } S390Feat; =20 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 =20 =20 +#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[] =3D { S390_FEAT_GROUP_PLO, @@ -307,6 +314,10 @@ static uint16_t group_ENH_SORT[] =3D { S390_FEAT_GROUP_ENH_SORT, }; =20 +static uint16_t group_DEFLATE_CONVERSION[] =3D { + 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[] =3D { FEAT_GROUP_INITIALIZER(MSA_EXT_9_PCKMO), FEAT_GROUP_INITIALIZER(MULTIPLE_EPOCH_PTFF), FEAT_GROUP_INITIALIZER(ENH_SORT), + FEAT_GROUP_INITIALIZER(DEFLATE_CONVERSION), }; =20 #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.sort= l); } + if (test_bit(S390_FEAT_DEFLATE_BASE, features)) { + s390_add_from_feat_block(features, S390_FEAT_TYPE_DFLTCC, prop.dfl= tcc); + } return 0; } =20 @@ -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); } =20 --=20 2.17.1