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] MSI causing softpanics in guest

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxxxx>, Anish Bhatt <anish@xxxxxxxxxx>
Subject: RE: [Xen-devel] MSI causing softpanics in guest
From: "Shan, Haitao" <haitao.shan@xxxxxxxxx>
Date: Tue, 23 Sep 2008 16:26:18 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 23 Sep 2008 01:26:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C4FE640D.1D795%keir.fraser@xxxxxxxxxxxxx>
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: <F6473715D25C9E46A5515027E5482F100887BDAFDD@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C4FE640D.1D795%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AckdTTttN+B04fljRNKKzhKmLGeNyAAAdvAwAAFXZFAAAECCwA==
Thread-topic: [Xen-devel] MSI causing softpanics in guest
Yes. I think so.
But here is another problem, current code in dom0 returns irq number (irq 
number has meaning only in its domain, am I right?) not pirq number to PV domU 
guest. I am not sure whether this number can be used in evtchn_map_pirq in PV 
domU. Seems some modification is needed, I believe.

Shan Haitao

-----Original Message-----
From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx]
Sent: 2008年9月23日 16:15
To: Shan, Haitao; Jan Beulich; Anish Bhatt
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] MSI causing softpanics in guest

On 23/9/08 08:50, "Shan, Haitao" <haitao.shan@xxxxxxxxx> wrote:

> Just some thoughts on Anish's problem. It seems he reveals a bug in current
> code, I think.
>
> Currently, evnchn_map_pirq is hooked on msi_map_vector
> (pci_enable_msi->msi_capability_init->msi_map_vector). Here the pirq type is
> set to IRQT_PIRQ. Then request_irq should succeed since pirq type is already
> set.
>
> However, this path only works on the assumption that msi_map_vector and
> request_irq are executed in the same domain, to be more specific, dom0.
> For PV domU guest, there is no msi_map_vector in its pci_enable_msi ( PV domU
> actually asks dom0 to do the msi map, instead. This is a decision made by Keir
> and Yunhong long ago. I think it is base on security considerations). So its
> irq type is not set correctly (What's more, it incorrectly sets the dom0's irq
> type). Then request_irq can trigger this bug_on().
>
> Anish, if you use the device in dom0 itself, does it also have this bug_on?
>
> Keir and Jan,
> Do you think this explanation is reasonable for issues Anish met?

Yes, actually I remember thinking there should be a hook for Jan's patch
into pcifront, but then forgot about it. When pcifront gets back a pirq from
pciback, it should evtchn_map_pirq(), right?

 -- Keir



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