From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awyV0-0007ee-KU for qemu-devel@nongnu.org; Sun, 01 May 2016 17:02:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awyUp-0006uz-1d for qemu-devel@nongnu.org; Sun, 01 May 2016 17:01:49 -0400 Received: from mga11.intel.com ([192.55.52.93]:45102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awyUo-0006tY-Sl for qemu-devel@nongnu.org; Sun, 01 May 2016 17:01:42 -0400 Date: Sun, 1 May 2016 14:04:42 -0700 From: Yuanhan Liu Message-ID: <20160501210442.GK5641@yliu-dev.sh.intel.com> References: <1459509388-6185-1-git-send-email-marcandre.lureau@redhat.com> <1459509388-6185-12-git-send-email-marcandre.lureau@redhat.com> <20160428052304.GF25677@yliu-dev.sh.intel.com> <20160429174835.GH5641@yliu-dev.sh.intel.com> <20160501134233-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160501134233-mutt-send-email-mst@redhat.com> Subject: Re: [Qemu-devel] [PATCH 11/18] vhost-user: add shutdown support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: =?iso-8859-1?Q?Marc-Andr=E9?= Lureau , QEMU , Ilya Maximets , jonshin@cisco.com, Tetsuya Mukawa , "Xie, Huawei" On Sun, May 01, 2016 at 02:37:19PM +0300, Michael S. Tsirkin wrote: > On Fri, Apr 29, 2016 at 10:48:35AM -0700, Yuanhan Liu wrote: > > > But, I > > > would worry first about a backend that crashes that it may corrupt the > > > VM memory too... > > > > Not quite sure I follow this. But, backend just touches the virtio > > related memory, so it will do no harm to the VM? > > It crashed so apparently it's not behaving as designed - > how can we be sure it does not harm the VM? Hi Michael, What I know so far, a crash might could corrupt the virtio memory in two ways: - vring_used_elem might be in stale state when we are in the middle of updating used vring. Say, we might have updated the "id" field, but leaving "len" untouched. - vring desc buff might also be in stale state, when we are copying data into it. However, the two issues will not be real issue, as used->idx is not updated in both case. Thefore, those corrupted memory will not be processed by guest. So, no harm I'd say. Or, am I missing anything? BTW, Michael, what's your thoughts on the whole reconnect stuff? --yliu