[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230918141705.GE13795@ziepe.ca>
Date: Mon, 18 Sep 2023 11:17:05 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Shannon Nelson <shannon.nelson@....com>
Cc: alex.williamson@...hat.com, kevin.tian@...el.com,
reinette.chatre@...el.com, tglx@...utronix.de, kvm@...r.kernel.org,
brett.creeley@....com, linux-kernel@...r.kernel.org,
Leon Romanovsky <leonro@...dia.com>
Subject: Re: [PATCH vfio] vfio/pci: remove msi domain on msi disable
On Thu, Sep 14, 2023 at 12:14:06PM -0700, Shannon Nelson wrote:
> The new MSI dynamic allocation machinery is great for making the irq
> management more flexible. It includes caching information about the
> MSI domain which gets reused on each new open of a VFIO fd. However,
> this causes an issue when the underlying hardware has flexible MSI-x
> configurations, as a changed configuration doesn't get seen between
> new opens, and is only refreshed between PCI unbind/bind cycles.
>
> In our device we can change the per-VF MSI-x resource allocation
> without the need for rebooting or function reset. For example,
>
> 1. Initial power up and kernel boot:
> # lspci -s 2e:00.1 -vv | grep MSI-X
> Capabilities: [a0] MSI-X: Enable+ Count=8 Masked-
>
> 2. Device VF configuration change happens with no reset
Is this an out of tree driver problem?
The intree way to alter the MSI configuration is via
sriov_set_msix_vec_count, and there is only one in-tree driver that
uses it right now.
If something is going wrong here it should be fixed in the
sriov_set_msix_vec_count() machinery, possibly in the pci core to
synchronize the msi_domain view of the world.
Jason
Powered by blists - more mailing lists