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

Re: [Xen-devel] [PATCH] pci: clear host_maskall field on assign


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 8 Oct 2019 16:16:15 +0200
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=Pass smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Stanislav Spassov <stanspas@xxxxxxxxx>, Chao Gao <chao.gao@xxxxxxxxx>
  • Delivery-date: Tue, 08 Oct 2019 14:16:42 +0000
  • Ironport-sdr: 6If7/dXZeVjx2glCIBdgl47BvppGO4faVtVmh7v6gsmulcogf8KT8OfiuDpr+7Oaqb9QhAmlnr zhHiiwcPKPAketJ/g5sqK+mTKPoRBLTY+vEu7zDtzdL7uXOwRsD7kGGtyj2NgUUfnfMkZBvkkD uKb6bMyExA2jdWM/0f3ltWcPCQwUQm2s+l5HU6+1P8f1FqsjT8urL+WgYeRe3+qvpbitznZyui RmY7HC1s4EDAu3yMIlmhGwoVVb7UZhoCeuwsFwudrn4CyWY9ADkRE1/tzlce9YMuUDrg7XRDFN Uq4=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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
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®.