|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 2/6] x86/pass-through: no locking around pt_irq_{create,destroy}_bind()
The questionable use of pcidevs_lock() there was discussed more than once.
It really is pointless: The functions synchronize primarily via the per-
domain event lock. They also may already be called with the global PCI
devices lock not held: See hvm/vmsi.c:vpci_msi_update(),
hvm/vmsi.c:vpci_msi_arch_update(), and hvm/vmsi.c:vpci_msi_disable().
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -636,10 +636,7 @@ long arch_do_domctl(
ret = -EPERM;
else if ( is_iommu_enabled(d) )
{
- pcidevs_lock();
ret = pt_irq_create_bind(d, bind);
- pcidevs_unlock();
-
if ( ret < 0 )
printk(XENLOG_G_ERR "pt_irq_create_bind failed (%ld) for
%pd\n",
ret, d);
@@ -670,10 +667,7 @@ long arch_do_domctl(
ret = -EPERM;
else if ( is_iommu_enabled(d) )
{
- pcidevs_lock();
ret = pt_irq_destroy_bind(d, bind);
- pcidevs_unlock();
-
if ( ret < 0 )
printk(XENLOG_G_ERR "pt_irq_destroy_bind failed (%ld) for
%pd\n",
ret, d);
--- a/xen/arch/x86/hvm/vioapic.c
+++ b/xen/arch/x86/hvm/vioapic.c
@@ -197,7 +197,6 @@ static int vioapic_hwdom_map_gsi(unsigne
return ret;
}
- pcidevs_lock();
ret = pt_irq_create_bind(currd, &pt_irq_bind);
if ( ret )
{
@@ -207,7 +206,6 @@ static int vioapic_hwdom_map_gsi(unsigne
unmap_domain_pirq(currd, pirq);
write_unlock(&currd->event_lock);
}
- pcidevs_unlock();
return ret;
}
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |