From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34317 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PI6Pr-0004Az-Pa for qemu-devel@nongnu.org; Mon, 15 Nov 2010 16:16:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PI6Po-0006LZ-Ch for qemu-devel@nongnu.org; Mon, 15 Nov 2010 16:16:41 -0500 Received: from mail-qy0-f173.google.com ([209.85.216.173]:42441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PI6Po-0006LR-6w for qemu-devel@nongnu.org; Mon, 15 Nov 2010 16:16:40 -0500 Received: by qyl33 with SMTP id 33so4330744qyl.4 for ; Mon, 15 Nov 2010 13:16:39 -0800 (PST) Message-ID: <4CE1A330.7030502@codemonkey.ws> Date: Mon, 15 Nov 2010 15:16:32 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] virtio-blk broken after system reset References: <4CDDB96F.7090301@web.de> <4CDE4396.8070708@web.de> <4CDE6200.4060600@msgid.tls.msk.ru> <4CDE63CD.8050505@web.de> In-Reply-To: <4CDE63CD.8050505@web.de> 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: Jan Kiszka Cc: Stefan Hajnoczi , Gleb Natapov , Stefan Hajnoczi , Michael Tokarev , qemu-devel , Kevin O'Connor On 11/13/2010 04:09 AM, Jan Kiszka wrote: > > There is also real hw out there that goes into an error state if it's > misprogrammed. > > I think we have to remove all those premature exits. They also prevent > handing the device inside the guest to an untrusted driver (relevant > once we have IOMMU emulation). > I think the key to achieving this is to isolate the device within QEMU. IOW, have all fd callbacks, bottom halves, etc. tagged with a device context. Have a mechanism that raises an error on a device that can then be used to stop issuing any type of callback to the device until reset. Obviously, we can fix some of these by just simple code refactoring. Regards, Anthony Liguori >> Why it is trying to print things to stderr is a different >> matter, it should be using a proper error-reporting routine, >> but this is a different story. >> > Jep. Even worse: the above message is not dumped to the console as the > stream isn't flushed on exit. > > Jan > >