[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 08/10] x86/PCI: read MSI-X table entry count early
On 06.08.2019 17:16, Roger Pau Monné wrote: On Tue, Aug 06, 2019 at 04:47:28PM +0200, Jan Beulich wrote:On 06.08.2019 16:25, Roger Pau Monné wrote:On Tue, Aug 06, 2019 at 03:10:40PM +0200, Jan Beulich wrote:@@ -350,6 +353,10 @@ static struct pci_dev *ºalloc_pdev(struct return NULL; } spin_lock_init(&msix->table_lock); + + ctrl = pci_conf_read16(pdev->sbdf, msix_control_reg(pos)); + msix->nr_entries = msix_table_size(ctrl);Since you store the number of entries here, why not also store the position of the MSI-X capability since it's also immutable? That would prevent having to fetch it again in msix_capability_init.I do consider this as something worthwhile to do in the future, but not here: The field to store this doesn't exist in struct arch_msix (yet), and hence would likely want moving from struct msi_attrib. This is beyond the scope of this patch.Oh I see. So the position it's actually stored in msi_attrib, and is used by both MSI and MSI-X, in which case what I'm proposing would be worse, since the field would only be used by MSI-X. Right, if we wanted to store it, we'd want to cover both MSI and MSI-X (and hence it would need to be a field outside of struct arch_msix). Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Thanks. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |