Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5081611rwl; Mon, 3 Apr 2023 14:09:38 -0700 (PDT) X-Google-Smtp-Source: AKy350b6rdOAw0Oyq6NsIH9txI1DfhvsQAaNwmtrpRYtJHflTOJ4I1JRXrW1SbCQUQvG+9efjN6K X-Received: by 2002:a17:906:c2cf:b0:91f:b13f:a028 with SMTP id ch15-20020a170906c2cf00b0091fb13fa028mr41818ejb.34.1680556178413; Mon, 03 Apr 2023 14:09:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680556178; cv=none; d=google.com; s=arc-20160816; b=l77dbnhH/nvTqxrC7azyC9tqtgGrAzH8T12Tin9EzwkEE69nprgOu1n/FRhJFKhkNY ZcPp05sYQQ6mtu6ZLpC2yJvuGm/JGvhSwTCCnm3rX9g2qhpT/f2bdDBpALIqugocic0p sh1cqx/Oxs6ZeZHOwk8MhUIaLqeh4pLUxcWjagEO54GB0wC449I33lQe+SLOC912AA6R 1yHqtlslDILFi1bOu0/wD/FB5DBCksuEpQ4KH8nRWuhRYKIfkc+JilOLMFdqTJj2P4CA kiYsQev07jCqPIztYAdHD1SmZq7Rw7Dv3i8E9pba3LzWQJ7snVReFWRsZH0Sc5GK6K0w Od/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=t120xOAraM/M8EGz+NnfGjdsVN+7R4LdOrKS9ClmfWg=; b=ekHBn8itOwOWLt8gCadgxoH1igY3GMLgGrJmjUvsOANADtIznaN9lmwupQrIbyTUIo QpjgSmHIde3llyhYnk0NZfHPSBailKD/R9MoQpMoeeTEljyjLNSbeznbJQ3xcFJlOm50 jbHOgo9vluZLdoJygeqS86SWBFH4ueM5aXAPEbFywe6fp/n64NRXda+ZpaHrJlLagDLL NCPAsypeX1vdsOjPqtNy9scFNuL95v6EURcj1hGZAjaQfjgvabBSq4wHQNN1I0iV3oGJ tRUb6DKBP0vrX9vSV5XqRwBW3kuN49lyTAJwWJO45TpX7q5TMT1gUmshW0q3QFp11/iJ glZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=m4+QY4N2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z1-20020a1709063a0100b00933407f013esi8074960eje.147.2023.04.03.14.09.14; Mon, 03 Apr 2023 14:09:38 -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=@intel.com header.s=Intel header.b=m4+QY4N2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232579AbjDCVAj (ORCPT + 99 others); Mon, 3 Apr 2023 17:00:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231655AbjDCVAh (ORCPT ); Mon, 3 Apr 2023 17:00:37 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B708272C; Mon, 3 Apr 2023 14:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680555637; x=1712091637; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=2IBeB1/NTZwixNIbp5DUT4plrbHOehsVTzweYkMJMxY=; b=m4+QY4N2maXKnJckpx59lyTDwvZtq3qDILt69qdvK6Xq04yZHhHUJgBe Bm/LKA8Zj2D723m8DH/21FcOqQsxxbZi9yWO1etNyA6EaGyToHjzH8kBf KSu5AJqKGv2IRoF6/Z3djFiHCn/bOYwRy82SvMmDe3SRCcp0THL3iTNGG GIY2TrbQvAf6u27Ux3F7l5HRDpc1YR2/UC6JgGrSwZH3yqh/g3jhLpQ3z RNgEj9C/IU7qOvrHJY3OQ5ILvb4qkPWFD7pm+1yEFTL9vFHsd2B0eCp2c TwXdfBrjPUvSXpTDxF6UxbLVLNDa1U7gDPafuOQrZdx2r0C4pQ9S54CZc g==; X-IronPort-AV: E=McAfee;i="6600,9927,10669"; a="428302116" X-IronPort-AV: E=Sophos;i="5.98,315,1673942400"; d="scan'208";a="428302116" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2023 14:00:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10669"; a="686119359" X-IronPort-AV: E=Sophos;i="5.98,315,1673942400"; d="scan'208";a="686119359" Received: from jbgonzal-mobl4.amr.corp.intel.com (HELO [10.209.186.66]) ([10.209.186.66]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2023 14:00:13 -0700 Message-ID: Date: Mon, 3 Apr 2023 14:00:12 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v4] PCI: vmd: Add the module param to adjust MSI mode Content-Language: en-US To: Xinghui Li Cc: Bjorn Helgaas , kbusch@kernel.org, jonathan.derrick@linux.dev, lpieralisi@kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Xinghui Li References: <20230329163107.GA3061927@bhelgaas> <0603c75d-82d3-01d5-ffe7-b648c1f02f0e@linux.intel.com> From: "Patel, Nirmal" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=unavailable 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 4/2/2023 7:34 AM, Xinghui Li wrote: > On Thu, Mar 30, 2023 at 2:49 PM Patel, Nirmal > wrote: >> How about adding a boolean flag by comparing user input for module >> parameter msi_remap? and add the flag at >> >> - if (!(features & VMD_FEAT_CAN_BYPASS_MSI_REMAP) || msi_flag >> || offset[0] || offset[1]) >> >> Correct if I am wrong, but in this way we can cover all the cases. >> If user adds msi_remap=on, msi_flag=true and enables remapping. >> If user adds msi_remap=off, msi_flag=false and disables remapping. >> If user doesn't add anything, msi_flag=false and decision will be >> made same as current implementation. This will cover guest OS case >> as well. >> > Sorry, I don't quite get your point. How is msi_flag assigned? > Do you mean when msi_remap=no, the msi_flag is assigned as true? > And msi_remap=off, the msi_flag is assigned as false? > > Thanks~ if msi_remap=on, then msi_flag=true; if msi_remap=off, then msi_flag=false.