File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 38
38
#define VDPASIM_BLK_VQ_NUM 1
39
39
40
40
static struct vdpasim * vdpasim_blk_dev ;
41
+ static char vdpasim_blk_id [VIRTIO_BLK_ID_BYTES ] = "vdpa_blk_sim" ;
41
42
42
43
static bool vdpasim_blk_check_range (u64 start_sector , size_t range_size )
43
44
{
@@ -153,6 +154,20 @@ static bool vdpasim_blk_handle_req(struct vdpasim *vdpasim,
153
154
}
154
155
break ;
155
156
157
+ case VIRTIO_BLK_T_GET_ID :
158
+ bytes = vringh_iov_push_iotlb (& vq -> vring , & vq -> in_iov ,
159
+ vdpasim_blk_id ,
160
+ VIRTIO_BLK_ID_BYTES );
161
+ if (bytes < 0 ) {
162
+ dev_err (& vdpasim -> vdpa .dev ,
163
+ "vringh_iov_push_iotlb() error: %zd\n" , bytes );
164
+ status = VIRTIO_BLK_S_IOERR ;
165
+ break ;
166
+ }
167
+
168
+ pushed += bytes ;
169
+ break ;
170
+
156
171
default :
157
172
dev_warn (& vdpasim -> vdpa .dev ,
158
173
"Unsupported request type %d\n" , type );
You can’t perform that action at this time.
0 commit comments