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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 04FC1C432BE for ; Fri, 30 Jul 2021 09:20:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DED7560720 for ; Fri, 30 Jul 2021 09:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238126AbhG3JU6 (ORCPT ); Fri, 30 Jul 2021 05:20:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237864AbhG3JU4 (ORCPT ); Fri, 30 Jul 2021 05:20:56 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A224C061765 for ; Fri, 30 Jul 2021 02:20:50 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id hw6so1733504ejc.10 for ; Fri, 30 Jul 2021 02:20:50 -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=LqyyiLIQoC2Q6Jh0rKa1lARY/TS7VCs+ytpolO8pDaAVPBaKfmxanrAeyjwzcelim+ BdFAFLAOu9yKPZ5TYruBKy5tbN6AhTSogrLCm2NJxLG5pqHB5sPuaSI5Y8brSF0vc/7/ 2luZK7eQGd+FvlKk/uliuFSihbw0IVxnAQwzwAhqLPlMXjt2p7XfT4BXr9AJoJgOtUjm c0GMBFE+wFftcBX2wL4sNC6cM/ZzjK7NmEdYmUJprWi9B1HmeV0y37h8oXMeHsodXD7y 95hJ95eEXKSpLcp3l55ua/rLtrgQ78GvqWSpAiP0tYwnwsGVIfp186M/6JHYK+U9YBvb T4mQ== X-Gm-Message-State: AOAM530MRUlIYcNgz/WXNNu62O+Wkvf55wxPTaN9d7X88Wkim1iNiryJ UDNXSKb/IYSvqUIeAF73EtXu0A== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 34620C4338F for ; Fri, 30 Jul 2021 09:20:56 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.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 C6C9060720 for ; Fri, 30 Jul 2021 09:20:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C6C9060720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 7ACC340105; Fri, 30 Jul 2021 09:20:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xUpx46XfjL0l; Fri, 30 Jul 2021 09:20:54 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1387340104; Fri, 30 Jul 2021 09:20:54 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D8FDDC001A; Fri, 30 Jul 2021 09:20:53 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 45236C000E for ; Fri, 30 Jul 2021 09:20:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 1F5B340105 for ; Fri, 30 Jul 2021 09:20:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 75YzcHSd37BI for ; Fri, 30 Jul 2021 09:20:50 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by smtp2.osuosl.org (Postfix) with ESMTPS id 8DF0E40104 for ; Fri, 30 Jul 2021 09:20:50 +0000 (UTC) Received: by mail-ej1-x634.google.com with SMTP id go31so15604962ejc.6 for ; Fri, 30 Jul 2021 02:20:50 -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=ANBfHiziKRSwSVLNlzIKE7Ld059t5jJdzucO4RB2U8AKcvbdKUg+TW4BBa5pm0J/Nl 2aNfPPvRDxWAKQRCDB/zQZAWYBIFUab/rQGmkDCsnyPnMlC/LXsvZ3lNFfSr01/5lCab nzYpAb0+Uy+p8UcOLX55A5qFXfAiK52D8CDgQIblhgA8g8M8/6hbzMOpw627ACmg1wHq S8nn0lwaODSaQLfX03jkW884pecWBhg8XTqdbLO63xO9GpufOowdiBwmEHhleZkAubHo q7vuDDxlnr7i+JgWwjKeYUHarnuGbtygz0+/fMuyh+FQz5XF1I8VcQ+hE3wnD6kGLDqr cGvA== X-Gm-Message-State: AOAM532x59EBRhUWYnJ5JHINp/tv4hInEUqbd6YM9hi3xsdXhFoZ9k6x VcvHilI/eIKBhOSbPCB3P0fmfA== 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 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: Cc: linux-kernel@vger.kernel.org, dianders@chromium.org, iommu@lists.linux-foundation.org, will@kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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