From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mkbl1-0003Gt-MZ for qemu-devel@nongnu.org; Mon, 07 Sep 2009 06:47:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mkbkx-0003EZ-U8 for qemu-devel@nongnu.org; Mon, 07 Sep 2009 06:47:35 -0400 Received: from [199.232.76.173] (port=50910 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mkbkx-0003EN-QH for qemu-devel@nongnu.org; Mon, 07 Sep 2009 06:47:31 -0400 Received: from mx20.gnu.org ([199.232.41.8]:4686) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mkbkx-0001H1-5U for qemu-devel@nongnu.org; Mon, 07 Sep 2009 06:47:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mkbkv-0004cd-8y for qemu-devel@nongnu.org; Mon, 07 Sep 2009 06:47:29 -0400 Message-ID: <4AA4E4B9.4020208@redhat.com> Date: Mon, 07 Sep 2009 12:47:21 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/5] qdev: device capabilities References: <1251714459-2467-1-git-send-email-kraxel@redhat.com> <4AA12D59.6040208@codemonkey.ws> <4AA12F46.6000207@redhat.com> <4AA26A2D.4010605@codemonkey.ws> In-Reply-To: <4AA26A2D.4010605@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On 09/05/09 15:39, Anthony Liguori wrote: > Gerd Hoffmann wrote: >> Look at patch #5 (watchdogs). What else do you suggest here? >> There is nothing which can be used to identify the device as watchdog. > > That's a problem with the watchdog timers. The WatchdogTimerModel stuff > really replicates qdev functionality. Good point, I fully agree. Patch #5 kills WatchdogTimerModel. > Ideally, the watchdog_list would go away and we would just make > -watchdog an alias for -device. Patch #5 does just that. Almost. -watchdog continues to accept watchdog devices only. And '-watchdog ?' lists watchdog devices only. watchdog_list is gone, the qdev list is used instead. To identify the watchdog devices in the qdev device model list the capability bit is used. The patch description says so, doesn't it? > Instead of having a global watchdog > action, we should have a watchdog frontend/backend and allow a user to > specify the action for a watchdog backend. This is basically what > -watchdog-action does. Sounds complicated. Isn't that over-engineering it a bit? The -watchdog-action implementation is just two little functions in watchdog.c right now ... > The current command line options assume one global watchdog. I don't see > why we shouldn't support two though. Even if we limited ourselves to > one, it should use the same infrastructure as everything else. After applying patch #5 you can have two watchdogs, no problem ;) cheers, Gerd