host-drivers/base-driver/vca/vop/vop_vringh.c
static void vop_get(struct virtio_device *virtio_dev, unsigned int offset,
		    void *buf, unsigned len)
{
	struct vop_host_virtio_dev* host_virtio_dev =
		to_host_virtio_device(virtio_dev);
	struct vop_device *vdev =  host_virtio_dev->vdev;
	struct vca_device_desc *desc = host_virtio_dev->dd;

	dev_dbg(&vdev->dev, "%s offset %x\n", __func__, offset);

	if (offset + len > desc->config_len)
		return;
	memcpy(buf, vca_vq_configspace(desc) + offset, len);
}
/*
 * Reading and writing elements in config space
 */
Reading and writing elements in config space
Reading and writing elements in config space
static void vop_get(struct virtio_device *virtio_dev, unsigned int offset,
		    void *buf, unsigned len)
{
	struct vop_host_virtio_dev* host_virtio_dev =
		to_host_virtio_device(virtio_dev);
	struct vop_device *vdev =  host_virtio_dev->vdev;
	struct vca_device_desc *desc = host_virtio_dev->dd;
	dev_dbg(&vdev->dev, "%s offset %x\n", __func__, offset);
	if (offset + len > desc->config_len)
		return;
	memcpy(buf, vca_vq_configspace(desc) + offset, len);
}
static void vop_get ( struct virtio_device * virtio_dev , unsigned int offset , void * buf , unsigned len ) { struct vop_host_virtio_dev * host_virtio_dev = to_host_virtio_device ( virtio_dev ) ; struct vop_device * vdev = host_virtio_dev -> vdev ; struct vca_device_desc * desc = host_virtio_dev -> dd ; dev_dbg ( & vdev -> dev , " \n " , __func__ , offset ) ; if ( offset + len > desc -> config_len ) return ; memcpy ( buf , vca_vq_configspace ( desc ) + offset , len ) ; }
Reading and writing elements in config space
Reading and writing elements in config space