Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp605779pxa; Wed, 19 Aug 2020 09:52:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+heR6rN884KOTCtMUQsuGl5q0YhB912rgsV1rEOTWSxuSrMH903yQmEptNOLr+B1ljjZu X-Received: by 2002:a17:906:8389:: with SMTP id p9mr5117738ejx.346.1597855963143; Wed, 19 Aug 2020 09:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597855963; cv=none; d=google.com; s=arc-20160816; b=cpqJSFZxM+bOw9MIyqkJyCR0sIZnwN2yuKyxXIpQMwdkPicAM5+HXE02dLf59BxLGd gDKTTuPyHs8CVOETjd5U1hZjRx91erDvpJ8emVjAMpLStfoD3VZBlx7YWefNyplTMKDg X1kQ9jmapYDzy2rdO2fn4sRIJTqAArTJsas4jlQekhvdV+R2H2l61oLxqqmYKhtV4Phy yWp4qDPQ0rSetdONjXB0ODFH0Qdov3jsrCdCwF13Zy553b10dw2u+4FLRg/yhYRdG9Iq Vl0yNd2gwL4Wm8cqGdxHKqE6fm104q33miQixya+r4IahOJomGQaUncEZckPuiYJbMsd lvuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references:dkim-signature; bh=tqJsL3NOrZOpVuHKMhwEymWTkIxr1YpclBsxqWSalzQ=; b=CJhjz6Z3ZasNYPrhRbMXtRBqunur6wbbCQTHCvQZ6M73RKyQIK1y/feVCDZKtidJfd XIf64He5ASxw6O8V5fi0ELxXaLX8VJthKSDHTB8BuMiDrXBCDAPsprOtivRAVpAPnkpY //ljDq42Inb46J8J0uag3IOWgXw4KE+6rsSpDnd8WxJGrYZuVUL/Vac4lW19qR9OpAPp MdGQ3s8x1/6h21/ihwplBeXh+tSDvL2+zjn009bKn69bwEDmcHUtN12q1nQCGGRxRPGc RqTUXW+2YfjTAxedxZBWYo2g+z6UtHKWYaVrO3cIcUIcgOrkiwknuhqth6YzL+cjC0Z5 BpRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=sLx9zKbj; 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f24si15293045edm.305.2020.08.19.09.52.17; Wed, 19 Aug 2020 09:52:43 -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=@ibm.com header.s=pp1 header.b=sLx9zKbj; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726837AbgHSQvP (ORCPT + 99 others); Wed, 19 Aug 2020 12:51:15 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:20126 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726211AbgHSQvL (ORCPT ); Wed, 19 Aug 2020 12:51:11 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07JGWpjh074353; Wed, 19 Aug 2020 12:50:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=references : from : to : cc : subject : in-reply-to : date : message-id : mime-version : content-type; s=pp1; bh=tqJsL3NOrZOpVuHKMhwEymWTkIxr1YpclBsxqWSalzQ=; b=sLx9zKbj7U7tJhda2zJeJPEJuwI8ggCh38319LJjZEsCAQM8KuNL/C1zHPbnFstaTTCY JHGTbgSY9Ud5PklEwhC3/OzTahMCCdpzot3SWKICHX6iLaJZL5JQTR68F/DzipCvK2fQ 7U8pzVCegj4JZTlDiC322gAF3B7qpUCB3OjWNx+nwQuF5cNGoe877c+Fw9KIkHDKaUJU 8kIYNDCaP2dunh7Sy7wuzj9DolaJ5Smg8JkiJImCr8QGMYyG+B3NH3fzkquAIWczfwja FMf3rpxcLuJ+KYRr/BkFpIZD3wtGSv4p8OtVD/VuMEdgbQ/TKemxbgkED5xBUhbHWYxw eQ== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 330ccb8m0r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Aug 2020 12:50:41 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 07JGodv2019248; Wed, 19 Aug 2020 16:50:39 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma04wdc.us.ibm.com with ESMTP id 3304uenck9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Aug 2020 16:50:39 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 07JGodUj54329768 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Aug 2020 16:50:39 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5D95CAE05C; Wed, 19 Aug 2020 16:50:39 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 33B75AE062; Wed, 19 Aug 2020 16:50:36 +0000 (GMT) Received: from morokweng.localdomain (unknown [9.211.41.171]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTPS; Wed, 19 Aug 2020 16:50:35 +0000 (GMT) References: <20200818221126.391073-1-bauerman@linux.ibm.com> <20200819044351.GA19391@lst.de> User-agent: mu4e 1.2.0; emacs 26.3 From: Thiago Jung Bauermann To: Christoph Hellwig Cc: iommu@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Konrad Rzeszutek Wilk , Marek Szyprowski , Robin Murphy , Michael Ellerman , Ram Pai , Satheesh Rajendran Subject: Re: [PATCH v3] powerpc/pseries/svm: Allocate SWIOTLB buffer anywhere in memory In-reply-to: <20200819044351.GA19391@lst.de> Date: Wed, 19 Aug 2020 13:50:31 -0300 Message-ID: <87lfiaeg14.fsf@morokweng.localdomain> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-19_09:2020-08-19,2020-08-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 mlxlogscore=999 suspectscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 malwarescore=0 clxscore=1015 phishscore=0 priorityscore=1501 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008190138 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christoph Hellwig writes: > On Tue, Aug 18, 2020 at 07:11:26PM -0300, Thiago Jung Bauermann wrote: >> POWER secure guests (i.e., guests which use the Protection Execution >> Facility) need to use SWIOTLB to be able to do I/O with the hypervisor, but >> they don't need the SWIOTLB memory to be in low addresses since the >> hypervisor doesn't have any addressing limitation. >> >> This solves a SWIOTLB initialization problem we are seeing in secure guests >> with 128 GB of RAM: they are configured with 4 GB of crashkernel reserved >> memory, which leaves no space for SWIOTLB in low addresses. >> >> To do this, we use mostly the same code as swiotlb_init(), but allocate the >> buffer using memblock_alloc() instead of memblock_alloc_low(). >> >> Signed-off-by: Thiago Jung Bauermann > > Looks fine to me (except for the pointlessly long comment lines, but I've > been told that's the powerpc way). Thanks! Do I have your Reviewed-by? -- Thiago Jung Bauermann IBM Linux Technology Center