Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3438073pxk; Mon, 21 Sep 2020 13:47:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWH112w2vHEWrJL7qpt28smb5nmmDe6gE8VEGvWudnmxTsaELfTwH2w7oHvxdKXuAzT/Wa X-Received: by 2002:aa7:cf0e:: with SMTP id a14mr743119edy.81.1600721244107; Mon, 21 Sep 2020 13:47:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600721244; cv=none; d=google.com; s=arc-20160816; b=ImgjXQJfKVNwuEznF/C1Z7GQUEoXfc+GPRz9cCEcgSzqjueHtfAYe0QLlSKCb4refX cXD6WcMnPrctIboR8pzkid3TULrgB196IV4DJMBSQHsjm0CLvtXxoQI8QH0vr0x2bx4M rWVzUwWgi6excf+QEBCo9jUjfUq0OzCK6pudjrd0mv9GkNElnfqn8UoFIP/L+5pUdIk0 Zy3v3IbG1KduOyHUN+L+s/8woonD6j53xl1QpmWr1D5/b1+mNSF3HkN60f9laTDUPjXT aJZm0cPh5vQr8XRqjLMi8UELOBjETECMfjWHOOHVBUb8/nPqhGEBEV8RoPpmxCzHZqQ9 xLlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=sX86mdgijKJaNQZ2smFxqiBZuPkP84sD0FoilWLFpzw=; b=G/wtzMEgR4Iuli2OnWHmQFesJubWxzUD5a1VdRMXuNkAJKCUxzB3uvvhTodPHPU9q2 12fVefDmx0Wg/ABjPcMF4Zfubj3rymvtYLXyS4aqs9ecb4t1ZA0lFklzxEIG0/EalKxw 0nwlDO/ODA3lBOkKCjJAXLBu2M1tSG0sTviSyA4E0JvZ8Ok910hI1VopG9ACXkeyBc59 tsAxftOXcX5UhL2gSaaeJWEIGvN076+bgX+0nCmnpzjq7rKXRWMo8ydWCiS25uL/Jjq6 ci4m8CM0EKf8nOYvbTEspxwBoPVyQnk86xcm6zQdvtOu9n/25U7hlahP0aPCEsZq1Sr1 9NOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ol3y6mLG; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si6525799ejw.413.2020.09.21.13.47.00; Mon, 21 Sep 2020 13:47:24 -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=@kernel.org header.s=default header.b=Ol3y6mLG; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727483AbgIUUpv (ORCPT + 99 others); Mon, 21 Sep 2020 16:45:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:53690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726468AbgIUUpv (ORCPT ); Mon, 21 Sep 2020 16:45:51 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3014720735; Mon, 21 Sep 2020 20:45:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600721151; bh=2azUc9d8t3fHwPUNHpcYBtku3ZGS3Konwm3NpWeBUPU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ol3y6mLGysrQgD+hsUG5Zs8QfPycb6c9FdF4neo3Yl2B/SVvlbRvPSbSEpjww+2bT uQo4nTyqiwwW8rqhc69kVyrBTohJyZSTfJKOw07y1OP8yU+hIq6ad10ko+dr9Pn/vT pBH3mLd+y9ggYldkOg61tDWF3qUa/bBauierV5Ks= Date: Mon, 21 Sep 2020 21:45:45 +0100 From: Will Deacon To: Vennila Megavannan Cc: robin.murphy@arm.com, joro@8bytes.org, srinath.mannam@broadcom.com, jean-philippe@linaro.org, eric.auger@redhat.com, shameerali.kolothum.thodi@huawei.com, tyhicks@linux.microsoft.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Subject: Re: [PATCH v2] iommu/arm: Add module parameter to set msi iova address Message-ID: <20200921204545.GA3811@willie-the-truck> References: <20200914181307.117792-1-vemegava@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200914181307.117792-1-vemegava@linux.microsoft.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 14, 2020 at 11:13:07AM -0700, Vennila Megavannan wrote: > From: Srinath Mannam > > Add provision to change default value of MSI IOVA base to platform's > suitable IOVA using module parameter. The present hardcoded MSI IOVA base > may not be the accessible IOVA ranges of platform. > > If any platform has the limitaion to access default MSI IOVA, then it can > be changed using "arm-smmu.msi_iova_base=0xa0000000" command line argument. > > Signed-off-by: Srinath Mannam > Co-developed-by: Vennila Megavannan > Signed-off-by: Vennila Megavannan > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 5 ++++- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 5 ++++- > 2 files changed, 8 insertions(+), 2 deletions(-) This feels pretty fragile. Wouldn't it be better to realise that there's a region conflict with iommu_dma_get_resv_regions() and move the MSI window accordingly at runtime? Will