[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Re-enable MSI support



[Yunhong Jiang]
> This patch try to do some cleanup for these issues.
> 1) The basic idea is to remove the pci_dev's lock, instead, we try
>    to use the big pcidevs_lock to protect the whole pci_dev
>    stuff. It including both pci_dev adding/removing, and also the
>    assignment of the devices. We checked the code and seems there is
>    no critical code path for this. We try to use fine-grained lock
>    and seems the code will be very tricky.
> 2) Split the pci_enable_msi into two step, firstly it will just
>    construct the msi_desc through pci_enable_msi without holding the
>    irq_desc lock, and then it will setup msi through setup_msi_irq
>    with irq_desc holded.
> 3) Change the iommu->lock and hd->mapping_lock to be irq_save. 
> 4) Fix to some minor issues.

> Now the lock sequence is: pcidevs_lock -> domai's event_lock ->
> iommu's lock -> hvm_iommu's mapping_lock. The irq_desc's lock will
> always be the last lock be hold for peformance consideration.

So what exactly is it that pcidevs_lock is supposed to "protect" now?
Does it indicate that someone is holding a reference to a pci_dev?
Does it indicate that someone will modify some pci_dev?  Does it
indicate that someone is messing around with interrupts or MSI
descriptors?

Regarding pci_enable_msi: Can you not get into race conditions with
the splitup you're doing?  pci_enable_msi() does afterall poke around
in the MSI capability record.

        eSk



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.