From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54543 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4WEx-0008AZ-Et for qemu-devel@nongnu.org; Tue, 29 Mar 2011 06:33:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4WEw-0001qC-9L for qemu-devel@nongnu.org; Tue, 29 Mar 2011 06:33:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4WEv-0001q4-Pa for qemu-devel@nongnu.org; Tue, 29 Mar 2011 06:33:34 -0400 Date: Tue, 29 Mar 2011 16:03:19 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH 1/3] virtio: don't exit on guest errors Message-ID: <20110329103319.GA5968@amit-x200.redhat.com> References: <4e66df1d082db84937a97ef18595fafcc3d68e55.1301346785.git.mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4e66df1d082db84937a97ef18595fafcc3d68e55.1301346785.git.mst@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: kwolf@redhat.com, gleb@redhat.com, Jes Sorensen , Jason Wang , qemu-devel@nongnu.org, armbru@redhat.com, Christoph Hellwig , Alex Williamson On (Mon) 28 Mar 2011 [23:14:16], Michael S. Tsirkin wrote: > When guest does something illegal, such as > programming invalid index values in the virtio > device, qemu currently tends to crash. > > With virtio, a better idea is to log an error, > and set status to FAIL which stops the device. > > Add an API to do this, and fix core, blk and serial > to use it on error. > > Signed-off-by: Michael S. Tsirkin > --- > hw/virtio-blk.c | 12 +++++-- > hw/virtio-serial-bus.c | 13 +++++-- > hw/virtio.c | 79 +++++++++++++++++++++++++++++++----------------- > hw/virtio.h | 7 +++- > 4 files changed, 73 insertions(+), 38 deletions(-) ACK Amit