diff --git a/devicemodel/hw/pci/virtio/virtio_kernel.c b/devicemodel/hw/pci/virtio/virtio_kernel.c index e37e0d23e..654d8b063 100644 --- a/devicemodel/hw/pci/virtio/virtio_kernel.c +++ b/devicemodel/hw/pci/virtio/virtio_kernel.c @@ -38,7 +38,7 @@ vbs_kernel_init(int fd) int vbs_kernel_reset(int fd) { - return VIRTIO_SUCCESS; + return ioctl(fd, VBS_K_RESET_DEV, NULL); } /* diff --git a/devicemodel/include/vbs_common_if.h b/devicemodel/include/vbs_common_if.h index 54d171371..9e0336c14 100644 --- a/devicemodel/include/vbs_common_if.h +++ b/devicemodel/include/vbs_common_if.h @@ -43,5 +43,6 @@ struct vbs_dev_info { #define VBS_K_SET_DEV _IOW(VBS_K_IOCTL, 0x00, struct vbs_dev_info) #define VBS_K_SET_VQ _IOW(VBS_K_IOCTL, 0x01, struct vbs_vqs_info) +#define VBS_K_RESET_DEV _IO(VBS_K_IOCTL, 0x02) #endif /* _VBS_COMMON_IF_H_ */