Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1850099pxb; Thu, 16 Sep 2021 17:52:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKINCc9325Nz7UAYjdjb9x3ntRA+EyzJLdA2kl7uwrg8zi2ADFv2LY65Fl3Jm6s88lpNei X-Received: by 2002:a05:6e02:148e:: with SMTP id n14mr3096372ilk.319.1631839943152; Thu, 16 Sep 2021 17:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631839943; cv=none; d=google.com; s=arc-20160816; b=eBZkeKwXPAlV+svLvBr6/Pg/5xS85/sD7LMEi655+8tI/783JG2LVq0grLCj4wE5ir joVHULa2SASkeQWO0myMCbX1yExc67/QTC//EIDY/ZQKxykd6LeRNwF2zZhATfDsSzbS C0HLmr4B1ngYrdeIpNBj3MaDS6yXkYr31b3D6/MAk2QA/VbgpaYIuXfDqAUPORqUBvjt KU9DupBIqxxvxvYecA0Atakb+XVvg5vZMLq9tZtSJ5k0zwj0etMOMSYjo54jOdPVe9Ar VTjnAQ6yligof4P8Z3zp7CTzT8BawrBpLlMSKLQqQ1RmTCzAmsCUBU+UObbwAjQaTr52 I6oQ== 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=9uHHlLWDCj/1aAx3PhOkjtAu6SscNirez6vPnn6arhs=; b=geTGZJIgrQ8AJEuQweKNAPkaqT6SR++J309rn6D+SXElGzwdxSIKCpLEWhFLg2nDBg A0rdRssG1DgBwDArHQg9MQm6q7Lxj204k/2gzYeosPEijjqx1LBSaxeQl8/jHzX8qgCr Hlz5uZEOZe6fY2J1wLOt2swXE2pV1f93hwhz9RwyI9CnZaPsRYi0zfEe6l2ZT6j3GHk/ xuHNHy7EpJLm8paLkbXvMwpLua1HjyXUmoz3w+jS2ujaKUhWB4z2MwuqvzgcbYTFgJUH /wuW+nnSIvD4JYXPFU6bqC8jIFUpp0cqOf6n1HPP6Ylk07llLzdj57U4FiKOB3l7M7sJ b4nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kkgfa4tj; 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 v11si3820677iol.46.2021.09.16.17.52.11; Thu, 16 Sep 2021 17:52:23 -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=kkgfa4tj; 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 S245326AbhIPRLG (ORCPT + 99 others); Thu, 16 Sep 2021 13:11:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:34164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348881AbhIPRDS (ORCPT ); Thu, 16 Sep 2021 13:03:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3C360617E2; Thu, 16 Sep 2021 16:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810065; bh=BBeyKNK44+fXwO9rcbxjtQzZo+draOt3fVXpXTPATWw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kkgfa4tjD1tuP+6QymaCinnj3zrZyss+SpnnfKAviQsTImzvp989fd6QBY7fGP1ho DbDpvkKm2eAUARjOEPp4Dyiz8vpeWH07m1t4DIoEZCAP6fLKpggAQHn88s5aTXnHLE yG2e65eJ1CFn5FKWfAni14PLIFxpYuQ7xGxoLYdY= 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.13 355/380] s390/pv: fix the forcing of the swiotlb Date: Thu, 16 Sep 2021 18:01:52 +0200 Message-Id: <20210916155816.134595528@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155803.966362085@linuxfoundation.org> References: <20210916155803.966362085@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 @@ -186,9 +186,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)