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

Re: [Xen-devel] [PATCH XEN v2] x86/pt: add a MSI unmask flag to XEN_DOMCTL_bind_pt_irq



>>> On 24.08.17 at 14:19, <roger.pau@xxxxxxxxxx> wrote:
> @@ -438,6 +439,20 @@ int pt_irq_create_bind(
>              pi_update_irte(vcpu ? &vcpu->arch.hvm_vmx.pi_desc : NULL,
>                             info, pirq_dpci->gmsi.gvec);
>  
> +        if ( pt_irq_bind->u.msi.gflags & VMSI_UNMASKED )
> +        {
> +            struct irq_desc *desc = pirq_spin_lock_irq_desc(info, NULL);
> +
> +            if ( !desc )
> +            {
> +                pt_irq_destroy_bind(d, pt_irq_bind);
> +                return -EINVAL;
> +            }
> +
> +            guest_mask_msi_irq(desc, false);
> +            spin_unlock_irq(&desc->lock);
> +        }

In v1 you've used spin_unlock_irqrestore() here - any reason
you went to the less safe variant? I do understand it is correct,
but I'd still prefer spin_{,un}lock_irq() to be avoided as much as
possible.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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