Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4700568rwr; Sun, 30 Apr 2023 13:08:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51Bl5SOIrYT+zuOn9Z6I2F7bCunBTLz6xEUF2cQGKVUfgxlIV7nEnC+gE/XW228CVjd5To X-Received: by 2002:a05:6a00:1402:b0:63d:2343:f9b with SMTP id l2-20020a056a00140200b0063d23430f9bmr16293955pfu.19.1682885312168; Sun, 30 Apr 2023 13:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682885312; cv=none; d=google.com; s=arc-20160816; b=q5wdMqa20PmjsxUtYYyEiwzklL7Bi8lu0zfX7Wf2ytGax5zd8yswILvKx2YOhzjz3p 7FCXqvAwQh1AZ5Q4iavOj18N6g8UP0TVoeFPM3e7NePFZ0MlRfkgXLzQ5xyBmma1iFdp oCwtzJHNWMVGJtZKKemInyLi+mbcqr4o36e+DpmP+AIElG5XaWkucpG/etuWmYV66OE0 1kQf/nJz82Xg5Sl+ubcFdi3kzfWVYw1pKPR1Css9Hnf1VtfPFi7/m8rz+0f7kIwqk6mo wWW6zPnfSUaYwCxx4GSKzRIYZ6Tsvk6UP7PkQXcBtKqrNzH6r9v1zkVV+KMMAPvA1Wf6 NZ3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=iAT/2iwDABQLtvre5aF/VZoih+/bS832V3Wecs87BJg=; b=JEXs3NdzN3vYViFpOiEl8kzHV5o62DhV1tFetNdSFXDuazxNAlmMMdGkHB2p+A8gd5 9GGU2KLuGjOu0bsmaR9+z1tcg42qbRti+6AxUsRMQu3GR0YPTAF66eKUpLsA5X6am3dy 809F9TmZc8s8rDhC6qVrvSTt4joXDhSNr6sATwdg0yfqKuilzjZEslSfeFX8jXidinJY aHsr5LBMNp99nrBoC0l0cBr038gE+rQu0Od4LvzzyEi5ml/4oyVnifsDqFRz6dyTGayl Xso6RCTfljUaNdRuYcOHwgH9kBDgjYXVc2V9pqijujVU8VYu3ALleeEAfwKp6Eq0aQFE JL0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=L5mpwGfO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f189-20020a6251c6000000b0063286f81d35si27125276pfb.262.2023.04.30.13.08.19; Sun, 30 Apr 2023 13:08:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=L5mpwGfO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232041AbjD3UIM (ORCPT + 99 others); Sun, 30 Apr 2023 16:08:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232022AbjD3UII (ORCPT ); Sun, 30 Apr 2023 16:08:08 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B90710CE for ; Sun, 30 Apr 2023 13:08:05 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-50bc34b98edso1084645a12.3 for ; Sun, 30 Apr 2023 13:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1682885283; x=1685477283; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iAT/2iwDABQLtvre5aF/VZoih+/bS832V3Wecs87BJg=; b=L5mpwGfOFJz6YY/vGsnF4UITWfh+2BWeOEBTOsyKP2AIAruKAzlw0xc7u6MT1ayRpU 4vcYy6VXBmOLkohuxRI6N1zNfDGUJbE5n6LjPOsn0zoovS5fAiSjBGSFaJ7I/lZJ1f74 7hiAtZjnfDUhgj7XZj4tr6doEiZBnwV5lKeac= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682885283; x=1685477283; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iAT/2iwDABQLtvre5aF/VZoih+/bS832V3Wecs87BJg=; b=c2iq6pPkfiLqQz7Ir7JQ5G337HsJG4MqgeZooNHNHJEpG/IQ6x9nh6nmqlfLMWVc0n 6vPEXhKD6HxC0u66rAjLn66giffk8s+BCe4BYuTkaeR4idyUZi1kIPr1UKSvfiKgGsCx B0SiTLmkW7z13r2QZWbARMR03k+0lKRf9RoV3hkLXXOp3z+ZgWgB/xr3k2kuQKVkEhwW YMTqAlKbHQGqv5gSRclvw5AFQCjh2Loh3deDiMp4f5r+HvRnrZva8sIGQ2O2UxHtrqiq bxDALr4XSOaWN5DyLKCegBRSvR45gXPmQtxG/WseUmuwiMu7i0end4z4hv13BhgbbHEK aESA== X-Gm-Message-State: AC+VfDzenkjWfUWjXe32DZhgCeEsaYi+OXLtVnlZ43tn546A9qukpRdO kpmL6tql6OO/+Ko/15PRUHF1GvcGhcB0L8DBfov6uw== X-Received: by 2002:a05:6402:47:b0:509:c10d:b53d with SMTP id f7-20020a056402004700b00509c10db53dmr4121131edu.23.1682885283386; Sun, 30 Apr 2023 13:08:03 -0700 (PDT) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com. [209.85.218.44]) by smtp.gmail.com with ESMTPSA id d22-20020aa7d696000000b00504a7deefd6sm11524040edr.7.2023.04.30.13.08.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 30 Apr 2023 13:08:02 -0700 (PDT) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-953343581a4so272253566b.3 for ; Sun, 30 Apr 2023 13:08:02 -0700 (PDT) X-Received: by 2002:a17:906:9c82:b0:957:862a:9e6e with SMTP id fj2-20020a1709069c8200b00957862a9e6emr13699469ejc.73.1682885282026; Sun, 30 Apr 2023 13:08:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Sun, 30 Apr 2023 13:07:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [git pull] IOMMU Updates for Linux v6.4 To: Joerg Roedel , Jason Gunthorpe Cc: Will Deacon , linux-kernel@vger.kernel.org, iommu@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 30, 2023 at 4:13=E2=80=AFAM Joerg Roedel wrot= e: > > this pull-request is somewhat messier than usual because it has a lot of > conflicts with your tree. I resolved them in a test-merge and sorted it o= ut > for you to compare your solution to mine (mine is also mostly similar to > the one in linux-next). Your resolution is different from mine. Some of it is just white-space differences etc, but some of it is meaningfu= l. For example, you have if (mm->pasid < min || mm->pasid >=3D max) in your iommu_sva_alloc_pasid(), which seems to have undone the change in commit 4e14176ab13f ("iommu/sva: Stop using ioasid_set for SVA"), which changed it to check for .. mm->pasid > max) instead (which seems also consistent with what ida_alloc_range() does: 'max' is inclusive). You also seem to have kept the deleted header file. I'm also a bit unsure about what the intent with mm_valid_pasid() is. In commit cd3891158a77 ("iommu/sva: Move PASID helpers to sva code") that helper (under the previous name) got moved to a different header file, but in the process it also got done unconditionally as static inline bool pasid_valid(ioasid_t ioasid) { return ioasid !=3D INVALID_IOASID; } and didn't have a "ioasid is disabled in the config, so have an alternate helper that always returns false". But in your merge, you ended up splitting it into two versions again. I don't think that's technically the "right" merge (it basically changes things wrt the two branches), but I do think it's nicer. So I edited my merge to follow that lead. Finally, I'm not happy with the Kconfig situation here. Commit 99b5726b4423 ("iommu: Remove ioasid infrastructure") removed CONFIG_IOASID, but left the select IOASID in the 'config INTEL_IOMMU' Kconfig case. I removed that as dead, but now we have that select IOMMU_SVA in the 'config INTEL_IOMMU_SVM' case instead. So it's a very different Kconfig setup. Anyway, I'm not super-happy with how this all turned out. The example merge seems to be wrong, and the Kconfig situation is confusing. Somebody should double-check my result, in other words. Linus