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

Re: [Xen-devel] [PATCH 2/2] vpci/msi: fix update of bound MSI interrupts



>>> On 08.05.18 at 11:25, <roger.pau@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/hvm/vmsi.c
> +++ b/xen/arch/x86/hvm/vmsi.c
> @@ -699,6 +699,29 @@ static int vpci_msi_update(const struct pci_dev *pdev, 
> uint32_t data,
>      return 0;
>  }
>  
> +int vpci_msi_arch_update(struct vpci_msi *msi, const struct pci_dev *pdev)
> +{
> +    int rc;
> +
> +    ASSERT(msi->arch.pirq != INVALID_PIRQ);
> +
> +    pcidevs_lock();
> +    rc = vpci_msi_update(pdev, msi->data, msi->address, msi->vectors,
> +                         msi->arch.pirq, msi->mask);
> +    if ( rc )
> +    {
> +        spin_lock(&pdev->domain->event_lock);
> +        unmap_domain_pirq(pdev->domain, msi->arch.pirq);

This looks quite undesirable - a failed update should leave the interrupt in its
prior state rather than unbinding it. Is that overly difficult to achieve? At 
the
very least for single-vector-MSI it looks to me as if nothing needed doing here
at all to have just this net effect. If so, that special case is probably
worthwhile to have, together with a comment on why the same isn't
feasible / desirable for the multi vector case.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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