Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp903009pxa; Wed, 19 Aug 2020 19:13:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvvyXVQGfgXTmkXa22kvDc6Lio31NvUxnX6kY40x0J0j0dwgjU92QYYs4ACp18LclG1ejp X-Received: by 2002:aa7:c604:: with SMTP id h4mr854084edq.336.1597889627800; Wed, 19 Aug 2020 19:13:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597889627; cv=none; d=google.com; s=arc-20160816; b=Q9sdXkidt/nPW9VNUUeTv01Kz8LjWp0pqHyFlxYqCJEGhW3bkbkPh3/r7YAJEb+PFp b2Rzqv0CmoKlgo0da4bR9SSrUPw975OmuzlPa08UHsSu3P1aA9qm9kuKNUoT/D2VSNz6 NqQby4X2PYBy0nXlxMI8ai8etfYHueKTyULYOHEqNxaBzHok97RMPb4/FFnIPy+RFbJi dbqK5o0HS0XNpGCDdJiSCkTW2TKcJur7Hg56zMQS9gECaQJOzo6CRkndLS2FHIh+OLbQ BtMU1tsKO25XedWqLRCEtEvHg0RTWmmAEfwjjHlTTI1kSmTsAEVS83lR+QeLn6bG3R1r z0Mw== 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:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=uhqFv3rZcRC3dqV7EVCyMMko6BZKKEhwylOc9puYbBs=; b=enUB455GC6fZoq3c4MPCqhyGwRPfdzeMKEseCz19b3vO8gtC+qeh2SVh7lCoAEcNq7 5whNJ1C/c/b958mwe0w6ry8fldKkJr373G22WdPn6DwFFNigvn/7BxSzgmlJikbFzu6M 5orwQHZ/tn1J9NjDNohsTyU8HZJPu4nH909Fpp2eAYuVmMwH0QwAYEI5pCEX0lIdzZEL tVOWSM7eypsIPbDlGgJY93uNiu/fyhoD/hBv6NBbDfLAG0WMFC2TnnG9VG+LnK0w12/+ GYzMa7cV/yWATz7xyBikW3fiec1IIkXYM/BI58CGvxnxAUCD48R3j1nxLkf6SJIlZC1E BJ1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=pZigIs87; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q22si339611ejn.410.2020.08.19.19.13.20; Wed, 19 Aug 2020 19:13:47 -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=@ellerman.id.au header.s=201909 header.b=pZigIs87; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726698AbgHTCMn (ORCPT + 99 others); Wed, 19 Aug 2020 22:12:43 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:37319 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726578AbgHTCMm (ORCPT ); Wed, 19 Aug 2020 22:12:42 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4BX7TM3wDzz9sRN; Thu, 20 Aug 2020 12:12:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1597889560; bh=gPdGSuMbBr6AKJw/++doCCfD8GkVb+j4pQ8PJ3xV49A=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=pZigIs87s/0HJCQu3CMeGxmU0e2JIr0P58tO7g3RDssIi9EJAWo6dG2xAEOeHDFUN H/U0C6GQyVs1FTXIqdcuIOi1g6VWt3esLh1358kQCRaPPn3HpgPcIfg7b0MqD4lPxa vaedp/MpmDiMZyRDSUDUTwoIyNc2WvONX4FWrm9ApXlgHzNAHzVOQ1LWJQ6aL7VIQv jYci3SYKpJhI7xoajLFJH8NrnUEgQdKBtqb/Gnjb6UVVuc40f9BgYZO2HAzBFkSGh8 Ym6AviUgzKcWLDdtvnZFf5y5fvG+orpGwMv3tCGcngvhsq4jMphAzi+hKg7TzFnQqq YO31FxQ3zKJzg== From: Michael Ellerman To: Christoph Hellwig , Thiago Jung Bauermann Cc: iommu@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Konrad Rzeszutek Wilk , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Ram Pai , Satheesh Rajendran Subject: Re: [PATCH v3] powerpc/pseries/svm: Allocate SWIOTLB buffer anywhere in memory In-Reply-To: <20200819044351.GA19391@lst.de> References: <20200818221126.391073-1-bauerman@linux.ibm.com> <20200819044351.GA19391@lst.de> Date: Thu, 20 Aug 2020 12:12:35 +1000 Message-ID: <877dtuhxpo.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain 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). They're 80 columns AFAICS? cheers