From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXJkH-00067F-DO for qemu-devel@nongnu.org; Sat, 10 Nov 2012 17:41:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXJkE-0001RG-Bi for qemu-devel@nongnu.org; Sat, 10 Nov 2012 17:41:45 -0500 Received: from smtp1-g21.free.fr ([2a01:e0c:1:1599::10]:37452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXJkD-0001QY-QH for qemu-devel@nongnu.org; Sat, 10 Nov 2012 17:41:42 -0500 Message-ID: <509ED817.3070902@reactos.org> Date: Sat, 10 Nov 2012 23:41:27 +0100 From: =?ISO-8859-1?Q?Herv=E9_Poussineau?= MIME-Version: 1.0 References: <201211091950.31378.hahn@univention.de> In-Reply-To: <201211091950.31378.hahn@univention.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [BUG?] vvfat vs. pc-1.1 isa-fdc.check_media_rate=off List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Philipp Hahn Cc: Kevin Wolf , qemu-devel Hi, Philipp Hahn a =E9crit : > I tried to create a virtual VFAT floppy image on-the-fly with qemi(-kvm= )-1.1.1=20 > using the command line argument > -drive file=3Dfat:floppy:"$WORK/floppy",if=3Dfloppy,index=3D0 Strange, I just tested today's QEMU git, and I have the opposite problem: - it works with -M pc-0.14 - it doesn't work with -M pc - it works with -M pc -global isa-fdc.check_media_rate=3Doff My test directory only contains one file of 1228800 bytes, and I'm using=20 MSDOS as guest OS. > Everything worked fine until I added the additional "-M pc-0.14" comman= d line=20 > argument: Then I only get an empty floppy image. > I narrowed this down to the PC_COMPAT_1_0 definition in hw/pc_piix.c, w= hich=20 > added > .driver =3D "isa-fdc",\ > .property =3D "check_media_rate",\ > .value =3D "off",\ > to the compat settings. If I also add an > -global isa-fdc.check_media_rate=3Don > to explicitly overwrite that setting, vvfat also works with pc-1.0 and=20 > earlier. > > I didn't unsterstand from reading the code what that flag is supposed t= o do,=20 > so can somebody give me some help to understand what goes wrong here. You can have multiple floppy formats, the most known one is 1.44 MB. Each floppy format requires a specific media rate transfer to be=20 programmed on the floppy controller. Before 1.1, QEMU was not checking if the current transfer rate was the=20 correct one. isa-fdc.check_media_rate parameter enables/disables this=20 check; it is on by default on 1.1+, and off by default on previous versio= ns. vvfat is creating by default 2.88 floppies, which don't have the same=20 transfer rate than 1.44 floppies. Here, you're probably hitting a SeaBIOS bug, which doesn't try multiple=20 transfers rates when reading a floppy. For my case, I can either request floppy controller to not check=20 transfer rates (-global isa-fdc.check_media_rate=3Doff), or request vvfat= =20 to create a 1.44 floppy: -drive file=3Dfat:12:floppy:"$WORK/floppy",if=3Dfloppy,index=3D0 > I think vvfat needs to be patched to also work with check_media_rate=3D= off. As said, you may experience a SeaBIOS bug. Regards, Herv=E9