qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] strange failures with SATA drive but not with IDE drive


From: Michael Tokarev
Subject: [Qemu-devel] strange failures with SATA drive but not with IDE drive
Date: Tue, 17 Dec 2013 08:12:27 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

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



reply via email to

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