From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmJKY-0000wy-0Z for qemu-devel@nongnu.org; Tue, 20 Sep 2016 07:35:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmJKU-0007VD-Bg for qemu-devel@nongnu.org; Tue, 20 Sep 2016 07:35:16 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:35565 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmJKU-0007V3-5b for qemu-devel@nongnu.org; Tue, 20 Sep 2016 07:35:14 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8KBXaaH044342 for ; Tue, 20 Sep 2016 07:35:13 -0400 Received: from e06smtp08.uk.ibm.com (e06smtp08.uk.ibm.com [195.75.94.104]) by mx0b-001b2d01.pphosted.com with ESMTP id 25jnxbtncd-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 20 Sep 2016 07:35:13 -0400 Received: from localhost by e06smtp08.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 20 Sep 2016 12:35:11 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id E089B219005F for ; Tue, 20 Sep 2016 12:34:28 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u8KBZ8pO2032026 for ; Tue, 20 Sep 2016 11:35:08 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u8KBZ83v018913 for ; Tue, 20 Sep 2016 07:35:08 -0400 Date: Tue, 20 Sep 2016 13:35:06 +0200 From: Cornelia Huck In-Reply-To: <1460467534-29147-4-git-send-email-stefanha@redhat.com> References: <1460467534-29147-1-git-send-email-stefanha@redhat.com> <1460467534-29147-4-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20160920133506.0105d348.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH v3 03/10] virtio: stop virtqueue processing if device is broken List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Fam Zheng On Tue, 12 Apr 2016 14:25:27 +0100 Stefan Hajnoczi wrote: > QEMU prints an error message and exits when the device enters an invalid > state. Terminating the process is heavy-handed. The guest may still be > able to function even if there is a bug in a virtio guest driver. > > Moreover, exiting is a bug in nested virtualization where a nested guest > could DoS other nested guests by killing a pass-through virtio device. > I don't think this configuration is possible today but it is likely in > the future. > > If the broken flag is set, do not process virtqueues or write back used > descriptors. The broken flag can be cleared again by resetting the > device. > > Signed-off-by: Stefan Hajnoczi > --- > hw/virtio/virtio.c | 39 +++++++++++++++++++++++++++++++++++++++ > include/hw/virtio/virtio.h | 3 +++ > 2 files changed, 42 insertions(+) Reviewed-by: Cornelia Huck