From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Subject: Re: Windows Bug Check 0x101 issue Date: Thu, 27 Mar 2008 09:08:31 +0000 Message-ID: <20080327090831.2a9f9b05@core> References: <7k4pawfnxs.fsf@pingu.sky.yk.fujitsu.co.jp> <7k1w5zf50j.fsf@pingu.sky.yk.fujitsu.co.jp> <18408.57824.846687.465435@mariner.uk.xensource.com> <20080325175718.GT4411@implementation.uk.xensource.com> <7ky786dkup.fsf@pingu.sky.yk.fujitsu.co.jp> <18410.9596.488204.878357@mariner.uk.xensource.com> <7ktziseo9r.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <7ktziseo9r.fsf@pingu.sky.yk.fujitsu.co.jp> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Kouya Shimura Cc: xen-devel@lists.xensource.com, Ian Jackson , Keir Fraser , Samuel Thibault List-Id: xen-devel@lists.xenproject.org On Thu, 27 Mar 2008 14:20:32 +0900 Kouya Shimura wrote: > Ian Jackson writes: > > This one is much better but I still have a comment ... > > Thank you for many comments. Actually I'm not good at qemu. > How about the attached patch? > > > > +static void ide_flush_cb(void *opaque, int ret) > > > +{ > > > + IDEState *s = opaque; > > > + > > > + s->status = READY_STAT; > > > + ide_set_irq(s); > > > > You need to check the return value (ret) and set an appropriate IDE > > error status if the operation failed. ide_abort_command may be of > > some use. > > This patch uses ide_abort_command(). > As for the failure case, it looks too much for me. > I hope someone who is expert on the IDE fixes it. If a flush fails you can't just just reply with an abrt as I said earlier, many OS will then loop forever trying to finish the flush. flush cache has unusual error reporting behaviour (see ATA-7). An abort means a cache flush fail and to retry for further sectors, if you can't properly emulate reporting block numbers back then you need to offline the virtual device. Alan