|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 5/6] x86/pass-through: use simpler locking primitives in pt_irq_{create,destroy}_bind()
Both functions already assume IRQs to be enabled upon entry, by e.g. their
acquiring of the domain's event channel lock. Hence like e.g.
hvm_migrate_pirq() (also called from here) does, saving/restoring of
EFLAGS.IF isn't necessary (because of the functions called, we can't
really avoid the saving there).
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/drivers/passthrough/x86/hvm.c
+++ b/xen/drivers/passthrough/x86/hvm.c
@@ -400,8 +400,7 @@ int pt_irq_create_bind(
if ( pt_irq_bind->u.msi.gflags & XEN_DOMCTL_VMSI_X86_UNMASKED )
{
- unsigned long flags;
- struct irq_desc *desc = pirq_spin_lock_irq_desc(info, &flags);
+ struct irq_desc *desc = pirq_spin_lock_irq_desc(info, NULL);
if ( !desc )
{
@@ -411,7 +410,7 @@ int pt_irq_create_bind(
}
guest_mask_msi_irq(desc, false);
- spin_unlock_irqrestore(&desc->lock, flags);
+ spin_unlock_irq(&desc->lock);
}
write_unlock(&d->event_lock);
@@ -606,9 +605,7 @@ int pt_irq_destroy_bind(
break;
case PT_IRQ_TYPE_MSI:
{
- unsigned long flags;
- struct irq_desc *desc = domain_spin_lock_irq_desc(d, machine_gsi,
- &flags);
+ struct irq_desc *desc = domain_spin_lock_irq_desc(d, machine_gsi,
NULL);
if ( !desc )
return -EINVAL;
@@ -617,7 +614,7 @@ int pt_irq_destroy_bind(
* pt_irq_create_bind is consistent across bind/unbinds.
*/
guest_mask_msi_irq(desc, true);
- spin_unlock_irqrestore(&desc->lock, flags);
+ spin_unlock_irq(&desc->lock);
break;
}
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |