Skip to content

Commit 1378a84

Browse files
chejianjlijinxia
authored andcommitted
dm: virtio: add support for VBS-K device reset
A new ioctl is introduced in VBS-K to issue reset command to kernel VBS-K driver. This is used to support VBS-K S3. When FE enters S3 reset command is sent to device model. Backend driver in device model should use this ioctl to inform the VBS-K drvier in kernel. Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
1 parent 16a8174 commit 1378a84

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

devicemodel/hw/pci/virtio/virtio_kernel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ vbs_kernel_init(int fd)
3838
int
3939
vbs_kernel_reset(int fd)
4040
{
41-
return VIRTIO_SUCCESS;
41+
return ioctl(fd, VBS_K_RESET_DEV, NULL);
4242
}
4343

4444
/*

devicemodel/include/vbs_common_if.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@ struct vbs_dev_info {
4343

4444
#define VBS_K_SET_DEV _IOW(VBS_K_IOCTL, 0x00, struct vbs_dev_info)
4545
#define VBS_K_SET_VQ _IOW(VBS_K_IOCTL, 0x01, struct vbs_vqs_info)
46+
#define VBS_K_RESET_DEV _IO(VBS_K_IOCTL, 0x02)
4647

4748
#endif /* _VBS_COMMON_IF_H_ */

0 commit comments

Comments
 (0)