Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp227572pxb; Wed, 4 Nov 2020 20:48:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJytmvNdg0hcdPZDqXCTbltodxFsTscU9OQk0g3UBOILT9Gc0ARbqfTm5f+SHNTAkEqQY57s X-Received: by 2002:aa7:c358:: with SMTP id j24mr739900edr.265.1604551726144; Wed, 04 Nov 2020 20:48:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604551726; cv=none; d=google.com; s=arc-20160816; b=zMVZ9AQALAJiQnv64MBKIGjoP0FOXZQJm0/q+R8MM/GZuKDisoTDJmi6qdsFeCmNqr kmzX2tl6P+GWvaVqIbUTuHDsV54pgfkNfC7J4+3sh1O5UDq4xqBU7ek4J/vpRBAIoqXW SFP+INi+iHMEjr2qQnuWnhTcVjgVEAoSXnw17k5D45bmp3wGJdKI0sZs24+H5mMnl9MJ girHS3bGFLJOhiN2vORbRQ9DddztDmgeFcPZqCfnpMhwppms3zHzOwpfANEQHjjD6Sgg HuiMNAdVBfOG7ArkltA/sHBwhjBDu8wViNZSbd/EI+Ly5oMiZMMLDjp4SurkVQtepK0l c0ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7skSxIX4H4ERr2KWMBBNL6BPLI6dS/H7sqa5OXUDuu0=; b=XxjZripNbbfhDdPuvcOmwkbwah8Pcul8F7mHbAdzJoaqK2EaOxipa96hj0l3z/IZgB 5lPaYtiI/e101DKIgMQDxZ1asEgikHRpKWknZtqpbc9kgwy+zKrBrb9E2cDLhsD7rETt pW5GxXpcCrRR/6zxlouAoGpiiV5681Y3anNieNSPTn8rpdpyn5gnCzWqmdD3kH0Zb/I6 hfLjI//dwmcPY0XvqnRS5cVH1BbBiLFt/O9X1DEJIl0PCyGgifAi/CCJOR3pfFaD2S5G zbwplFTlTSpaIIUysHg/miosrbKk1XPZEj2neVMvv53C6bnT1TcB+BOiiPZJtzGnUMjS jYgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="QNv/w7aH"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z17si293330ejc.499.2020.11.04.20.48.23; Wed, 04 Nov 2020 20:48:46 -0800 (PST) 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=@gmail.com header.s=20161025 header.b="QNv/w7aH"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387436AbgKECT5 (ORCPT + 99 others); Wed, 4 Nov 2020 21:19:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387421AbgKECT5 (ORCPT ); Wed, 4 Nov 2020 21:19:57 -0500 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9959BC0613CF for ; Wed, 4 Nov 2020 18:19:55 -0800 (PST) Received: by mail-lj1-x244.google.com with SMTP id m16so590942ljo.6 for ; Wed, 04 Nov 2020 18:19:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7skSxIX4H4ERr2KWMBBNL6BPLI6dS/H7sqa5OXUDuu0=; b=QNv/w7aH0oP53J3Y59bUHS48Xks3iYgOQfXV54369dx1Z6kHPJDwCpizgx06CCZ4kn Tel6OfCmM9bunMFLvXtfH/QP7HzUoUIz+d02Fi3t+zfEgl5Ti6i8emrafuPWQ2TWowWV ihxcezBfT4TUDzZIcjP+IIfbbV15tJEP0gKwg6KL05QNOvgUCmAreZrxlGJAyGA9KtLV k3uc3fWqbOMMGbGCUi/eA8wTUZiPXWYJ+uUCFw4w8cna6uaf79YmbZ7iikDRCpBKUCXe KPPIsh7JPw+DludHrM6XU8uSwH2VdigxiALfsLR9CwBI/NI9ZKT2vI0LPbNgxV3dz8Cz ibNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7skSxIX4H4ERr2KWMBBNL6BPLI6dS/H7sqa5OXUDuu0=; b=ta/GwAlUcAIdCMHdfNP5T7Yl3pfkys65DiztGNVVHYQ7nY0Cy/NxHNI+OburEMcg4a Xqlkp8ZNmKB48tBt9MTgg40wcaUXyNxhD4rkCtmULdB2dVMJl6F8lo0xVo22x9HdLLic Nm1tQGT9BtlBWpIIEnG3vz0ZLfsRGJGHPtnFyDI0E6aNPAPfwu7zYwgncqEvOVFoGVgI RNwiK0lqGMbm3hkVAXgGMrbd+Y87JBn8FrMolYOxTtU1DjQ8N3GrdCR8Y0SaEekhD9xO 4Xrda7Zo2Wp1t9W7DJmk1yo9Z0A3fcnZdIkcl60MPdMKxkkgaTHBKF/eKo8FUE2pm8ut jJKw== X-Gm-Message-State: AOAM532CN46vH2PkbFxDVfpEC2t37IA5kRmBBloehmj8NtQPz4G6yKBT TrJYg+jb2DrM/Yy3G6lwtHhXPOdTo+6vEWhplgFCa2KD X-Received: by 2002:a2e:6c11:: with SMTP id h17mr40022ljc.432.1604542794148; Wed, 04 Nov 2020 18:19:54 -0800 (PST) MIME-Version: 1.0 References: <20201104081936.2128-1-zhenzhong.duan@gmail.com> <67fd98a2-23a9-b69a-4d60-a0698e243a85@linux.intel.com> In-Reply-To: <67fd98a2-23a9-b69a-4d60-a0698e243a85@linux.intel.com> From: Zhenzhong Duan Date: Thu, 5 Nov 2020 10:19:36 +0800 Message-ID: Subject: Re: [PATCH] iommu/vt-d: remove redundant variable no_platform_optin To: Lu Baolu Cc: linux-kernel , David Woodhouse , Joerg Roedel , iommu@lists.linux-foundation.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Baolu, On Thu, Nov 5, 2020 at 9:47 AM Lu Baolu wrote: > > Hi Zhenzhong, > > On 11/4/20 4:19 PM, Zhenzhong Duan wrote: > > no_platform_optin is redundant with dmar_disabled and it's only used in > > platform_optin_force_iommu(), remove it and use dmar_disabled instead. > > It's actually not. > > If CONFIG_INTEL_IOMMU_DEFAULT_ON is not set, we will get "dmar_disable = > 1" and "no_platform_optin = 0". In this case, we must force the iommu on > and set dmar_disable = 0. > > The real use case: if a kernel built with [CONFIG_INTEL_IOMMU_DEFAULT_ON > = n] running on a platform with thunderbolt ports, we must force IOMMU > on so that the system could be protected from possible malicious > peripherals. Thanks for your explanation, clear now and sorry for the noise. Regards Zhenzhong