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