From nobody Sat Oct 25 23:41:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516218100710599.7455210835426; Wed, 17 Jan 2018 11:41:40 -0800 (PST) Received: from localhost ([::1]:57367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebtaT-0000Rg-TA for importer@patchew.org; Wed, 17 Jan 2018 14:41:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebtXE-0006RN-E6 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 14:38:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebtXB-00027o-9O for qemu-devel@nongnu.org; Wed, 17 Jan 2018 14:38:08 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55162 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 1ebtXB-00026y-4T for qemu-devel@nongnu.org; Wed, 17 Jan 2018 14:38:05 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0HJYYdV023307 for ; Wed, 17 Jan 2018 14:38:04 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2fjc9qs9xk-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 17 Jan 2018 14:38:03 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 17 Jan 2018 19:38:01 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 17 Jan 2018 19:37:59 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0HJbxQI30015726; Wed, 17 Jan 2018 19:37:59 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E1E1942045; Wed, 17 Jan 2018 19:31:24 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D104B42042; Wed, 17 Jan 2018 19:31:24 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 17 Jan 2018 19:31:24 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id CA9B920F69C; Wed, 17 Jan 2018 20:37:58 +0100 (CET) From: Christian Borntraeger To: Cornelia Huck Date: Wed, 17 Jan 2018 20:37:55 +0100 X-Mailer: git-send-email 2.9.4 In-Reply-To: <20180117193757.73471-1-borntraeger@de.ibm.com> References: <20180117193757.73471-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18011719-0012-0000-0000-000005A4E150 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011719-0013-0000-0000-000019205959 Message-Id: <20180117193757.73471-2-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-17_09:, , 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 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801170268 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v2 1/3] 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: Janosch Frank , Thomas Huth , David Hildenbrand , qemu-devel , Alexander Graf , Christian Borntraeger , qemu-s390x , Halil Pasic , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" replace with proper header sync Signed-off-by: Christian Borntraeger Acked-by: David Hildenbrand --- linux-headers/asm-s390/kvm.h | 9 ++++----- linux-headers/linux/kvm.h | 5 +++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h index 32d372e..11def14 100644 --- a/linux-headers/asm-s390/kvm.h +++ b/linux-headers/asm-s390/kvm.h @@ -6,10 +6,6 @@ * * Copyright IBM Corp. 2008 * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License (version 2 only) - * as published by the Free Software Foundation. - * * Author(s): Carsten Otte * Christian Borntraeger */ @@ -228,6 +224,7 @@ struct kvm_guest_debug_arch { #define KVM_SYNC_RICCB (1UL << 7) #define KVM_SYNC_FPRS (1UL << 8) #define KVM_SYNC_GSCB (1UL << 9) +#define KVM_SYNC_BPBC (1UL << 10) /* length and alignment of the sdnx as a power of two */ #define SDNXC 8 #define SDNXL (1UL << SDNXC) @@ -251,7 +248,9 @@ struct kvm_sync_regs { }; __u8 reserved[512]; /* for future vector expansion */ __u32 fpc; /* valid on KVM_SYNC_VRS or KVM_SYNC_FPRS */ - __u8 padding1[52]; /* riccb needs to be 64byte aligned */ + __u8 bpbc : 1; /* bp mode */ + __u8 reserved2 : 7; + __u8 padding1[51]; /* riccb needs to be 64byte aligned */ __u8 riccb[64]; /* runtime instrumentation controls block */ __u8 padding2[192]; /* sdnx needs to be 256byte aligned */ union { diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index ce6c2f1..b4503d8 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -630,9 +630,9 @@ struct kvm_s390_irq { =20 struct kvm_s390_irq_state { __u64 buf; - __u32 flags; + __u32 flags; /* will stay unused for compatibility reasons */ __u32 len; - __u32 reserved[4]; + __u32 reserved[4]; /* will stay unused for compatibility reasons */ }; =20 /* for KVM_SET_GUEST_DEBUG */ @@ -932,6 +932,7 @@ struct kvm_ppc_resize_hpt { #define KVM_CAP_HYPERV_SYNIC2 148 #define KVM_CAP_HYPERV_VP_INDEX 149 #define KVM_CAP_S390_AIS_MIGRATION 150 +#define KVM_CAP_S390_BPB 151 =20 #ifdef KVM_CAP_IRQ_ROUTING =20 --=20 2.9.4 From nobody Sat Oct 25 23:41:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516218181572563.9001302486962; Wed, 17 Jan 2018 11:43:01 -0800 (PST) Received: from localhost ([::1]:57464 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebtbp-0001IW-PJ for importer@patchew.org; Wed, 17 Jan 2018 14:42:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebtXJ-0006Wc-Gt for qemu-devel@nongnu.org; Wed, 17 Jan 2018 14:38:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebtXG-0002DY-9H for qemu-devel@nongnu.org; Wed, 17 Jan 2018 14:38:13 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45008 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 1ebtXG-0002Cx-2m for qemu-devel@nongnu.org; Wed, 17 Jan 2018 14:38:10 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0HJYp7S020696 for ; Wed, 17 Jan 2018 14:38:07 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fjag46rhx-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 17 Jan 2018 14:38:06 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 17 Jan 2018 19:38:04 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 17 Jan 2018 19:38:00 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0HJbxQK50266184; Wed, 17 Jan 2018 19:37:59 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D6C152041; Wed, 17 Jan 2018 18:30:29 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id EC4CE5203F; Wed, 17 Jan 2018 18:30:28 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id 3BB9920F69C; Wed, 17 Jan 2018 20:37:59 +0100 (CET) From: Christian Borntraeger To: Cornelia Huck Date: Wed, 17 Jan 2018 20:37:56 +0100 X-Mailer: git-send-email 2.9.4 In-Reply-To: <20180117193757.73471-1-borntraeger@de.ibm.com> References: <20180117193757.73471-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18011719-0012-0000-0000-000005A4E151 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011719-0013-0000-0000-00001920595A Message-Id: <20180117193757.73471-3-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-17_09:, , 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 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801170268 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v2 2/3] s390x/kvm: Handle bpb feature 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: Janosch Frank , Thomas Huth , David Hildenbrand , qemu-devel , Alexander Graf , Christian Borntraeger , qemu-s390x , Halil Pasic , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We need to handle the bpb control on reset and migration. Normally stfle.82 is transparent (and the normal guest part works without hypervisor activity). To prevent any issues we require full host kernel support for this feature. Signed-off-by: Christian Borntraeger --- target/s390x/cpu.c | 1 + target/s390x/cpu.h | 1 + target/s390x/cpu_features.c | 1 + target/s390x/cpu_features_def.h | 1 + target/s390x/gen-features.c | 1 + target/s390x/kvm.c | 14 ++++++++++++++ target/s390x/machine.c | 17 +++++++++++++++++ 7 files changed, 36 insertions(+) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index ae3cee9..1577b2c 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -89,6 +89,7 @@ static void s390_cpu_reset(CPUState *s) CPUS390XState *env =3D &cpu->env; =20 env->pfault_token =3D -1UL; + env->bpbc =3D 0; scc->parent_reset(s); cpu->env.sigp_order =3D 0; s390_cpu_set_state(CPU_STATE_STOPPED, cpu); diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 1a8b6b9..8514905 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -93,6 +93,7 @@ struct CPUS390XState { =20 uint32_t fpc; /* floating-point control register */ uint32_t cc_op; + uint8_t bpbc; /* branch prediction blocking */ =20 float_status fpu_status; /* passed to softfloat lib */ =20 diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index 31a4676..5d1c210 100644 --- a/target/s390x/cpu_features.c +++ b/target/s390x/cpu_features.c @@ -89,6 +89,7 @@ static const S390FeatDef s390_features[] =3D { FEAT_INIT("msa4-base", S390_FEAT_TYPE_STFL, 77, "Message-security-assi= st-extension-4 facility (excluding subfunctions)"), FEAT_INIT("edat2", S390_FEAT_TYPE_STFL, 78, "Enhanced-DAT facility 2"), FEAT_INIT("dfppc", S390_FEAT_TYPE_STFL, 80, "Decimal-floating-point pa= cked-conversion facility"), + FEAT_INIT("bpb", S390_FEAT_TYPE_STFL, 82, "Branch Prediction Blocking"= ), FEAT_INIT("vx", S390_FEAT_TYPE_STFL, 129, "Vector facility"), FEAT_INIT("iep", S390_FEAT_TYPE_STFL, 130, "Instruction-execution-prot= ection facility"), FEAT_INIT("sea_esop2", S390_FEAT_TYPE_STFL, 131, "Side-effect-access f= acility and Enhanced-suppression-on-protection facility 2"), diff --git a/target/s390x/cpu_features_def.h b/target/s390x/cpu_features_de= f.h index 4b6d4e9..4487cfd 100644 --- a/target/s390x/cpu_features_def.h +++ b/target/s390x/cpu_features_def.h @@ -80,6 +80,7 @@ typedef enum { S390_FEAT_MSA_EXT_4, S390_FEAT_EDAT_2, S390_FEAT_DFP_PACKED_CONVERSION, + S390_FEAT_BPB, S390_FEAT_VECTOR, S390_FEAT_INSTRUCTION_EXEC_PROT, S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2, diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index b24f6ad..95ee870 100644 --- a/target/s390x/gen-features.c +++ b/target/s390x/gen-features.c @@ -357,6 +357,7 @@ static uint16_t full_GEN7_GA1[] =3D { S390_FEAT_SIE_GPERE, S390_FEAT_SIE_IB, S390_FEAT_SIE_CEI, + S390_FEAT_BPB, }; =20 static uint16_t full_GEN7_GA2[] =3D { diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index 6a18a41..8736001 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -490,6 +490,11 @@ int kvm_arch_put_registers(CPUState *cs, int level) cs->kvm_run->kvm_dirty_regs |=3D KVM_SYNC_GSCB; } =20 + if (can_sync_regs(cs, KVM_SYNC_BPBC)) { + cs->kvm_run->s.regs.bpbc =3D env->bpbc; + cs->kvm_run->kvm_dirty_regs |=3D KVM_SYNC_BPBC; + } + /* Finally the prefix */ if (can_sync_regs(cs, KVM_SYNC_PREFIX)) { cs->kvm_run->s.regs.prefix =3D env->psa; @@ -600,6 +605,10 @@ int kvm_arch_get_registers(CPUState *cs) memcpy(env->gscb, cs->kvm_run->s.regs.gscb, 32); } =20 + if (can_sync_regs(cs, KVM_SYNC_BPBC)) { + env->bpbc =3D cs->kvm_run->s.regs.bpbc; + } + /* pfault parameters */ if (can_sync_regs(cs, KVM_SYNC_PFAULT)) { env->pfault_token =3D cs->kvm_run->s.regs.pft; @@ -2278,6 +2287,11 @@ void kvm_s390_get_host_cpu_model(S390CPUModel *model= , Error **errp) clear_bit(S390_FEAT_CMM_NT, model->features); } =20 + /* bpb needs kernel support for migration, VSIE and reset */ + if (!kvm_check_extension(kvm_state, KVM_CAP_S390_BPB)) { + clear_bit(S390_FEAT_BPB, model->features); + } + /* We emulate a zPCI bus and AEN, therefore we don't need HW support */ if (pci_available) { set_bit(S390_FEAT_ZPCI, model->features); diff --git a/target/s390x/machine.c b/target/s390x/machine.c index b78f326..4aac456 100644 --- a/target/s390x/machine.c +++ b/target/s390x/machine.c @@ -194,6 +194,22 @@ const VMStateDescription vmstate_gscb =3D { } }; =20 +static bool bpbc_needed(void *opaque) +{ + return s390_has_feat(S390_FEAT_BPB); +} + +const VMStateDescription vmstate_bpbc =3D { + .name =3D "cpu/bpbc", + .version_id =3D 1, + .minimum_version_id =3D 1, + .needed =3D bpbc_needed, + .fields =3D (VMStateField[]) { + VMSTATE_UINT8(env.bpbc, S390CPU), + VMSTATE_END_OF_LIST() + } +}; + const VMStateDescription vmstate_s390_cpu =3D { .name =3D "cpu", .post_load =3D cpu_post_load, @@ -228,6 +244,7 @@ const VMStateDescription vmstate_s390_cpu =3D { &vmstate_riccb, &vmstate_exval, &vmstate_gscb, + &vmstate_bpbc, NULL }, }; --=20 2.9.4 From nobody Sat Oct 25 23:41:38 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516218011662905.6716454873564; Wed, 17 Jan 2018 11:40:11 -0800 (PST) Received: from localhost ([::1]:57253 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebtZC-0007ce-CI for importer@patchew.org; Wed, 17 Jan 2018 14:40:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebtXH-0006Uu-Pz for qemu-devel@nongnu.org; Wed, 17 Jan 2018 14:38:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebtXE-0002Bj-KA for qemu-devel@nongnu.org; Wed, 17 Jan 2018 14:38:11 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40200 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 1ebtXE-0002B2-Fa for qemu-devel@nongnu.org; Wed, 17 Jan 2018 14:38:08 -0500 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0HJYZQq051136 for ; Wed, 17 Jan 2018 14:38:06 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 2fjcrvg4ks-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 17 Jan 2018 14:38:05 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 17 Jan 2018 19:38:03 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 17 Jan 2018 19:38:00 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0HJc0fe1573182; Wed, 17 Jan 2018 19:38:00 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C3FA442041; Wed, 17 Jan 2018 19:31:25 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B35074203F; Wed, 17 Jan 2018 19:31:25 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 17 Jan 2018 19:31:25 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id AD4A820F69C; Wed, 17 Jan 2018 20:37:59 +0100 (CET) From: Christian Borntraeger To: Cornelia Huck Date: Wed, 17 Jan 2018 20:37:57 +0100 X-Mailer: git-send-email 2.9.4 In-Reply-To: <20180117193757.73471-1-borntraeger@de.ibm.com> References: <20180117193757.73471-1-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18011719-0040-0000-0000-00000425EEB6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011719-0041-0000-0000-000020C960DA Message-Id: <20180117193757.73471-4-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-01-17_09:, , 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 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801170268 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v2 3/3] s390x/kvm: provide stfle.81 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: Janosch Frank , Thomas Huth , David Hildenbrand , qemu-devel , Alexander Graf , Christian Borntraeger , qemu-s390x , Halil Pasic , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" stfle.81 (ppa15) is a transparent facility that can be passed to the guest without the need to implement hypervisor support. As this feature can be provided by firmware we add it to all full models. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand --- target/s390x/cpu_features.c | 1 + target/s390x/cpu_features_def.h | 1 + target/s390x/gen-features.c | 1 + 3 files changed, 3 insertions(+) diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index 5d1c210..1550ab0 100644 --- a/target/s390x/cpu_features.c +++ b/target/s390x/cpu_features.c @@ -89,6 +89,7 @@ static const S390FeatDef s390_features[] =3D { FEAT_INIT("msa4-base", S390_FEAT_TYPE_STFL, 77, "Message-security-assi= st-extension-4 facility (excluding subfunctions)"), FEAT_INIT("edat2", S390_FEAT_TYPE_STFL, 78, "Enhanced-DAT facility 2"), FEAT_INIT("dfppc", S390_FEAT_TYPE_STFL, 80, "Decimal-floating-point pa= cked-conversion facility"), + FEAT_INIT("ppa15", S390_FEAT_TYPE_STFL, 81, "PPA15 is installed"), FEAT_INIT("bpb", S390_FEAT_TYPE_STFL, 82, "Branch Prediction Blocking"= ), FEAT_INIT("vx", S390_FEAT_TYPE_STFL, 129, "Vector facility"), FEAT_INIT("iep", S390_FEAT_TYPE_STFL, 130, "Instruction-execution-prot= ection facility"), diff --git a/target/s390x/cpu_features_def.h b/target/s390x/cpu_features_de= f.h index 4487cfd..4d93087 100644 --- a/target/s390x/cpu_features_def.h +++ b/target/s390x/cpu_features_def.h @@ -80,6 +80,7 @@ typedef enum { S390_FEAT_MSA_EXT_4, S390_FEAT_EDAT_2, S390_FEAT_DFP_PACKED_CONVERSION, + S390_FEAT_PPA15, S390_FEAT_BPB, S390_FEAT_VECTOR, S390_FEAT_INSTRUCTION_EXEC_PROT, diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index 95ee870..50bd3f4 100644 --- a/target/s390x/gen-features.c +++ b/target/s390x/gen-features.c @@ -357,6 +357,7 @@ static uint16_t full_GEN7_GA1[] =3D { S390_FEAT_SIE_GPERE, S390_FEAT_SIE_IB, S390_FEAT_SIE_CEI, + S390_FEAT_PPA15, S390_FEAT_BPB, }; =20 --=20 2.9.4