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

From: Xinghui Li
Date: Sun Apr 02 2023 - 10:34:34 EST


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