[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v4 3/3] xen/pt: initialize 'warned' field of arch_msix properly
Also clean up current code by moving initialization of arch specific fields out of common code. Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx> --- Changes in v4: - newly added --- xen/drivers/passthrough/pci.c | 2 +- xen/include/asm-x86/msi.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index ccae0ec..dad8be6 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -367,7 +367,7 @@ static struct pci_dev *alloc_pdev(struct pci_seg *pseg, u8 bus, u8 devfn) xfree(pdev); return NULL; } - spin_lock_init(&msix->table_lock); + init_arch_msix(msix); pdev->msix = msix; } diff --git a/xen/include/asm-x86/msi.h b/xen/include/asm-x86/msi.h index 10387dc..c2293ab 100644 --- a/xen/include/asm-x86/msi.h +++ b/xen/include/asm-x86/msi.h @@ -252,5 +252,10 @@ void guest_mask_msi_irq(struct irq_desc *, bool mask); void ack_nonmaskable_msi_irq(struct irq_desc *); void end_nonmaskable_msi_irq(struct irq_desc *, u8 vector); void set_msi_affinity(struct irq_desc *, const cpumask_t *); +static inline void init_arch_msix(struct arch_msix *msix) +{ + spin_lock_init(&msix->table_lock); + msix->warned = DOMID_INVALID; +} #endif /* __ASM_MSI_H */ -- 1.8.3.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |