From: Hannes Reinecke <hare@suse.de>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH][v13] megasas: LSI Megaraid SAS HBA emulation
Date: Tue, 21 Feb 2012 12:12:31 +0100 [thread overview]
Message-ID: <4F437C1F.9090004@suse.de> (raw)
In-Reply-To: <20120221103442.GA5748@redhat.com>
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 cases?
>>>>>>
>>>>> 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
>
> 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...
>
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=fast
>TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 11
Region 0: Memory at febd8000 (32-bit, non-prefetchable)
[size=16K]
Region 2: I/O ports at c000 [size=256]
Region 3: Memory at feb40000 (32-bit, non-prefetchable)
[size=256K]
Expansion ROM at febd0000 [disabled] [size=32K]
Capabilities: [40] MSI-X: Enable- Mask- TabSize=15
Vector table: BAR=0 offset=00002000
PBA: BAR=0 offset=00002800
Kernel modules: megaraid_sas
(The only difference here being that the memory regions are actually
64-bit, but for some reason qemu refuse to do so and set it to
32-bit always).
But when loading the Linux driver from the guest it for some reason
does _not_ enable MSI-X properly.
The emulation has this:
if (msix_enabled(&s->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
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
next prev parent reply other threads:[~2012-02-21 11:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-20 15:11 [Qemu-devel] [PATCH][v13] megasas: LSI Megaraid SAS HBA emulation Hannes Reinecke
2012-02-20 15:13 ` Alexander Graf
2012-02-20 15:16 ` Hannes Reinecke
2012-02-20 15:17 ` Alexander Graf
2012-02-20 23:04 ` Michael S. Tsirkin
2012-02-21 10:27 ` Hannes Reinecke
2012-02-21 10:34 ` Michael S. Tsirkin
2012-02-21 11:12 ` Hannes Reinecke [this message]
2012-02-20 18:39 ` Gerhard Wiesinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F437C1F.9090004@suse.de \
--to=hare@suse.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.