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] msi: Avoid uninitialized msi descriptors

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] msi: Avoid uninitialized msi descriptors
From: Wei Wang2 <wei.wang2@xxxxxxx>
Date: Thu, 12 Aug 2010 15:30:24 +0200
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Dante Cinco <dantecinco@xxxxxxxxx>
Delivery-date: Thu, 12 Aug 2010 06:38:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C8889E3F.1D70B%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: <C8889E3F.1D70B%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 20070904.708012)
Keir,
I would suggest to backport this patch. I saw the same issue on both Xen-4.0.1 
RC6 and xen-unstable. Actually, some MSI-X capable devices will also offer 
MSI capabilities. For such device, MSI will be enabled first by OS. When guest 
driver (like Broadcom driver) detects multiple vcpus, it will disable MSI and 
enable MSI-X block for better cpu-interrupt affinity. In this case, the whole 
system crashes.  But on UP system, only MSI block  will be enabled, it might 
still work even without the fix.
Thanks,
Wei


On Wednesday 11 August 2010 19:36:47 Keir Fraser wrote:
> On 11/08/2010 18:09, "Dante Cinco" <dantecinco@xxxxxxxxx> wrote:
> > I'm glad that somebody who is familiar with MSI has resolved this
> > problem although I haven't applied and verified the proposed patch yet
> > on my system. I posted the Xen crash I experienced related to this
> > issue on xen-devel a couple of weeks ago (see link below) but wasn't
> > familiar enough with the MSI/MSI-X code to propose a solution other
> > than to back out changelist 21778.
>
> Let me know when you confirm. I backported 21778 for 4.0.1, perhaps in too
> much haste. If this is a good fix then I should backport it as well.
>
>  Thanks,
>  Keir
>
> > http://old.nabble.com/Re:-(XEN)-RIP:-e008:-%3Cffff82c48015564b%3E---write
> >_msi_ msg%2B0x2b-0x150-p29301832.html
> >
> > Dante
> >
> >
> > -----Original Message-----
> > From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> > [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Wei Wang2
> > Sent: Wednesday, August 11, 2010 6:43 AM
> > To: xen-devel@xxxxxxxxxxxxxxxxxxx
> > Subject: [Xen-devel] [PATCH] msi: Avoid uninitialized msi descriptors
> >
> > Hi,
> > When __pci_enable_msix() returns early, output parameter (struct msi_desc
> > **desc) will not be initialized.  On my machine, a Broadcom BCM5709
> > nic has both MSI and MSIX capability blocks and when guest tries to
> > enable msix interrupts but __pci_enable_msix() returns early for
> > encountering a msi block,  the whole system will crash for fatal page
> > fault immediately.
> >
> > Thanks,
> > Wei
> >
> > Signed-off-by: Wei Wang <wei.wang2@xxxxxxx>
> > --
> > AMD GmbH, Germany
> > Operating System Research Center
> >
> > Legal Information:
> > Advanced Micro Devices GmbH
> > Karl-Hammerschmidt-Str. 34
> > 85609 Dornach b. München
> >
> > Geschäftsführer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
> > Sitz: Dornach, Gemeinde Aschheim, Landkreis München Registergericht
> > München, HRB Nr. 43632
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel




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