From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzne9-0007oL-Ex for qemu-devel@nongnu.org; Tue, 21 Feb 2012 06:12:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rzne4-0002jN-Ps for qemu-devel@nongnu.org; Tue, 21 Feb 2012 06:12:37 -0500 Received: from cantor2.suse.de ([195.135.220.15]:52045 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzne4-0002jI-Gs for qemu-devel@nongnu.org; Tue, 21 Feb 2012 06:12:32 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 5B414910A1 for ; Tue, 21 Feb 2012 12:12:31 +0100 (CET) Message-ID: <4F437C1F.9090004@suse.de> Date: Tue, 21 Feb 2012 12:12:31 +0100 From: Hannes Reinecke MIME-Version: 1.0 References: <1329750669-14544-1-git-send-email-hare@suse.de> <6A9F3A5B-5A62-4FA6-99D6-01A63A61A389@suse.de> <4F4263B9.7020307@suse.de> <301EB351-824A-4BBC-B6C6-28FE830536F7@suse.de> <20120220230433.GB22036@redhat.com> <4F437183.4000708@suse.de> <20120221103442.GA5748@redhat.com> In-Reply-To: <20120221103442.GA5748@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH][v13] megasas: LSI Megaraid SAS HBA emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 02/21/2012 11:34 AM, Michael S. Tsirkin wrote: > On Tue, Feb 21, 2012 at 11:27:15AM +0100, Hannes Reinecke wrote: >> On 02/21/2012 12:04 AM, Michael S. Tsirkin wrote: >>> On Mon, Feb 20, 2012 at 04:17:05PM +0100, Alexander Graf wrote: >>>> >>>> On 20.02.2012, at 16:16, Hannes Reinecke wrote: >>>> >>>>> On 02/20/2012 04:13 PM, Alexander Graf wrote: >>>>>> >>>>>> On 20.02.2012, at 16:11, Hannes Reinecke wrote: >>>>>> >>>>>>> This patch adds an emulation for the LSI Megaraid SAS 8708EM2 HBA= . >>>>>>> I've tested it to work with Linux, Windows Vista, and Windows7. >>>>>>> >>>>>>> Changes since v12: >>>>>>> - Fixup flag setting via properties >>>>>>> - Disable MSI-X per default >>>>>>> - Fixup MSI-X handling >>>>>> >>>>>> If MSI-X works again, why disable it? :o Does it break in other ca= ses? >>>>>> >>>>> It doesn't. No idea why. >>>>> That's why I disabled it :-) >>>>> >>>>> The MSI-X vector is signalled, but nothing on the OS side appear to >>>>> receive it. >>>>> If you got any idea on how to debug it I'm all ears ... >>>> >>>> Michael, any ideas? IIRC MSI-X used to work in earlier versions, so = something recent must've broken it. >>>> >>>> >>>> Alex >>> >>> Hmm, there were's any recent changes I'm aware of. >>> Try to check that MSIX vector as qemu sees it >>> matches the value that the guest set. >>> If using kvm, compare against kernel as well. >>> Endian-ness issue somehow? >>> Are you testing on x86? >>> >> Testing on x86_64. >> But apparently the (linux) driver doesn't activate MSI-X. >> So either I didn't set it up properly in the HBA emulation >> or something else went wrong. >> >> Cheers, >> >> Hannes >=20 > Ah, the driver doesn't enable msix? Your earlier comment > made me think the driver did enable it, and you > send the interrupt but guest does not get it... >=20 It looks as if the HBA emulation sets up the BARs correctly: # lspci -s 00:04.0 -vv 00:04.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 1078 Subsystem: LSI Logic / Symbios Logic Device 1013 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=3Dfast >TAbort- SERR- dev)) { msix_notify(&s->dev, 0); } else { qemu_irq_raise(s->dev.irq[0]); } and guest is stuck just after the msix_notify(). So I would assume that the (linux) driver did setup MSI-X, otherwise 'msix_enabled()' should return false. But still the Linux driver doesn't receive any MSI-X interrupts. Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg)