From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTHIY-0000vn-33 for qemu-devel@nongnu.org; Wed, 13 Aug 2008 10:26:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTHIW-0000vT-CY for qemu-devel@nongnu.org; Wed, 13 Aug 2008 10:26:01 -0400 Received: from [199.232.76.173] (port=52042 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTHIW-0000vQ-7D for qemu-devel@nongnu.org; Wed, 13 Aug 2008 10:26:00 -0400 Received: from il.qumranet.com ([212.179.150.194]:11997) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KTHIW-00013Z-A0 for qemu-devel@nongnu.org; Wed, 13 Aug 2008 10:26:00 -0400 Received: from gleb-debian.qumranet.com (gleb-debian.qumranet.com.qumranet.com [172.16.15.143]) by il.qumranet.com (Postfix) with ESMTP id 4ED4A250310 for ; Wed, 13 Aug 2008 17:25:58 +0300 (IDT) Date: Wed, 13 Aug 2008 17:25:58 +0300 From: Gleb Natapov Subject: Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown. Message-ID: <20080813142557.GD17567@minantech.com> References: <20080813132358.17672.68212.stgit@gleb-debian.qumranet.com.qumranet.com> <20080813134608.GN6165@implementation.uk.xensource.com> <20080813135941.GB17567@minantech.com> <20080813140641.GP6165@implementation.uk.xensource.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20080813140641.GP6165@implementation.uk.xensource.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wed, Aug 13, 2008 at 03:06:41PM +0100, Samuel Thibault wrote: > Gleb Natapov, le Wed 13 Aug 2008 16:59:41 +0300, a =C3=A9crit : > > On Wed, Aug 13, 2008 at 02:46:08PM +0100, Samuel Thibault wrote: > > > Gleb Natapov, le Wed 13 Aug 2008 16:23:58 +0300, a =C3=A9crit : > > > > If there is outstanding IDE IO when BIOS starts execution then IDE > > > > commands sent by BIOS will interfere with it and will leave IDE > > > > subsystem in unpredictable state. This can happen when system reboo= ts > > > > unexpectedly without waiting for IO completion. Flushing IO before = exit > > > > prevents data lose. > > >=20 > > > I'm wondering: isn't that what happens with real machines? > > >=20 > > With shutdown yes, but why not try harder. With reboot I don't think > > that in real HW you can hang IDE interface after reboot ;) >=20 > Mmm, I couldn't understand. >=20 > With real hardware, if you reboot into the bios the board is not > resetted either, and thus the interference is the same. >=20 On real hardware if you press reset button then HW reset is performed (not power up reset) and qemu HW handles this in reset notifiers. I have no idea what IDE does during reset with outstanding IO. It should either cancel it or complete it. Currently BOCHS BIOS doesn't check that IDE is busy (it doesn't even know that HW is present) and sends overlapping command. -- Gleb.