From: Michael Tokarev <mjt@tls.msk.ru>
To: qemu-devel <qemu-devel@nongnu.org>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] strange failures with SATA drive but not with IDE drive
Date: Tue, 17 Dec 2013 08:12:27 +0400 [thread overview]
Message-ID: <52AFCF2B.2090407@msgid.tls.msk.ru> (raw)
I'm trying to debug an issue with qemu 1.7, when altmbr.bin
from syslinux is unable to boot from a logical partition when
qemu emulates sata drive, but works just fine with ide drive.
While debugging, I noticed that sata drive has some other
interesting glitches too.
qemu-system-x86_64 -enable-kvm \
-fda hdt-0.5.2.img -boot a \
-device ahci,id=ahci \
-drive file=a_windows_test_image,if=none,id=drv \
-device ide-drive,drive=drv,bus=ahci.0
>From there, choose Disks, Disk1. And qemu will spew this:
KVM internal error. Suberror: 1
emulation failure
EAX=00000000 EBX=00000000 ECX=f000ff53 EDX=0024bd00
ESI=00000000 EDI=00000000 EBP=00000007 ESP=07fc5fd4
EIP=f000ff53 EFL=00010286 [--S--P-] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0028 00000000 ffffffff 00c09300 DPL=0 DS [-WA]
CS =0020 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA]
SS =0028 00000000 ffffffff 00c09300 DPL=0 DS [-WA]
DS =0028 00000000 ffffffff 00c09300 DPL=0 DS [-WA]
FS =0000 00000000 ffffffff 00c00000
GS =0000 00000000 ffffffff 00c00000
LDT=0000 00000000 ffffffff 00c00000
TR =0008 00000580 00000067 00008b00 DPL=0 TSS32-busy
GDT= 0000b060 0000002f
IDT= 00003008 000007ff
CR0=00000011 CR2=00000000 CR3=00000000 CR4=00000000
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000000
Code=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
hdt-0.5.2.img is from syslinux, a hw diagnostics floppy image.
I built it from syslinux-4.07, it can be downloaded directly
from my page, http://www.corpit.ru/mjt/tmp/hdt-0.5.2.img.gz .
Also included there is disk.c32 module which should show just
the disks. To use it, hit Esc on the first menu and type
"disk.c32" at the boot: prompt.
For ahci/sata drive in qemu, disk.c32 shows garbage:
boot: disk.c32
DISK 0x80:
C/H/S: 255 heads, 1023 cylinders
63 sectors/track, 1 drives
EDD: ebios=1, EDD version: 30
16 heads, 16383 cylinders
33554432 sectors, 512 bytes/sector, 63 sectors/track
Host bus: , Interface type:
For the "Host bus" and "interface type" - there are some unprintable
characters in there, different on each attempt, sometimes it is
empty like on the above example.
When you switch from bus=ahci.0 to bus=ide.0 on the qemu command line
above, it all works fine and does not spew any warnings like that
about emulation failure.
It looks like we have some uninitialized data on sata emulation
(in addition to the altmbr issue which I'm investigating further).
Thanks,
/mjt
next reply other threads:[~2013-12-17 4:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 4:12 Michael Tokarev [this message]
2013-12-17 10:13 ` [Qemu-devel] strange failures with SATA drive but not with IDE drive Paolo Bonzini
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=52AFCF2B.2090407@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=kraxel@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 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.