dm/VBS-U: implement virtio_vq_enable

Virtio modern changed the virtqueue cofiguration precedures. GPA
of descriptor table, available ring and used ring are written to
common configuration registers separately. A final write to
Q_ENABLE register triggered initialization of the virtqueue on
the backend device.

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:23:36 +08:00
committed by Jack Ren
parent 76422fd5f1
commit ce098260de
2 changed files with 36 additions and 2 deletions

View File

@@ -318,7 +318,8 @@ struct vring_used {
/* From section 2.3, "Virtqueue Configuration", of the virtio specification */
/**
* @brief Calculate size of a virtual ring.
* @brief Calculate size of a virtual ring, this interface is only valid for
* legacy virtio.
*
* @param qsz Size of raw data in a certain virtqueue.
*