From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEJwP-0001qF-9I for qemu-devel@nongnu.org; Wed, 19 Sep 2012 09:03:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEJwH-0003Xj-CJ for qemu-devel@nongnu.org; Wed, 19 Sep 2012 09:03:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEJwH-0003XU-0D for qemu-devel@nongnu.org; Wed, 19 Sep 2012 09:03:37 -0400 Message-ID: <5059C2A1.4050208@redhat.com> Date: Wed, 19 Sep 2012 16:03:29 +0300 From: Avi Kivity MIME-Version: 1.0 References: <504F1BBC.3030409@siemens.com> <504F2C80.3040803@redhat.com> <504F2DD6.8070807@siemens.com> <504F2EE6.8060606@redhat.com> <504F3021.5090802@siemens.com> <504F3113.1000708@redhat.com> <20120919043257.GB29439@zapo> <50597A72.6030901@redhat.com> <20120919114647.GA29445@zapo> <5059B69C.5070302@redhat.com> <5059C221.5060606@samsung.com> In-Reply-To: <5059C221.5060606@samsung.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V3 10/11] vcpu: introduce lockmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mitsyanko Cc: Peter Maydell , Jan Kiszka , Marcelo Tosatti , "qemu-devel@nongnu.org" , liu ping fan , Peter Crosthwaite , Anthony Liguori , Paolo Bonzini , "Edgar E. Iglesias" On 09/19/2012 04:01 PM, Igor Mitsyanko wrote: >>> That would avoid the lockups and allow the device to be reset at >>> any time. Or am I missing something? >>> >> Not that I can see. If real hardware can be looped, so can qemu. I'm >> only worried about recursion and deadlocks (while real hardware can >> deadlock, we'd prefer to avoid that). >> >> > > So, I think the idea here is that if real hardware can be locked we > should lock too, but provide a guest CPU a possibility to abort locked > operation. For this particular example, SD card controller can deadlock > on recursive descriptor LINK entries, but CPU can abort ongoing > transaction at any time by issuing ABORT command. And if guest CPU > busy-waits in infinite while() loop for a TRANSFER OVER flag to be set, > then it had it coming. If real hardware would lock up so should we (in the guest's eyes) but the qemu monitor should remain responsive. It is not part of emulated hardware. -- error compiling committee.c: too many arguments to function