qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] virtio: skip guest index check on device load


From: Stefan Hajnoczi
Subject: Re: [PATCH] virtio: skip guest index check on device load
Date: Wed, 28 Oct 2020 11:00:38 +0000

On Tue, Oct 27, 2020 at 09:04:46AM -0400, Michael S. Tsirkin wrote:
> It's not a waste of time, it's just a lot of work
> within guests.

Luckily it does no harm to set the NEEDS_RESET bit even if the guest
doesn't handle it.

If the guest driver is unaware it may continue to submit requests to the
device for a while. The device emulation code stops accepting new
requests though. This means the device will become unresponsive until
reset, which is not ideal but okay in the case where the device was put
into an invalid state.

I agree that supporting NEEDS_RESET transparently inside guests is
difficult. The driver needs to reset and resume the device without
reporting errors to applications. In some cases drivers may not have
enough state in order to do that. It's also tricky to test all code
paths. I guess this is why no one has done it: drivers shouldn't enter
the NEEDS_RESET state anyway and handling it is complex.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]