On 02.12.2023 04:07, Marek Marczykowski-Górecki wrote:
> On Mon, Nov 27, 2023 at 06:00:57PM +0100, Jan Beulich wrote:
>> On 24.11.2023 02:47, Marek Marczykowski-Górecki wrote:
>>> +    if ( !msix->adj_access_idx[adj_type] )
>>> +    {
>>> +        gprintk(XENLOG_WARNING,
>>> +                "Page for adjacent(%d) MSI-X table access not initialized 
>>> for %pp (addr %#lx, gtable %#lx\n",
>>> +                adj_type, &entry->pdev->sbdf, addr, entry->gtable);
>>> +
>>> +        return ADJACENT_DONT_HANDLE;
>>> +    }
>>> +
>>> +    /* If PBA lives on the same page too, discard writes. */
>>> +    if ( write &&
>>> +         ((adj_type == ADJ_IDX_LAST &&
>>> +           msix->table.last == msix->pba.first) ||
>>> +          (adj_type == ADJ_IDX_FIRST &&
>>> +           msix->table.first == msix->pba.last)) )
>>> +    {
>>> +        gprintk(XENLOG_WARNING,
>>> +                "MSI-X table and PBA of %pp live on the same page, "
>>> +                "writing to other registers there is not implemented\n",
>>> +                &entry->pdev->sbdf);
>>
>> Here and above I think verbosity needs limiting to the first instance per
>> device per domain.
> 
> Is there some clever API for that already, or do I need to introduce
> extra variable in some of those structures (msixtbl_entry? pci_dev?) ?

Sadly there isn't, and to be honest I also can't really see how one would
go about generalizing / abstracting this.

Jan

Reply via email to