]> git.ipfire.org Git - thirdparty/qemu.git/commit
pc: Fix CMOS info for drives defined with -device stable-0.12
authorMarkus Armbruster <armbru@redhat.com>
Thu, 24 Jun 2010 17:58:20 +0000 (19:58 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Mon, 16 Aug 2010 17:42:40 +0000 (19:42 +0200)
commit6394bd0e05441c363ebb73597c74c951378810e6
tree3f6c7cf61f7d1ffadd2333fbada631956e601a9c
parentfa719811ac922ec40a34fe456623963f0312c0e1
pc: Fix CMOS info for drives defined with -device

Drives defined with -drive if=ide get get created along with the IDE
controller, inside machine->init().  That's before cmos_init().
Drives defined with -device get created during generic device init.
That's after cmos_init().  Because of that, CMOS has no information on
them (type, geometry, translation).  Older versions of Windows such as
XP reportedly choke on that.

Split off the part of CMOS initialization that needs to know about
-device devices, and turn it into a reset handler, so it runs after
device creation.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit c0897e0cb94e83ec1098867b81870e4f51f225b9)
hw/ide.h
hw/ide/qdev.c
hw/pc.c