dm/VBS-U: implement virtio_dev_error

When the device has experienced an error from which it cannot
re-cover, DEVICE_NEEDS_RESET is set to the device status register
and a config change intr is sent to the guest driver.

Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Reviewed-by: Hao Li <hao.l.li@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Jian Jun Chen
2018-03-29 12:29:00 +08:00
committed by Jack Ren
parent ce098260de
commit 0398498846
2 changed files with 26 additions and 0 deletions

View File

@@ -841,6 +841,19 @@ uint64_t virtio_pci_read(struct vmctx *ctx, int vcpu, struct pci_vdev *dev,
void virtio_pci_write(struct vmctx *ctx, int vcpu, struct pci_vdev *dev,
int baridx, uint64_t offset, int size, uint64_t value);
/**
* @brief Indicate the device has experienced an error.
*
* This is called when the device has experienced an error from which it
* cannot re-cover. DEVICE_NEEDS_RESET is set to the device status register
* and a config change intr is sent to the guest driver.
*
* @param base Pointer to struct virtio_base.
*
* @return N/A
*/
void virtio_dev_error(struct virtio_base *base);
/**
* @brief Set modern BAR (usually 4) to map PCI config registers.
*