Re: [PATCH v4] PCI: vmd: Add the module param to adjust MSI mode

Xinghui Li
2023-04-02T14:34:34Z

On Thu, Mar 30, 2023 at 2:49 PM Patel, Nirmal
<nirmal.patel@linux.intel.com> 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~