Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1544989pxb; Thu, 16 Sep 2021 09:37:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT3UERDPd9ciMdB5/KPozAP2JyuQOKzJiYGfsuNV6QMntx3T9TNs5uHJcCzQgtmfQpGoTr X-Received: by 2002:a6b:f819:: with SMTP id o25mr5059965ioh.21.1631810245524; Thu, 16 Sep 2021 09:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631810245; cv=none; d=google.com; s=arc-20160816; b=w77yTsLyvFe/1xBm6T6TR1L+zqRd5Yul62K+UOLzQ2xa5/F2agUd/45Onkk1+n47cR GRTQuyCzU+HbjlkqxurX2MLpdgDiEYvrDljZU0RkHfpP6v0+ka9HxJK2D+Z9LXMSz0pC GNcJFTCiEiEp2Jb40mLcTcxWiv3m3l7P3ebpzMaFdXKEr1XpUh0XzneB1NWY7YnESKNT vntofLYatOL+zYhsyxQ+MiKPDldDmaYoLzro7uwxDolW6RMr9WASZchMSCWB8ATiBG+8 yDA/n46UWquvE0sQLk3uFmxQsTE8kNOcvQIzM/vFmskYbGH11RqLzU63aQrCwfgnNajH kWZg== 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=+N7cqhVXEj94G5bTqnIXy54RPmvEYMDiJLpku/JoWz0=; b=kkt6ZKXHqXN9CRqpAjsrW4G8Q1zMfYtAoKOATZbCCY9Tx4BoH4RoZaEVsOm9+taffE Vi3mwykV7IXD7F1HE2uopCf+VSb/N03DfmA577XA0SMk4uUNHIHcckdJKRndfF0nbYKL xmFz1FvYbaHpq3haDlmGguEy5HDmatJpEDMYPyazdECQk7EaShgzFSRodpSCDE8ADBeM 2hZproINEJWvVG8ESCpZqvS255rMXovoYcJ9AQ0Nlg1ITmkU1+j4FbSiBL0uIAXnZhtV dUm19Eh+EWzwh/vxqQGdlpU1YkRqx5v40YBDISQtOQdw5hE6M4jkFiIPaKyQzhxJ3is6 jUCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SSZ+aqOW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si3267542ilt.54.2021.09.16.09.37.14; Thu, 16 Sep 2021 09:37:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SSZ+aqOW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S243819AbhIPQeW (ORCPT + 99 others); Thu, 16 Sep 2021 12:34:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:38924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241896AbhIPQ0Z (ORCPT ); Thu, 16 Sep 2021 12:26:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 38AD660FA0; Thu, 16 Sep 2021 16:17:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631809028; bh=YbwWUfQkf3BpYQ/wZJjeWmGQP+oVa0up8tHCp5bLW7E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SSZ+aqOWa03BjhiWmGzuhquLjepk5tI5tUDExM1q9A2DKiKOPKp1n++wlISj3sROW nlHXXCeU2/uIzCtKV2PUf06VmVWlpY49gMJOcPpY1MR+Bykp4h2pVRReETS9QPOXFQ cRi+9M0P6tqtW6Mwd0a1go5eCfUhwEr2qUWtmZHs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Halil Pasic , Christian Borntraeger , Konrad Rzeszutek Wilk Subject: [PATCH 5.10 286/306] s390/pv: fix the forcing of the swiotlb Date: Thu, 16 Sep 2021 18:00:31 +0200 Message-Id: <20210916155803.853938563@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Halil Pasic commit 93ebb6828723b8aef114415c4dc3518342f7dcad upstream. Since commit 903cd0f315fe ("swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing") if code sets swiotlb_force it needs to do so before the swiotlb is initialised. Otherwise io_tlb_default_mem->force_bounce will not get set to true, and devices that use (the default) swiotlb will not bounce despite switolb_force having the value of SWIOTLB_FORCE. Let us restore swiotlb functionality for PV by fulfilling this new requirement. This change addresses what turned out to be a fragility in commit 64e1f0c531d1 ("s390/mm: force swiotlb for protected virtualization"), which ain't exactly broken in its original context, but could give us some more headache if people backport the broken change and forget this fix. Signed-off-by: Halil Pasic Tested-by: Christian Borntraeger Reviewed-by: Christian Borntraeger Fixes: 903cd0f315fe ("swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing") Fixes: 64e1f0c531d1 ("s390/mm: force swiotlb for protected virtualization") Cc: stable@vger.kernel.org #5.3+ Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Greg Kroah-Hartman --- arch/s390/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -180,9 +180,9 @@ static void pv_init(void) return; /* make sure bounce buffers are shared */ + swiotlb_force = SWIOTLB_FORCE; swiotlb_init(1); swiotlb_update_mem_attributes(); - swiotlb_force = SWIOTLB_FORCE; } void __init mem_init(void)