vdpa/mlx5: map doorbell
authorMatan Azrad <matan@mellanox.com>
Sun, 2 Feb 2020 16:03:50 +0000 (16:03 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 5 Feb 2020 08:51:21 +0000 (09:51 +0100)
commit62c813706e41f8f6ca5672fcea0f6f0be6d905a4
treec5677e56064eeb8f7d02d125c1edfac16a73bb7b
parentaf72fdb546d5e8f7315fa25b7a47ab5450fe9bee
vdpa/mlx5: map doorbell

The HW supports only 4 bytes doorbell writing detection.
The virtio device set only 2 bytes when it rings the doorbell.

Map the virtio doorbell detected by the virtio queue kickfd to the HW
VAR space when it expects to get the virtio emulation doorbell.

Use the EAL interrupt mechanism to get notification when a new event
appears in kickfd by the guest and write 4 bytes to the HW doorbell space
in the notification callback.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/vdpa/mlx5/mlx5_vdpa.h
drivers/vdpa/mlx5/mlx5_vdpa_virtq.c