WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 0/6] MSI-INTx interrupt translation for HVM

To: Shohei Fujiwara <fujiwara-sxa@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 0/6] MSI-INTx interrupt translation for HVM
From: Qing He <qing.he@xxxxxxxxx>
Date: Thu, 15 Jan 2009 14:25:14 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 14 Jan 2009 22:25:17 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090115113132.2D51.CB716985@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20090114172444.8661.CB716985@xxxxxxxxxxxxxxx> <20090114091752.GB25230@ub-qhe2> <20090115113132.2D51.CB716985@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.17+20080114 (2008-01-14)
On Thu, 2009-01-15 at 10:35 +0800, Shohei Fujiwara wrote:
> I think MSI-INTx translation can be enhanced.
> 
> In case of using MSI enable bit as mask, guest OS need to set interrupt
> disable bit to prevent device from asserting INTx. Actually, linux
> 2.6.25 set interrupt disable bit in
> drivers/pci/msi.c:msi_capability_init.  If interrupt disable bit is 1,
> we can assume guest OS might use MSI enable bit as mask. If interrupt
> disable bit is 0 and MSI enable bit is 0, we can assume guest OS uses
> INTx.

This should be better, but cannot garauntee it. Since INTx disable bit
was added in PCI 2.3. Early guests may exist not using it. Also, some
devices have problems, that setting INTx disable bit also completely
disables MSI from signalling, so OS may not touch INTx disable bit of
these devices.

Theoretically, MSI-enable-as-masking is not correct and should not be
used in the first place. If that were true it would be much easier for
us. However, the existing (and widely used) guest complicates this matter...

> 
> I think we can archive both of good performance and not-using INTx, if
> we control MSI-INTx translation as follows.
> 
> MSI/MSI-X  | Interrupt   | MSI-INTx    | Note
> enable bit | disable bit | translation |
> -----------+-------------+-------------+------------------------------
> 0          | 0           | enable      | Re-enabling MSI-INTx 
>            |             |             | translation is needed.
> -----------+-------------+-------------+------------------------------
> 0          | 1           | disable     | Guest OS might use MSI enable
>            |             |             | bit as mask.
> -----------+-------------+-------------+------------------------------
> 1          | 0           | disable     | Guest OS use MSI/MSI-X.
> -----------+-------------+-------------+------------------------------
> 1          | 1           | disable     | Guest OS use MSI/MSI-X.
> 
> It is great if we can guarantee INTx interrupt isn't used.
> We don't need to consider sharing machine gsi. We don't need to consider
> hot-pluging I/O APIC. In long term, It will be possible even to to remove
> I/O APIC from real machine.

I am not against it, it does look more symmetric, though in the cost of
a little overhead (4 hypercalls for a mask operation) in the worst
(but rare) case. I'll ack the patch if you add it now, or you can wait
for me to add it at some later time.

Thanks,
Qing

> 
> What do you think?
> 
> Thanks
> --
> Shohei Fujiwara
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel