On 23.09.2019 17:57, Paul Durrant wrote: >> -----Original Message----- >> From: Xen-devel <xen-devel-boun...@lists.xenproject.org> On Behalf Of Jan >> Beulich >> Sent: 19 September 2019 14:23 >> To: xen-devel@lists.xenproject.org >> Cc: Andrew Cooper <andrew.coop...@citrix.com>; Wei Liu <w...@xen.org>; >> Suravee Suthikulpanit >> <suravee.suthikulpa...@amd.com>; Roger Pau Monne <roger....@citrix.com> >> Subject: [Xen-devel] [PATCH v6 3/8] x86/PCI: read maximum MSI vector count >> early >> >> Rather than doing this every time we set up interrupts for a device >> anew (and then in several places) fill this invariant field right after >> allocating struct pci_dev. >> >> Signed-off-by: Jan Beulich <jbeul...@suse.com> > > Reviewed-by: Paul Durrant <paul.durr...@citrix.com>
Thanks. >> --- a/xen/drivers/passthrough/pci.c >> +++ b/xen/drivers/passthrough/pci.c >> @@ -340,6 +340,16 @@ static struct pci_dev *alloc_pdev(struct >> pdev->domain = NULL; >> INIT_LIST_HEAD(&pdev->msi_list); >> >> + > > Stray blank line here by the looks of it. Oh, indeed - dropped. Jan >> + pos = pci_find_cap_offset(pseg->nr, bus, PCI_SLOT(devfn), >> PCI_FUNC(devfn), >> + PCI_CAP_ID_MSI); >> + if ( pos ) >> + { >> + uint16_t ctrl = pci_conf_read16(pdev->sbdf, msi_control_reg(pos)); >> + >> + pdev->msi_maxvec = multi_msi_capable(ctrl); >> + } >> + >> pos = pci_find_cap_offset(pseg->nr, bus, PCI_SLOT(devfn), >> PCI_FUNC(devfn), >> PCI_CAP_ID_MSIX); >> if ( pos ) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel