Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6146412iog; Thu, 23 Jun 2022 12:18:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sPfIGDAT1nfxV98Qw+6pv7qxOBR+CaGFMoPdBxkmENHXiczw+XkYlWGP8baMpFJIuo3L7a X-Received: by 2002:a17:90b:380c:b0:1ed:2071:e6b with SMTP id mq12-20020a17090b380c00b001ed20710e6bmr58093pjb.82.1656011888846; Thu, 23 Jun 2022 12:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011888; cv=none; d=google.com; s=arc-20160816; b=04n55Lb0h7XJyGL8mpFMIo2zQsaJIEDGwwDGg2oJ4kX7U8xDzjTUGLLDg1yMDIItnK WlurdV+q/AS6y1+Ck/dLH++x0UklfCZfvpYz5CwPZVHc2ksovleWyKHUk6hdTK6mGZ3Y bhgNb4+/f//3e1toC/MmqaeadRaJV0wGicSkLb5al2UmrZ8DFx5knL9nGUNYm9mXqDc6 icKniUyU79YK60MerIYrkUa+F75USvGEc0W+WNsTCLMRjSS7UObR4YmQuiwvePgVQUVl vRYiGM8o4nTIXlAtYv+Bfkb2lxsd7CzsvW//W7weOqtloT0HT+CM239SmIJR4baF+92t amEQ== 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=SylcHjuKjB8Nm0qKTwpy0G9ivtzHOoEgv20hdIopkp0=; b=yVRVE9FOSnzO29sk0Z6Llspk1Ml9IvsiEJp9ytY7EfTXyvKUdgs1G248SZuzbTkIbQ AFoH9nF50mwyCOgwZb8mw9xJhQuTUws9uT2lkDpAMmxECcdyo5zR0kRRYxHoMX2nKUuh fosEz6ERO85CcsVC0HWV+bpNGvoJesBJHFl+WrwxJFUMMo2Pty3soGmjusr7hURNDkl8 FHKOepfVFo/rg3BV91HY+JafP+OGLipcYj3qJ8S3fT3Ifqer0O/EX/EY/AtvgLVKXPRy MQdS9eYR+qLujRFqk3UPJSvtUrxrz5KyDj74NqVACBhRf6CsTxZWXj0dhRapkfK5tCEO Vv6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UB050du7; 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 ob18-20020a17090b391200b001e851c352easi3988389pjb.135.2022.06.23.12.17.57; Thu, 23 Jun 2022 12:18:08 -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=UB050du7; 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 S237170AbiFWSYq (ORCPT + 99 others); Thu, 23 Jun 2022 14:24:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237262AbiFWSW0 (ORCPT ); Thu, 23 Jun 2022 14:22:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EC1D94111; Thu, 23 Jun 2022 10:25:20 -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 ams.source.kernel.org (Postfix) with ESMTPS id 37DC0B824B9; Thu, 23 Jun 2022 17:25:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B7D4C3411B; Thu, 23 Jun 2022 17:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656005117; bh=+nvytMqtTtci6gABy5twLEudAIRM9zbaQ8qcRBWOT7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UB050du7w19qelk4neUKmEGRnFSROSaYRKDN5k151Ktwni+k01cTllRGcrHj8IECv I0ie8ca7CBr4fIIwuVrcdNJLAzNABceW2EENmGLRATwm10oW1Mg2z7uuTkCphv8DPr kojIS0RdP/dhMKW0wk8xdZHgiRfJao7jADckOzHY= 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 5.18 01/11] s390/mm: use non-quiescing sske for KVM switch to keyed guest Date: Thu, 23 Jun 2022 18:45:13 +0200 Message-Id: <20220623164322.359407032@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164322.315085512@linuxfoundation.org> References: <20220623164322.315085512@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore 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 @@ -748,7 +748,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(); }