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

Linux kernel's msi_domain_deactivate() operation

  • To: jiang.liu@xxxxxxxxxxxxxxx, Thomas Gleixner <tglx@xxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 20 Sep 2021 16:11:59 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=VuX2g+UX7ZSv6cPH9po0gV2was2+PnkUBViG0eX7vuw=; b=HDOoRo73McqsIszaWbFoaJw5fWG1lxuChQlQjVi1CK11nngsZVZWscA+Mul3mbreq9a/a7bmGs1i7v1mZVQw/6awXVRGqqE+2bYrb4aiptjnsKytVikRbeo6+NmFM323t51dhBxLYzv6Vx0TfnJCnaMAT2WEc1Xv2KMkKFxKVJVDOmrUKZPrDi4yY5jawRVbtvT4/dilr42gNK5nJI5Tq7bUtuLP/KqTYA0OsAco6Cvht46jGcPHF+YsT7ZO2EkugKpHAChtddOPDZttHT7WlkpDDgGkRijHsrnaoxmLLvjP/9+HXkeRAf4dQSJSkMEqi9YHX5nkGkHzCHokl2Og6Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fWc1E5uVqWHepMl8WJYvacqXIuallh0fccQgk8oe5yxr3Hf3+Ahwe3HLEa3iBNaPwRLYhpKsnMthIlQ7gCoRXGgpSSPuojCIDo66ILslpMflT7Kc7pegKnnJl1GZp2mrG72CfysHnREf2veCd8a5uofYVa4O6NEwLpWmcbd75MqQVzkUcXFDtRcMn5kZ7K8vvzHwA1oW/L74EB7sYE1T8RhtFg8A1s2zZwCEvgibgnkDIhaTejkEetNyD69HnRrfIS7oNdsn/kNTZqH3h7H4GTiENgNcmrFNnKNqfShTLuXdTkXHXJVl+RcmsnlqQzAssKyf8PRG3v5j89gcKJegNQ==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 20 Sep 2021 14:12:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


I notice that from its introduction in 3.19 this function simply clears
message address and data. I wonder in how far this is "deactivation":
Aiui the device might still signal interrupts this way, by writing
32 bits of zeroes to address zero. (That's not going to result in an
interrupt, of course.) Shouldn't deactivation rather mean masking (if
the entry is maskable; looks like this is happening in an earlier step
when possible) or disabling of MSI (which unfortunately would then also
affect other interrupts, if multiple are in use) or some software means
replacing masking?

Background: For PVH Dom0 under Xen we check (in Xen) whether address
fields written actually fall in the designated 0xFEEnnnnn range (as
long as MSI / MSI-X is enabled at the time of writing of these fields),
logging outliers. As it turns out the message appears quite a few times
per session, primarily - but not only - during shutdown. We log these
instances not because they're wrong (as said above, this is in principle
a valid mode of operation), but because proper handling would require
further code in Xen which we were hoping we would never have to write.
(Thinking about this again, it shouldn't be all that much code.)

In a small subset of the cases the operation actually occurs with the
respective entry masked (in all other cases there's no maskbit support);
we may want to consider suppressing the log message in such cases, yet
then we may need to watch for this case the next time the mask bit gets

Of course in the kernel you may have reassurance that the device driver
has actually disabled the interrupt source at the device before this
deactivation. We don't have such secondary knowledge in the hypervisor,
i.e. we can't use that to suppress the log message.

Any insight would be much appreciated, including the possible pointing
out of us not having understood the underlying idea.

Thanks, Jan



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