From patchwork Thu Apr 18 11:31:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 10907097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3074922 for ; Thu, 18 Apr 2019 11:35:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB49D28C22 for ; Thu, 18 Apr 2019 11:35:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9DC9628C38; Thu, 18 Apr 2019 11:35:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4DFBA28C22 for ; Thu, 18 Apr 2019 11:35:47 +0000 (UTC) Received: from localhost ([127.0.0.1]:39871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hH5KU-00069n-LP for patchwork-qemu-devel@patchwork.kernel.org; Thu, 18 Apr 2019 07:35:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hH5GI-0002lT-Iv for qemu-devel@nongnu.org; Thu, 18 Apr 2019 07:31:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hH5GF-0004Ws-S7 for qemu-devel@nongnu.org; Thu, 18 Apr 2019 07:31:26 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55400) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hH5GF-0004UA-BE for qemu-devel@nongnu.org; Thu, 18 Apr 2019 07:31:23 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3IBTRPf101384 for ; Thu, 18 Apr 2019 07:31:22 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rxqyu18ys-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 18 Apr 2019 07:31:21 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 18 Apr 2019 12:31:19 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 18 Apr 2019 12:31:15 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3IBVEUG24838344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 Apr 2019 11:31:14 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 32CC0A4059; Thu, 18 Apr 2019 11:31:14 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2A9C8A4051; Thu, 18 Apr 2019 11:31:14 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 18 Apr 2019 11:31:14 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id E0CC620F639; Thu, 18 Apr 2019 13:31:13 +0200 (CEST) From: Christian Borntraeger To: Cornelia Huck Date: Thu, 18 Apr 2019 13:31:10 +0200 X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190418113110.160664-1-borntraeger@de.ibm.com> References: <20190418113110.160664-1-borntraeger@de.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19041811-0016-0000-0000-0000027035EC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19041811-0017-0000-0000-000032CC8CED Message-Id: <20190418113110.160664-11-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-18_06:, , 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=762 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904180082 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 10/10] s390x/cpumodel: do not claim csske for expanded models in qmp 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 , Christian Borntraeger , qemu-s390x , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP While we have removed csske and bpb from the default model, the very common case of "host-model" in libvirt (expanded to a base model + features) would still contain bpb and csske. This can prevent migration to a future machine for a host-model machine. Let us fence bpb and csske when we run on a generation 15. If necessary the user can still use -cpu 8561,csske=on,bpb=on to force enable these features. Signed-off-by: Christian Borntraeger --- target/s390x/cpu_models.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index e727519686..03bdca1fb8 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -629,6 +629,17 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type, return NULL; } + /* + * Do not claim CSSKE and BPB if the host model expands to + * generation 15 or newer + */ + if (s390_model.def->gen >= 15) { + clear_bit(S390_FEAT_CONDITIONAL_SSKE, + (unsigned long *) &s390_model.features); + clear_bit(S390_FEAT_BPB, + (unsigned long *) &s390_model.features); + } + if (type == CPU_MODEL_EXPANSION_TYPE_STATIC) { delta_changes = true; } else if (type != CPU_MODEL_EXPANSION_TYPE_FULL) {