Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6132083iog; Thu, 23 Jun 2022 12:02:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sxz0U89HrrneCDDFR2qXui1GazXs204P1e8UyGaqwJbkWNO4SPoQVF0xE85w52i4D/9cC0 X-Received: by 2002:aa7:9911:0:b0:525:1bb3:965a with SMTP id z17-20020aa79911000000b005251bb3965amr25604270pff.79.1656010921524; Thu, 23 Jun 2022 12:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656010921; cv=none; d=google.com; s=arc-20160816; b=pVAtvtfCYykdklLTgIr33RaLPQQdSAf5vf2RaSrrxbyKhMZ72HljJ1/5Py9Uoj8QRS qGmN1OuUD8xTehuO1NgogLJpX33Lng5k/BPzijYO/WkSlp3B6bCACAnj81PQPaaKVg5E KQW9WysYBdoX7KXvBciwxc1U25T9JcmdzF7o97XxDki3Hc4YNONKzTZmThE4TzOgnAgO nYEfOWSSsSRoYlaWBOYZfUV4Z5B8e/UWEhNiKSPbbmtwhVE8XD6vZQv497ChwlzXTG+R A5awnXl3Ue20ptmGSmIsylbz02b5Hv+813HKALfn4z62yjefD7JDOt6ytj8pwH45kyDR CNGQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=V8gL1AURTJNwiIKtEkIl7nrKkb1vHVbKgs63UDJPi4Q=; b=dzMEjtZdKvlHYdnmKnwxJTiNoIE0bPV9MRlumvgyTC30M+J3FtqMsluzp5eJiH19aq sPiq3moC1xTx2cELI1jQN5VQ6eli968xdcTTstKExxwNby36aTx/+/4YfQOBWZ55aE2c myK/vYaP4eOhYBOaSJtXlecSJwAApEEDyJr+HnaAWCmAvOblURpeJnLuCm/qQE8q8wTs 4dHcYhQ2/TqMkPPAWIZ/LSZrjetU8srwMhCvNOI1zIuyfqCKIvvKZpIp2wzGjTWp7qF1 S3hJhYl+YnjyHDXGJMZTbwnipuS/+EysohexryuAoBL2ojAz6ceeBdFvIVnn8sT6RFZk UC9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TwcNGpid; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a654347000000b003db0f2baa25si159373pgq.90.2022.06.23.12.01.47; Thu, 23 Jun 2022 12:02:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TwcNGpid; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237145AbiFWSWA (ORCPT + 99 others); Thu, 23 Jun 2022 14:22:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236897AbiFWSQ6 (ORCPT ); Thu, 23 Jun 2022 14:16:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8FFB62C29; Thu, 23 Jun 2022 10:23:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6D2C761DC6; Thu, 23 Jun 2022 17:23:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 351F6C3411B; Thu, 23 Jun 2022 17:23:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656005016; bh=GJjPzaE1Xp4leBAxjdOS0+AqdSMbVLMu+pd/8Sgp3ck=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TwcNGpidp4w4VcROdnABMofXAr7rtFBMWYXBJUBBdAykYwgTnw7maWjkEAA6jqWln +YdonRTDnx89UVct0AvEdqjXIaaoIwlzZZoZDpZpSWuhZvZMQvtbPMOxCTdZJtLV1S V9dhGnGrBwdUZodp0ztsnQsN3j0Ih2oQwIWTi35M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christian Borntraeger , Janis Schoetterl-Glausch , Claudio Imbrenda , Heiko Carstens Subject: [PATCH 4.19 225/234] s390/mm: use non-quiescing sske for KVM switch to keyed guest Date: Thu, 23 Jun 2022 18:44:52 +0200 Message-Id: <20220623164349.416773391@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164343.042598055@linuxfoundation.org> References: <20220623164343.042598055@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Christian Borntraeger commit 3ae11dbcfac906a8c3a480e98660a823130dc16a upstream. The switch to a keyed guest does not require a classic sske as the other guest CPUs are not accessing the key before the switch is complete. By using the NQ SSKE things are faster especially with multiple guests. Signed-off-by: Christian Borntraeger Suggested-by: Janis Schoetterl-Glausch Reviewed-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20220530092706.11637-3-borntraeger@linux.ibm.com Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Greg Kroah-Hartman --- arch/s390/mm/pgtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -716,7 +716,7 @@ void ptep_zap_key(struct mm_struct *mm, pgste_val(pgste) |= PGSTE_GR_BIT | PGSTE_GC_BIT; ptev = pte_val(*ptep); if (!(ptev & _PAGE_INVALID) && (ptev & _PAGE_WRITE)) - page_set_storage_key(ptev & PAGE_MASK, PAGE_DEFAULT_KEY, 1); + page_set_storage_key(ptev & PAGE_MASK, PAGE_DEFAULT_KEY, 0); pgste_set_unlock(ptep, pgste); preempt_enable(); }