Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3448657rwl; Sun, 2 Apr 2023 07:48:10 -0700 (PDT) X-Google-Smtp-Source: AKy350bCAe2FO0tL0TIr2JmKntKTY2zBFSJHc757OziDwwtUaxWjwJJg1b6U66XDEQ4WQo1uVVfs X-Received: by 2002:aa7:c98b:0:b0:500:4c0e:cb8d with SMTP id c11-20020aa7c98b000000b005004c0ecb8dmr32142648edt.5.1680446890453; Sun, 02 Apr 2023 07:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680446890; cv=none; d=google.com; s=arc-20160816; b=oxpGPhXyd3W5V3ELClfPqIimK1sZiavA2+CEFKnLmTVxPbdefWplgCdjDMiMy5AaKj UDH1+VvcKIcX4h1vO9IWcPwz2RM4C/how/axm0yR6CApBxO4+iHDvraOAtQI8WDtPKEE SRQvf1crZz//9+vYC2ofvV4d+NtbceDPSPaTJ/85+BDbZ4LVSBzcZnfVHXlrTnVlDRMd vnnyBIa+XVvKIdX81KDnxxqi1z0BJTTLLA9YZNaJBjCw1CbjRb/4nb/otq4zsV7LDHga M67aHi8G9qEicSiDlMvY5LlkZDZLj5+rPVvvv+iEINb3bvhn7Bby/QiPI49lo9KfEf9K xnvg== 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=OoKAUsS1+OPv2yaj0HT7KaFR2MH6Yyn+hzIBLI7xgeI=; b=KRAUruWjfu+CgAHxTezBKFnhABtfC4mey63tvlMIsErisNZIyqX5mEemK9Mb1ZaPDh DWydJoc8YaDJP0tdXEWQadEPV3QxLsKqBazg3sTfvMyLVROwY4E1+Pijc3qqFHhmJAoS EgNULrI6slpD7Konod1cZCs00r/+/N4GBoVSmaBYeNfJywfGzDH+p5dKVSrnlFY404jM eiRl4dZub+v5BOhhjueIxaVZDQEUjeM7QpER+/qtcjZYNR3TlYyuRVp1c8VT3cbCo9v6 fM+b+n2qzb9J3CUaIq64gIw29anfKvLgLVCa+zRpGCDltp752R4Z85rDEZZr1t+s/WOQ XFaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ILEvwS91; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r10-20020aa7c14a000000b005003e301b87si6639415edp.239.2023.04.02.07.47.45; Sun, 02 Apr 2023 07:48:10 -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=@gmail.com header.s=20210112 header.b=ILEvwS91; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231135AbjDBOeb (ORCPT + 99 others); Sun, 2 Apr 2023 10:34:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229997AbjDBOea (ORCPT ); Sun, 2 Apr 2023 10:34:30 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56337DA; Sun, 2 Apr 2023 07:34:12 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id z10so16010646pgr.8; Sun, 02 Apr 2023 07:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680446052; 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=OoKAUsS1+OPv2yaj0HT7KaFR2MH6Yyn+hzIBLI7xgeI=; b=ILEvwS91rgkWPiWhD7zih4rFjl7XNbDo2TWQbTQmLiSCIRjv76s9QPGoQlsN043vzN yBk6Y2LTK6XhR/DZbwerQlmxtwoJMHabnz0iK2D/M5mc+CrRIQu5bw4kif3w/29NBgFB pQo4K/fce8HBMfRPVNUOJ8p0MOYg+DuF2eam+iD9PbmBYo/qe0xqHdzKh8SbvXKXSIf3 g3YRkSHCV9F65Cyb3psaAYUq98SzfwGMlSbYu8O2YfHFBKJXzRCGbefzIfMm9pgNBnip vE6MX1JqDKSopsTjGPu3sWDthzudvdLVTgr1w3M517g7uoeEM8mu1AUAhIUnOVdGwmh6 2c4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680446052; 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=OoKAUsS1+OPv2yaj0HT7KaFR2MH6Yyn+hzIBLI7xgeI=; b=jzW5sIvm2vNB3A9Rd/vaEp6coN+wIhTc93GamwME3zNz/lggV3nzP8T8ZMLdwxkeAe 4clsfraoEWG2smsnhvUfxLx8exL5mm+GrvrX6xOqyK1QfudTQpSq0pNekIws59A9zT1/ cs4d8MDn5lkDrPheJ/p7iiT5winbvmSUE7eFrpjr7y7b6S47ABuGrEM7kIrm7JWD98kK 4FDeRKjH4WBjl8QJZlLgcwJt5Q9Mlphg1WRv4UYeK+tWwL1CiH4+Pc/FyutbYiPy0bgr DLN0zoATGcyTemwrz7rNqZ8oXe5jgKKFnjh53kku9/YjmHEJyPXY7Of2PYWiQVJlCyrG 33Xw== X-Gm-Message-State: AAQBX9cJ8bvIAWKYjHnQJVbDfIsy4U1oiCvbnzegZRqCJgB3ob5Gdq8y 7qPkiqsFjHYJ2jLR167oY5zO/i28UtCb9Qsx1zw= X-Received: by 2002:a63:40c1:0:b0:4fd:5105:eb93 with SMTP id n184-20020a6340c1000000b004fd5105eb93mr8830444pga.3.1680446051785; Sun, 02 Apr 2023 07:34:11 -0700 (PDT) MIME-Version: 1.0 References: <20230329163107.GA3061927@bhelgaas> <0603c75d-82d3-01d5-ffe7-b648c1f02f0e@linux.intel.com> In-Reply-To: <0603c75d-82d3-01d5-ffe7-b648c1f02f0e@linux.intel.com> From: Xinghui Li Date: Sun, 2 Apr 2023 22:34:00 +0800 Message-ID: Subject: Re: [PATCH v4] PCI: vmd: Add the module param to adjust MSI mode To: "Patel, Nirmal" 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Thu, Mar 30, 2023 at 2:49=E2=80=AFPM 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=3Don, msi_flag=3Dtrue and enables remapping. > If user adds msi_remap=3Doff, msi_flag=3Dfalse and disables remapping. > If user doesn't add anything, msi_flag=3Dfalse 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=3Dno, the msi_flag is assigned as true? And msi_remap=3Doff, the msi_flag is assigned as false? Thanks~