From: Frediano Ziglio <freddy77@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Paul Brook <paul@codesourcery.com>,
Kevin O'Connor <kevin@koconnor.net>,
qemu-devel <qemu-devel@nongnu.org>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] Qemu crashed with lsi booting
Date: Fri, 27 Jul 2012 13:09:32 +0100 [thread overview]
Message-ID: <CAHt6W4dAX8wJYTUBGcpzjHSLQaNNW4z0NMJNd+BQdtA_60td2w@mail.gmail.com> (raw)
In-Reply-To: <50122C61.4050200@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2466 bytes --]
2012/7/27 Paolo Bonzini <pbonzini@redhat.com>:
> Il 26/07/2012 10:31, Frediano Ziglio ha scritto:
>> sudo ./x86_64-softmmu/qemu-system-x86_64 -m 1024 -hda test.qcow
>> -device lsi -drive file=/dev/sdb,if=none,id=XXX -device
>> scsi-block,drive=XXX -enable-kvm -bios ~/seabios/out/bios.bin -serial
>> file:out.txt
>> lsi_scsi: error: Multiple IO pending for request 0x7fd1075bf100
>> qemu-system-x86_64: /home/fredianoz/qemu/hw/lsi53c895a.c:774:
>> lsi_do_command: Assertion `s->current == ((void *)0)' failed.
>>
>> (sometimes I don't get the "Multiple IO ending" line).
>>
>> I'm using a recent SeaBIOS which support booting from LSI SCSI.
>>
>> Qemu version
>>
>> $ git branch -v
>> * master 61dc008 Revert "audio: Make PC speaker audio card available by default"
>>
>> I'm using SeaBIOS commit 9d6bac1d32b72cdf7c0ad009c1371a2e69084de3
>> (some minor changes in order to support 4k sectors).
>
> Can you share them? 4k sectors are not supported by BIOS at all
> AFAIK... Does virtio-scsi work with those changes?
>
>> Adding some debugging to SeaBIOS lsi code seems that drivers send
>> initial INQUIRY request but after that all requests have some problems
>> and lead to a lot of reset command.
>
> Can you gather tracing output for the following events:
>
> scsi_req_data
> scsi_req_dequeue
> scsi_req_parsed
> scsi_req_parse_bad
> scsi_req_build_sense
> scsi_inquiry
> scsi_test_unit_ready
>
> (Perhaps you can also instrument scsi_req_cancel for tracing).
>
> The timing doesn't matter, so you can use the stderr backend:
>
> --enable-trace-backend=stderr
>
> Place the above list in a file (one tracepoint per line) and then start
> QEMU with -trace events=/path/to/file.txt.
>
> You could also try github.com/bonzini/qemu.git, branch scsi-next (it
> shouldn't fix anything, but I added a couple more assertions).
>
> Paolo
It's currently a quite complicated setup. I used a virtual SCSI disk.
However Linux is happy with it and does not crash.
Also I got an assert even using scsi-hd directly (I had to disable
multipathd). It seems that the LSI Qemu driver assert when code try to
send two commands (second without waiting first completion).
Attached error with trace enabled (err.txt) and serial output with
SeaBIOS debug level set to 8.
To support these 4kb disk in SeaBIOS I just changed the line in src/blockcmd.c
if (drive->blksize != DISK_SECTOR_SIZE) {
to
if (drive->blksize != DISK_SECTOR_SIZE && drive->blksize != 4096) {
Frediano
[-- Attachment #2: serial.txt.gz --]
[-- Type: application/x-gzip, Size: 2609 bytes --]
[-- Attachment #3: err.txt.gz --]
[-- Type: application/x-gzip, Size: 877 bytes --]
prev parent reply other threads:[~2012-07-27 12:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-26 8:31 [Qemu-devel] Qemu crashed with lsi booting Frediano Ziglio
2012-07-27 2:26 ` Kevin O'Connor
2012-07-27 5:51 ` Paolo Bonzini
2012-07-27 12:09 ` Frediano Ziglio [this message]
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=CAHt6W4dAX8wJYTUBGcpzjHSLQaNNW4z0NMJNd+BQdtA_60td2w@mail.gmail.com \
--to=freddy77@gmail.com \
--cc=kevin@koconnor.net \
--cc=kraxel@redhat.com \
--cc=paul@codesourcery.com \
--cc=pbonzini@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).