[dpdk-dev] [PATCH v6 6/8] virtio: add vfio api to rd/wr ioport space

Yuanhan Liu yuanhan.liu at linux.intel.com
Mon Feb 1 13:48:45 CET 2016


On Fri, Jan 29, 2016 at 11:51:55PM +0530, Santosh Shukla wrote:
> For vfio case - Use pread/pwrite api to access virtio
> ioport space.
> 
> Signed-off-by: Santosh Shukla <sshukla at mvista.com>
> Signed-off-by: Rizwan Ansari <ransari at mvista.com>
> Signed-off-by: Rakesh Krishnamurthy <rakeshk at mvista.com>
> ---
> v5-->v6:
> - renamed inport_in/out to vfio_in/out
> - Renamed file from virtio_vfio_rw.h to virtio_vfio_io.h
> 
>  drivers/net/virtio/virtio_vfio_io.h |  104 +++++++++++++++++++++++++++++++++++
>  1 file changed, 104 insertions(+)
>  create mode 100644 drivers/net/virtio/virtio_vfio_io.h
> 
> diff --git a/drivers/net/virtio/virtio_vfio_io.h b/drivers/net/virtio/virtio_vfio_io.h
> new file mode 100644
> index 0000000..218d4ed
> --- /dev/null
> +++ b/drivers/net/virtio/virtio_vfio_io.h
...
> @@ -0,0 +1,104 @@
> +#ifndef _VIRTIO_VFIO_IO_H_
> +#define _VIRTIO_VFIO_IO_H_
> +
> +#include "virtio_logs.h"
> +#if defined(RTE_EAL_VFIO) && defined(RTE_LIBRTE_EAL_LINUXAPP)

Won't it cause build failure if above "#if ..." is false, as
virtio_read/write_reg_x() reference them unconditionally?

BTW, why above check is needed? We have rte_eal_pci_read/write_bar()
implementation with both VFIO and BSD, don't we?


> +#endif /* _VIRTIO_VFIO_RW_H_ */
                         ^^^^
You forgot to do rename here.


BTW, I didn't follow the noIOMMU discussion; how did it end? Do we still
need that? Is this patch a full story to enable virtio on ARM?

	--yliu


More information about the dev mailing list