All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qing He <qing.he@intel.com>
To: Shohei Fujiwara <fujiwara-sxa@necst.nec.co.jp>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 0/6] MSI-INTx interrupt translation for HVM
Date: Wed, 14 Jan 2009 15:38:46 +0800	[thread overview]
Message-ID: <20090114073846.GA25230@ub-qhe2> (raw)
In-Reply-To: <20090114153841.865B.CB716985@necst.nec.co.jp>

On Wed, 2009-01-14 at 14:39 +0800, Shohei Fujiwara wrote:
> I think adding blacklist now is better, because it is easy to specify
> an unsuitable device when it is found. But I don't know what other
> developers think about this.

I'm OK either way

> 
> 
> BTW, I found a issue when I read your code.
> 
> MSI-INTx translation is enabled when guest domain is started.
> When guest OS enables MSI/MSI-X, MSI-INTx translation is disabled.
> But when guest OS disables MSI/MSI-X, MSI-INTx translation isn't re-enabled.
> This means normal INTx interrupt is used.
> 
> I think the results should be the same at all times,
> so it is good to re-enable MSI-INTx translation.

There is a complication here. Some guests, notably certain versions of
Linux (2.6.25 for instance) uses MSI enable bit as mask, like:

>>  static void msi_set_mask_bit(unsigned int irq, int flag)
>>  {
>>  	...
>>  	switch (entry->msi_attrib.type) {
>>  	case PCI_CAP_ID_MSI:
>>  		if (entry->msi_attrib.maskbit) {
>>  			...
>>  		} else {
>>  			msi_set_enable(entry->dev, !flag);
>>  		}
>>  		break;
>>  	...

(It is said not work for some devices since pending msi may be lost in
this way, so it got reverted in later versions)

If the guest extensively uses this technique, re-enabling MSI-INTx during
mask would be a pain, since it needs several hypercalls and thus hurts
performance.


Furthermore, why a guest driver would want to disable MSI if it can benefit
from it (Maybe because MSI doesn't work:-)? The presumption behind not
re-enabling the translation is that it's seldom that guest would want to
disable-after-enable the MSI. And it's more efficient for
guests like linux-2.6.25.

> 
> Thanks,
> --
> Shohei Fujiwara
> 

  reply	other threads:[~2009-01-14  7:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-08  9:06 [PATCH 0/6] MSI-INTx interrupt translation for HVM Qing He
2009-01-08  9:06 ` [PATCH 1/6] passthrough: MSI-INTx " Qing He
2009-01-08  9:06 ` [PATCH 2/6] ioemu:passthrough: MSI-INTx interrupt translation support Qing He
2009-01-08  9:06 ` [PATCH 3/6] pci: add pci option support for XML-RPC server Qing He
2009-01-08  9:06 ` [PATCH 4/6] pci: add pci option support for XenAPI server Qing He
2009-01-08  9:06 ` [PATCH 5/6] pci: add config options for MSI-INTx translation in HVM Qing He
2009-01-08  9:06 ` [PATCH 6/6] passthough: MSI-INTx translation documentation Qing He
2009-01-08 10:44 ` [PATCH 0/6] MSI-INTx interrupt translation for HVM Shohei Fujiwara
2009-01-08 14:52   ` Qing He
2009-01-09  4:26     ` Shohei Fujiwara
2009-01-09  6:57       ` Qing He
2009-01-13  9:05         ` Shohei Fujiwara
2009-01-13  9:28           ` Qing He
2009-01-14  6:39             ` Shohei Fujiwara
2009-01-14  7:38               ` Qing He [this message]
2009-01-14  8:26                 ` Shohei Fujiwara
2009-01-14  9:17                   ` Qing He
2009-01-15  2:35                     ` Shohei Fujiwara
2009-01-15  6:25                       ` Qing He
2009-01-16  4:34                         ` Shohei Fujiwara
2009-02-27  2:41     ` Shohei Fujiwara
2009-03-01 14:55       ` Keir Fraser
2009-03-02  7:19         ` Shohei Fujiwara
2009-03-02  8:47           ` Keir Fraser
2009-03-02  9:24             ` Qing He
2009-03-02  9:40               ` Keir Fraser
2009-03-02 10:27                 ` Shohei Fujiwara

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=20090114073846.GA25230@ub-qhe2 \
    --to=qing.he@intel.com \
    --cc=fujiwara-sxa@necst.nec.co.jp \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.