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: Qing He <qing.he@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 0/6] MSI-INTx interrupt translation for HVM
From: Shohei Fujiwara <fujiwara-sxa@xxxxxxxxxxxxxxx>
Date: Fri, 16 Jan 2009 13:34:44 +0900
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 15 Jan 2009 20:35:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090115062514.GC25230@ub-qhe2>
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: <20090115113132.2D51.CB716985@xxxxxxxxxxxxxxx> <20090115062514.GC25230@ub-qhe2>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thank you for long discussion.

On Thu, 15 Jan 2009 14:25:14 +0800
Qing He <qing.he@xxxxxxxxx> wrote:

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

I think we can guarantee it, even if OS doesn't touch INTx disable bit.
When OS set 1 to MSI/MSI-X enable bit, qemu will disable MSI-INTx
translation.
When OS set 0 to MSI/MSI-X enable bit, qemu will re-enable MSI-INTx
translation.

> 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 agree with you that we need make MSI-enable-as-masking work on HVM
domain.

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

Currently I'm trying to enabling PCI pass-through with stub domain.
I'm happy if you can add it.

Thanks,
--
Shohei Fujiwara


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