On Thu, Nov 12, 2020 at 06:27:04PM +0100, Manuel Bouyer wrote:
> On Thu, Nov 12, 2020 at 05:32:40PM +0100, Roger Pau Monné wrote:
> > On Thu, Nov 12, 2020 at 04:57:15PM +0100, Manuel Bouyer wrote:
> > Can you give a try to the following debug patch and paste what you
> > get?
> > 
> > Thanks, Roger.
> > ---8<---
> > diff --git a/xen/drivers/vpci/msix.c b/xen/drivers/vpci/msix.c
> > index 64dd0a929c..7ff76b7f59 100644
> > --- a/xen/drivers/vpci/msix.c
> > +++ b/xen/drivers/vpci/msix.c
> > @@ -371,7 +371,12 @@ static int msix_write(struct vcpu *v, unsigned long 
> > addr, unsigned int len,
> >              entry->updated = false;
> >          }
> >          else
> > +        {
> > +            printk("%pp offset %u len %u new_masked %d enabled %d masked 
> > %d updated %d\n",
> > +                   &pdev->sbdf, offset, len, new_masked, msix->enabled, 
> > msix->masked,
> > +                   entry->updated);
> >              vpci_msix_arch_mask_entry(entry, pdev, entry->masked);
> > +        }
> >  
> >          break;
> >      }
> 
> I get
> (XEN) ffff83083feaf500p offset 12 len 4 new_masked 0 enabled 0 masked 0 
> updated 1
> (XEN) Assertion 'entry->arch.pirq != INVALID_PIRQ' failed at vmsi.c:843
> 
> You can find the full serial console log at
> http://www-soc.lip6.fr/~bouyer/xen-log.txt

The following might be able to get you going, but I think I need to
refine the logic a bit there, will have to give it some thought.

Thanks, Roger.
---8<---
diff --git a/xen/drivers/vpci/msix.c b/xen/drivers/vpci/msix.c
index 64dd0a929c..3eb6102a61 100644
--- a/xen/drivers/vpci/msix.c
+++ b/xen/drivers/vpci/msix.c
@@ -370,7 +370,7 @@ static int msix_write(struct vcpu *v, unsigned long addr, 
unsigned int len,
 
             entry->updated = false;
         }
-        else
+        else if ( msix->enabled )
             vpci_msix_arch_mask_entry(entry, pdev, entry->masked);
 
         break;

Reply via email to