vm-virtio: Reset underlying device on driver request

If the driver triggers a reset by writing zero into the status register
then reset the underlying device if supported. A device reset also
requires resetting various aspects of the queue.

In order to be able to do a subsequent reactivate it is required to
reclaim certain resources (interrupt and queue EventFDs.) If a device
reset is requested by the driver but the underlying device does not
support it then generate an error as the driver would not be able to
configure it anyway.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2019-05-08 15:59:39 +01:00
committed by Samuel Ortiz
parent 040ea5432d
commit 3b2faa9f11
3 changed files with 33 additions and 3 deletions
-1
View File
@@ -30,7 +30,6 @@ pub use self::block::*;
pub use self::device::*;
pub use self::queue::*;
#[allow(dead_code)]
const DEVICE_INIT: u32 = 0x00;
const DEVICE_ACKNOWLEDGE: u32 = 0x01;
const DEVICE_DRIVER: u32 = 0x02;