qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Qemu crashed with lsi booting


From: Frediano Ziglio
Subject: Re: [Qemu-devel] Qemu crashed with lsi booting
Date: Fri, 27 Jul 2012 13:09:32 +0100

2012/7/27 Paolo Bonzini <address@hidden>:
> 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: serial.txt.gz
Description: GNU Zip compressed data

Attachment: err.txt.gz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]