From patchwork Wed Nov 15 12:51:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudio Imbrenda X-Patchwork-Id: 165336 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2512621vqg; Wed, 15 Nov 2023 04:51:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFA8rjrxpS2WdBWdS7BkZQxtFo07LtPXG4nbyCX2nim6JnTpjobmTDW7jTrDSxVWRFAcppB X-Received: by 2002:a05:6e02:1d0a:b0:359:7d0:256a with SMTP id i10-20020a056e021d0a00b0035907d0256amr17014100ila.7.1700052686677; Wed, 15 Nov 2023 04:51:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700052686; cv=none; d=google.com; s=arc-20160816; b=R/mA3+MNLOPNj7CTx8n3hOcNS3LH8xrjctX9awx77C3j3SQCg2nR9jHmT06IR/Udh+ YPTn32977TWiEYQ/HKaBO1R1SVtDqdN3n13OCQYJ6IRF2ySEPijXdyOgQVtHytHx7lF+ +SmasRJz63ceeram9gQVSburssXtwy5OTh5NhDdomwYzYC/g8dk66JV6PMGsvQVf8C6c 0PG1sqz447G3HkDWEcGcXmlszmtD1IoZThGW8WlWylaM1uRE9/Y7tIB98dtf9gAYYr7u IhOZ14EC8w0k/31okR9C/Q6BmIqafldDjRZ9X6OWMsE24yfDRiS7wwA3DMsFWq97axWN Jg5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KUQVuNMVsHi3vAEtNSKfVSjF0aeqM2TchxBEMs7prwU=; fh=j7faUdWCTRu8QrPplXAuGjdyLNrbbH3w0Mw/NSQabfc=; b=SMv0I11hu6wM2Mcu5X4a9ySsfke61YZA3Ok3pepD+mnqxzvghcD6TtFF/dK40vYbpZ 6FPd2GKiqhrAOKKMNcobPUC1U3uGcEUgNeAvkxzOzVktIDqCzBT68d1Dpw6/oljZI5Fz AVt8r0pH6N0GsErZdQuZPZ5PFgy0IKRQHdkUdupm9lJQKjOWezsUIB9qCcUkke9pTMfl 5kKPGYly46DMm5ooR+HcFMUvRJxaHWCEgBkpwJ+lizNGFE3aXeoPxiUWbVehTl77A35W 4EIEukO3gMrl89/e+MYBztrRBvpsKRoU9DkNhS7X3/BYI3NNoVv5GM60skLj3n3WZ7RV wjyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=f44HPr8E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id o8-20020a656a48000000b005b881cc9498si11937043pgu.339.2023.11.15.04.51.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 04:51:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=f44HPr8E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CEB15818ABE8; Wed, 15 Nov 2023 04:51:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343717AbjKOMvZ (ORCPT + 28 others); Wed, 15 Nov 2023 07:51:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234922AbjKOMvY (ORCPT ); Wed, 15 Nov 2023 07:51:24 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87C65120; Wed, 15 Nov 2023 04:51:19 -0800 (PST) Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AFCFCBk019832; Wed, 15 Nov 2023 12:51:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=KUQVuNMVsHi3vAEtNSKfVSjF0aeqM2TchxBEMs7prwU=; b=f44HPr8Ex2tYSjWeq07VlYyykJ84s5WhziBziI6nBRppjBEG4kIt2MON0hj1YdFP8J9p 1pNCKN5sdi4XTRgeuh6Z2x03x43A5Y2NYnX+HTJ5heT1+IP2koJA9GId/blYEnKb03OU 5NydFV9JWsdF7WeY9gkjyvREIk9itUItHSQ0a19Bake+Hrs4bFyrUCbhcUtsIF9STBZ4 anynYbbOb3IGorn3mvm7acmNwBrp1HoAz90PeaQN2wCCeViEiNU3qOiFtgwPrHF3cSFf ozIHT3BbXKSD27W7WRyT7eEaBLNJUuKzTuFKqf+mjEPTadLFfV6CwWQgCc+d/p8NR+Qg ew== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ucwu08w64-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Nov 2023 12:51:18 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3AFCneLn009025; Wed, 15 Nov 2023 12:51:17 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ucwu08w5q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Nov 2023 12:51:17 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3AFCYGGv028926; Wed, 15 Nov 2023 12:51:17 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3uakxsyjrk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Nov 2023 12:51:17 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3AFCpCKv40239404 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Nov 2023 12:51:12 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EA9832004B; Wed, 15 Nov 2023 12:51:11 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BF6192004D; Wed, 15 Nov 2023 12:51:11 +0000 (GMT) Received: from p-imbrenda.boeblingen.de.ibm.com (unknown [9.152.224.66]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 15 Nov 2023 12:51:11 +0000 (GMT) From: Claudio Imbrenda To: pbonzini@redhat.com Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org, frankja@linux.ibm.com, borntraeger@de.ibm.com, hca@linux.ibm.com, agordeev@linux.ibm.com, gor@linux.ibm.com Subject: [GIT PULL v1 2/2] KVM: s390/mm: Properly reset no-dat Date: Wed, 15 Nov 2023 13:51:11 +0100 Message-ID: <20231115125111.28217-3-imbrenda@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231115125111.28217-1-imbrenda@linux.ibm.com> References: <20231115125111.28217-1-imbrenda@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: h9Zore0ax-iKu_s-fP91Iv9gno7MXQ9G X-Proofpoint-ORIG-GUID: 6NJJMa9uJdJnid-RAFk1Ym46zM8a9MHB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-15_11,2023-11-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 bulkscore=0 phishscore=0 adultscore=0 suspectscore=0 priorityscore=1501 mlxlogscore=657 impostorscore=0 mlxscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311150099 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 15 Nov 2023 04:51:25 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782634445812342645 X-GMAIL-MSGID: 1782634445812342645 When the CMMA state needs to be reset, the no-dat bit also needs to be reset. Failure to do so could cause issues in the guest, since the guest expects the bit to be cleared after a reset. Cc: Reviewed-by: Nico Boehr Message-ID: <20231109123624.37314-1-imbrenda@linux.ibm.com> Signed-off-by: Claudio Imbrenda --- arch/s390/mm/pgtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 3bd2ab2a9a34..5cb92941540b 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -756,7 +756,7 @@ void ptep_zap_unused(struct mm_struct *mm, unsigned long addr, pte_clear(mm, addr, ptep); } if (reset) - pgste_val(pgste) &= ~_PGSTE_GPS_USAGE_MASK; + pgste_val(pgste) &= ~(_PGSTE_GPS_USAGE_MASK | _PGSTE_GPS_NODAT); pgste_set_unlock(ptep, pgste); preempt_enable(); }