On Tue, Dec 04, 2018 at 11:08:33AM +0000, Julien Thierry wrote: > Hi, > > This series was developped by Jean-Philippe and is needed for a series > I'll be posting shortly after to load firmwares on arm kvmtool. > > Currently, when a guest tries to reset a device, a lot of ressources > aren't reset (threads keep running, virtio queue keep their state, etc). > > When the guest only does the reset to initialize the device and there > were no previous users, there is no noticeable issue. But when a guest > has a firmare + Linux, if the firmware uses a virtio device, Linux will > fail to probe that device. > > This series aim to properly reset the virtio resources when the guests > requests it. > > Reset of net vhost is unsupported for now. > > Patch 1 is a bug fix on ioeventfd > Patch 2-6 provide the core support so devices can implement their reset > Patch 7-13 implements the reset for the various virtio devices Fails to build: kraxel@sirius ~/projects/kvmtool (virtio)# make Makefile:323: Skipping optional libraries: vncserver CC virtio/core.o In file included from virtio/core.c:8:0: virtio/core.c: In function ‘virtio_notify_status’: include/kvm/virtio.h:37:3: error: ‘VIRTIO_CONFIG_S_NEEDS_RESET’ undeclared (first use in this function) VIRTIO_CONFIG_S_NEEDS_RESET | \ ^ virtio/core.c:232:19: note: in expansion of macro ‘VIRTIO_CONFIG_S_MASK’ vdev->status &= ~VIRTIO_CONFIG_S_MASK; Yes, it is an older machine (rhel-7), VIRTIO_CONFIG_S_NEEDS_RESET isn't in the system headers (IIRC this bit was added with virtio-1.0). cheers, Gerd