From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77D9FC4338F for ; Fri, 30 Jul 2021 09:23:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4787A61008 for ; Fri, 30 Jul 2021 09:23:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4787A61008 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PrxP4yPMPim0x1EO+o2fvc+WluqVETfM1qosopV3Byo=; b=vZtPJb79S71TbE r4+p03nZUsQ5I/dV9EBwDPPP4/MsBhsY+tG5OX57mioP4q5FkVhTX4vLA4d9bG1W5FKYs6dW6RMye lbgTewWXI9f05TvPXg9uRS2q6OEslRQatIQ0WnzDvKDuXzoh4TYuQUv3BAIm/G8DjASp/kkUbehc7 HzDTp/e2/cTkHe0k+WP7dtCj5DuG/FBHyQv4DH49hVTuSM3IHqudndFZDQPvhLTFUntuwtUJIuoGB VUFeY6cty9qGsg/CmOyWQWYz3262jueJ+Qaku+BgDb9r8NduWUj3fqohEGypihGlgxeMAR8N2qWSj I268AP6M0PfDQKDgNMqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m9OhK-007qSC-Hd; Fri, 30 Jul 2021 09:20:54 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m9OhG-007qQz-Hf for linux-arm-kernel@lists.infradead.org; Fri, 30 Jul 2021 09:20:52 +0000 Received: by mail-ej1-x632.google.com with SMTP id nd39so15646525ejc.5 for ; Fri, 30 Jul 2021 02:20:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yScgO+5K8kMvLXSdgAzUDbgBygVn2oY3p7co+ejC8RY=; b=uyMWYyaeqqDhutMdu8v6DlYLjabZMV/k588QHhkknUzmU0ef6XiKJGZUjdSB9McEjG UxMPoRZTxUmiVR3QmfCAQT7DTXR4ine1XyMgl3TWEygtL5mWPaczA25AkqXZ9MKHjPm7 BXh2sVGR3V7IAMJ1zBfSeyiVJ1kZUnV/tRAyP0A0RETO60FXQb9s+utY77i+iOGBcEWi EbZ4102Ds71YqzCfnk98PsMuxZCKL8NtXPcuxnCdwwRjylKJkFWFYbJA7FyWFp+Hsyuj MUA1J6wN21nMVcVAvsmEYTAANme/cKhG9/aACc2p6v2tq+T7UhlVPNzMx/lO7wv9LmCG v/3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yScgO+5K8kMvLXSdgAzUDbgBygVn2oY3p7co+ejC8RY=; b=PiRYMbw0+zfgpWta5UGxs9qWi1RyKHYs+cVTLst9qhbSLn8CLHxzz9jAYnRU2KYGsc j/6oDsrFYVxBW+q5kdaSokpD9BMoxyNcbT2kkW84t2kZMSyj1XkzBo6oAxewmzriYIPp F092KpZyYmKras//jV1cTv91fC3jhyN/vvQMdnlHjn+5MHX5nkW4WtW+z925qgdP3Lqw d4gUpCvENZyIHJNDIOhqk5xiPWl3PH9vtKqkOIaBS1npUUkLCYGHjOmr3zQxHBlOZq0K g6fTRaYnqUSuPVoojGCiC+gzu2KlGYcZMUzODPKsLZqB0jO9GBeNisbt4i2g0LQXor0a X/uA== X-Gm-Message-State: AOAM533tbfyK2XJfGRSKHLIqaqN6d5O34s97Oxnc9m4g/goFv8VZtiXy PUsv/ruzOQ8JAVADHGwECGsCf01cllZB7A== X-Google-Smtp-Source: ABdhPJyvE+/FXDDFFPKn2vjWz2vToufjMHW31XnzNuOnMPZO+Nf9/mHtMwMoKC91LEbUZQzAEhlPaQ== X-Received: by 2002:a17:906:2497:: with SMTP id e23mr1696642ejb.194.1627636848490; Fri, 30 Jul 2021 02:20:48 -0700 (PDT) Received: from myrica (adsl-84-226-111-173.adslplus.ch. [84.226.111.173]) by smtp.gmail.com with ESMTPSA id f20sm355006ejz.30.2021.07.30.02.20.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jul 2021 02:20:47 -0700 (PDT) Date: Fri, 30 Jul 2021 11:20:27 +0200 From: Jean-Philippe Brucker To: Robin Murphy Cc: joro@8bytes.org, will@kernel.org, linux-kernel@vger.kernel.org, dianders@chromium.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 11/24] iommu/virtio: Drop IOVA cookie management Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210730_022050_649189_AC4F60FB X-CRM114-Status: GOOD ( 18.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jul 28, 2021 at 04:58:32PM +0100, Robin Murphy wrote: > The core code bakes its own cookies now. > > CC: Jean-Philippe Brucker > Signed-off-by: Robin Murphy Reviewed-by: Jean-Philippe Brucker Also tested on the Seattle (vsmmuv3/viommu with lazy/strict, still need to test the runtime switch). > --- > drivers/iommu/virtio-iommu.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c > index 6abdcab7273b..80930ce04a16 100644 > --- a/drivers/iommu/virtio-iommu.c > +++ b/drivers/iommu/virtio-iommu.c > @@ -598,12 +598,6 @@ static struct iommu_domain *viommu_domain_alloc(unsigned type) > spin_lock_init(&vdomain->mappings_lock); > vdomain->mappings = RB_ROOT_CACHED; > > - if (type == IOMMU_DOMAIN_DMA && > - iommu_get_dma_cookie(&vdomain->domain)) { > - kfree(vdomain); > - return NULL; > - } > - > return &vdomain->domain; > } > > @@ -643,8 +637,6 @@ static void viommu_domain_free(struct iommu_domain *domain) > { > struct viommu_domain *vdomain = to_viommu_domain(domain); > > - iommu_put_dma_cookie(domain); > - > /* Free all remaining mappings (size 2^64) */ > viommu_del_mappings(vdomain, 0, 0); > > -- > 2.25.1 > > _______________________________________________ > iommu mailing list > iommu@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/iommu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel