From patchwork Fri Jun 10 12:55:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Heimes X-Patchwork-Id: 1641947 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Y6hBwkrk; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LKLXf6z9mz9s5V for ; Fri, 10 Jun 2022 22:55:14 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nzeAP-00018Q-WD; Fri, 10 Jun 2022 12:55:10 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nzeAM-00015n-2j for kernel-team@lists.ubuntu.com; Fri, 10 Jun 2022 12:55:06 +0000 Received: from T570.fritz.box (p54abbc1a.dip0.t-ipconnect.de [84.171.188.26]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id CAB843F10D for ; Fri, 10 Jun 2022 12:55:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1654865705; bh=Fh11Zj35WZJiydbgjRp5f7xZzrxynW2xJWlsNmU9kys=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Y6hBwkrkaQxl/laSv92aIxFRqwO9MqpCJBUWq6N2/zM4T5GnyVXHtOItv+F6u1icv lxGU7nhNqGI4hKOcS1EpmkiZYg7uXSJ+kFxReBalulkjMPPpAPMmkSR3bE2mVCZZiL aJhl3AKuBD/Te3RifOnJfR2efR5rVQ/mMnCKfTFXuannGFas53Urd0iFC+5wNeos8Y 10bchsHkxFkaP14+la03K0RYRcYxpSREz3cqeDI6nIssZbgF0VzR5YiPFN2vW0ZjBI +T1bII2wi/x04S1JP3zPzT0VVn274i1BpJSnVe5lOfBlFHDjENXh9IAncvb2QM5cYZ ZfNDVMxbNoraw== From: frank.heimes@canonical.com To: kernel-team@lists.ubuntu.com Subject: [SRU][J][I][F][PATCH v2 2/2] s390/mm: use non-quiescing sske for KVM switch to keyed guest Date: Fri, 10 Jun 2022 14:55:02 +0200 Message-Id: <20220610125502.462958-3-frank.heimes@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610125502.462958-1-frank.heimes@canonical.com> References: <20220610125502.462958-1-frank.heimes@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" s390/mm: use non-quiescing sske for KVM switch to keyed guest From: Christian Borntraeger 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 (cherry picked from commit 3ae11dbcfac906a8c3a480e98660a823130dc16a) Signed-off-by: Frank Heimes --- 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 6ad634a27d5b..df0adb7e2fe8 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -748,7 +748,7 @@ void ptep_zap_key(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 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(); }