xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: xen-devel@lists.xenproject.org,
	Stanislav Spassov <stanspas@amazon.de>,
	Chao Gao <chao.gao@intel.com>
Subject: Re: [Xen-devel] [PATCH] pci: clear host_maskall field on assign
Date: Tue, 8 Oct 2019 16:21:56 +0200	[thread overview]
Message-ID: <1319dfd6-052c-39c4-aa29-d79fa9600829@suse.com> (raw)
In-Reply-To: <20191008141615.GF66437@Air-de-Roger>

On 08.10.2019 16:16, Roger Pau Monné  wrote:
> 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.

Yes please.

Jan

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

  reply	other threads:[~2019-10-08 14:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 10:49 [Xen-devel] [PATCH] pci: clear host_maskall field on assign Roger Pau Monne
2019-10-02 13:33 ` Jan Beulich
2019-10-08  9:23   ` Roger Pau Monné
2019-10-08  9:42     ` Jan Beulich
2019-10-08 11:09       ` Roger Pau Monné
2019-10-08 11:28         ` Jan Beulich
2019-10-08 13:14           ` Roger Pau Monné
2019-10-08 13:32             ` Jan Beulich
2019-10-08 14:16               ` Roger Pau Monné
2019-10-08 14:21                 ` Jan Beulich [this message]
2019-10-04 23:58 ` Chao Gao
2019-10-07  7:38   ` Jan Beulich
2019-10-08  6:18     ` Chao Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1319dfd6-052c-39c4-aa29-d79fa9600829@suse.com \
    --to=jbeulich@suse.com \
    --cc=chao.gao@intel.com \
    --cc=roger.pau@citrix.com \
    --cc=stanspas@amazon.de \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).