[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] virtio: Introduce VirtIODevice.broken
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] virtio: Introduce VirtIODevice.broken |
Date: |
Mon, 28 Apr 2014 09:58:53 +0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Sun, 04/27 11:59, Michael S. Tsirkin wrote:
> On Sun, Apr 27, 2014 at 09:34:06AM +0100, Peter Maydell wrote:
> > On 27 April 2014 09:29, Michael S. Tsirkin <address@hidden> wrote:
> > > On Tue, Apr 22, 2014 at 04:55:15PM +0800, Fam Zheng wrote:
> > >> If guest driver behaves abnormally, emulation code could mark the device
> > >> as "broken".
> > >>
> > >> Once "broken" is set, device emulation will typically wait for a reset
> > >> command and ignore any other operations, but it could also return error
> > >> responds. In other words, whether and how does guest know about this
> > >> error status is device specific.
> > >>
> > >> Signed-off-by: Fam Zheng <address@hidden>
> > >
> > > I'm assuming the idea is to make debugging guest drivers easier
> > > for people not familiar with qemu?
> >
> > As a general rule, guests shouldn't be able to cause QEMU to
> > just randomly exit. We have a bunch of code in tree which does
> > handle guest errors this way, of course, but cleanups to fix it
> > are worth having.
>
> OK so by using a wrong address an MMIO handler can e.g. start
> MMIO on the device itself instead of doing DMA,
> this will cause an infinite loop.
> Any idea how to fix this?
>
> > The benefits include that one duff device
> > driver doesn't take out your whole VM, that you have a chance
> > for a clean shutdown, and reboot might restore the operation of
> > the offending device.
> >
> > There was a thread about this a little while back.
> >
> > thanks
> > -- PMM
>
> I agree, but I'd like the change to be done in a way that does not make
> debugging harder.
>
Michael, Why is debugging harder with this patch, please?
Fam
- Re: [Qemu-devel] [PATCH 1/3] virtio: Introduce VirtIODevice.broken, (continued)
Re: [Qemu-devel] [PATCH 1/3] virtio: Introduce VirtIODevice.broken, Michael S. Tsirkin, 2014/04/27
[Qemu-devel] [PATCH 3/3] virtio-scsi: Don't exit on bad request, Fam Zheng, 2014/04/22
[Qemu-devel] [PATCH 2/3] virtio-blk: Don't exit on invalid VQ data, Fam Zheng, 2014/04/22
Re: [Qemu-devel] [PATCH 0/3] virtio: Eliminate "exit(1)" upon invalid request in virtio-blk and virtio-scsi, Michael S. Tsirkin, 2014/04/22