Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1319217rdb; Fri, 1 Dec 2023 12:48:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUXuBYlo1T2S6cAGr6/hhhaxrvc75bxd6n3MRajEI5RKOIeS/5g33or0I0/jzKgm3GmWGl X-Received: by 2002:a05:6a20:841f:b0:18a:181b:146b with SMTP id c31-20020a056a20841f00b0018a181b146bmr226094pzd.29.1701463718577; Fri, 01 Dec 2023 12:48:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701463718; cv=none; d=google.com; s=arc-20160816; b=JtWtpe6aNwBp4uqH0l5knt0KNjyhqYw+5MVvgL+mgeTlHzOztwaeZ153FE8+8e9GrY u5e1UpShDKYERtX0USX+ZBzvgxvAJYwZ+sBPUj09/j/Hv2UtG/At4WjXFMC/dVpbuPaG oLx+yh/Yc/dDatDJ1MoP+dzLXAXYg+0b+YjGEfy8Ji4xWLMIYXs10cLRA+5UjEFG+jGe dPX/fi9Hj4olPRGadfuoUFsRQ7AZ4N7g1yRctMDQBLXfQ7TVOrPkp3AK2qwHB5bSrrSg pCC1KyFHVm/A2xUriV+s6tWvvl6gAYG0eDaVev+s7U0iOQlrGW5HIsYtqI006orUj7+C M8NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sc0mXGdos+flIqYbEOETr4gKaCIcHlnZcTFOmVNNT/s=; fh=Qx+CX5f+w3NdjDWQoI1kmmf8/N/xrFv+MfSiEm7HGNw=; b=FBNfnYINTGB9c0lC2eqEnul+QQHN548s6HNFXzujoVStYEsZ+rcny9YRupZAWtHK4s ndpGm+yr7+LYoLsA9aelknWyFZY/QyyJ9bSGexvkZ5RkHlK733olQx+rLhkT2yTJKjph A6XBcTG7CsS1SUaZLH/+YQcLfJWkQm0yrZ96Itng5X0gBFs5t5Ec4QzjpyohY/oaQhdX rTZokc2HRJ6aLn3QBRzQvJAuuwKg4bSaC2e507IVCXt0FvV++6VqXbmxzlpoo+Y8KcB7 UAYIWqur7pVNijDG2l4APJGXtlTUMN6Tuoxn5h1TvuCfYdduAfSIWcHgekfR6fQbYQdm UAjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=PCPpbHga; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id w4-20020a63d744000000b005c2203bfc01si4033686pgi.170.2023.12.01.12.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 12:48:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=PCPpbHga; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id D250B80C5C97; Fri, 1 Dec 2023 12:48:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229534AbjLAUsP (ORCPT + 99 others); Fri, 1 Dec 2023 15:48:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjLAUsO (ORCPT ); Fri, 1 Dec 2023 15:48:14 -0500 Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE5E2FF for ; Fri, 1 Dec 2023 12:48:20 -0800 (PST) Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-58d54fd8c5aso1317931eaf.2 for ; Fri, 01 Dec 2023 12:48:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1701463700; x=1702068500; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=sc0mXGdos+flIqYbEOETr4gKaCIcHlnZcTFOmVNNT/s=; b=PCPpbHgaHaLzF2YJYe/ymH6Kk3KgLSZlnHvGgCVw+0zWtZ/KRGMpk/g0v5Kxl7mt+F ocYzErTRGCkM5yaesc7vmPbyl0yZWZlTQ/pcePv4ipxC6Pc2vpyUVtpDzPgnooWOXQri GkvNwno3Y2VNo7dpFPSyZCvSfjn9KIpZGezYXoaGHb2FobCW5/mys7Wlb4fL5VpEfSCz XAdiXrMX4WDNed/JU2LoDiRHYHELmbmDpEjcSfda015dwV+2zaMqu6q6BmIiMEGDf+fS O7/HSyMAijWE+m4r/ElkDglj18FsMDFdoVr28Q/IOQ75ogmy/rueI6UbxmPZXyjuqar5 L+Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701463700; x=1702068500; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sc0mXGdos+flIqYbEOETr4gKaCIcHlnZcTFOmVNNT/s=; b=JIPIkhNdezucTYZIsbc4WPBAuGrkUQzV53VcF9/ihbEnqzAGdTeBpbPLsDvCFC7I4O CQWwTh1nAg9p96Wo1ZPNYi4mUK/B0FJsfN1qZh4N2avNyDVkj8PWO5uAuGPZQkIfTRwy yHaZBvD6NKvfBUe0pXPL3tmpvTr3/Rz+E1YIN9hVPu8t1vq4cdunMqb8qH7QGHdpJRy1 39+/bjy0rdaU/M38JYELwQOZCeRxw97I+fu74KR7/bUMS80SpHrIFXzk46lBMCsTQrl2 oR57RRlpCoBUyiGqkLsRwxP74AjQ31aywQVG75BdybF1zSg6GTCzcVawkl3WpXfW6G86 IL1A== X-Gm-Message-State: AOJu0YwY0X3apIbgV0QXee6fz9jZGMNRF4BSxbKHY5ggHrzpBocozjMr G4DK22OnIZJHg+HH8meMBpji0g== X-Received: by 2002:a05:6870:698c:b0:1fa:789a:d12c with SMTP id my12-20020a056870698c00b001fa789ad12cmr337579oab.38.1701463700064; Fri, 01 Dec 2023 12:48:20 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-134-23-187.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.134.23.187]) by smtp.gmail.com with ESMTPSA id s9-20020a0c8d49000000b0067a245efd3csm1825633qvb.135.2023.12.01.12.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 12:48:19 -0800 (PST) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1r9AQs-006OM7-TF; Fri, 01 Dec 2023 16:48:18 -0400 Date: Fri, 1 Dec 2023 16:48:18 -0400 From: Jason Gunthorpe To: Tina Zhang Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org, David Woodhouse , Lu Baolu , Joerg Roedel , Will Deacon , Robin Murphy , Kevin Tian , Nicolin Chen , Michael Shavit , Vasant Hegde , Jean-Philippe Brucker , Raj Ashok , Yi Liu , Fenghua Yu , torvalds@linux-foundation.org, Jacob Pan Subject: Re: [PATCH] iommu: Change kconfig around IOMMU_SVA Message-ID: <20231201204818.GH1489931@ziepe.ca> References: <20231128021635.5530-1-tina.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231128021635.5530-1-tina.zhang@intel.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 01 Dec 2023 12:48:35 -0800 (PST) On Tue, Nov 28, 2023 at 10:16:35AM +0800, Tina Zhang wrote: > From: Jason Gunthorpe > > Linus suggested that the kconfig here is confusing: > > https://lore.kernel.org/all/CAHk-=wgUiAtiszwseM1p2fCJ+sC4XWQ+YN4TanFhUgvUqjr9Xw@mail.gmail.com/ > > Let's break it into three kconfigs controlling distinct things: > > - CONFIG_IOMMU_MM_DATA controls if the mm_struct has the additional > fields for the IOMMU. Currently only PASID, but later patches store > a struct iommu_mm_data * > > - CONFIG_ARCH_HAS_CPU_PASID controls if the arch needs the scheduling bit > for keeping track of the ENQCMD instruction. x86 will select this if > IOMMU_SVA is enabled > > - IOMMU_SVA controls if the IOMMU core compiles in the SVA support code > for iommu driver use and the IOMMU exported API > > This way ARM will not enable CONFIG_ARCH_HAS_CPU_PASID > > Signed-off-by: Jason Gunthorpe > Signed-off-by: Tina Zhang > --- > arch/Kconfig | 5 +++++ > arch/x86/Kconfig | 1 + > arch/x86/kernel/traps.c | 2 +- > drivers/iommu/Kconfig | 1 + > include/linux/iommu.h | 2 +- > include/linux/mm_types.h | 2 +- > include/linux/sched.h | 2 +- > kernel/fork.c | 2 +- > mm/Kconfig | 3 +++ > mm/init-mm.c | 2 +- > 10 files changed, 16 insertions(+), 6 deletions(-) Try again, you need to cc the mm list and the x86 list Jason