On Tue, Oct 08, 2019 at 03:32:25PM +0200, Jan Beulich wrote:
> On 08.10.2019 15:14, Roger Pau Monné  wrote:
> > On Tue, Oct 08, 2019 at 01:28:49PM +0200, Jan Beulich wrote:
> >> On 08.10.2019 13:09, Roger Pau Monné  wrote:
> >>> Given that as you correctly point out maskall is unset after device
> >>> reset, I feel that option 4 is the best one since it matches the state
> >>> of the hardware after reset.
> >>
> >> Right, that's the variant coming closest to what hardware state
> >> ought to be at that point. We'd need to double check that the
> >> per-entry mask bits are all set at that point.
> > 
> > I'm not saying such check is not worth doing, but why do it in this
> > case but not when also clearing the maskall (in msix_capability_init)
> > when called from prepare_msix?
> 
> By "double check" I meant inspect the source, not to add checking logic.

Oh, I implied you wanted to iterate over all entries and check that
the mask bit is set for each.

It's my understanding that Xen relies on dom0 having done a device
reset before it being assigned, which masks all entries. I've checked
the pciback code and the reset is performed when the device is
assigned to dom0 (ie: guest shutdown or hot-unplug), and hence when
the device is assigned to a different domain the state of it should be
the after reset one.

I can add a comment in assign_device that Xen expects the device state
to be the after reset one, and hence host_maskall = guest_maskall =
false and all entries should have the mask bit set.

Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to