| #
09c28563 |
| 25-Apr-2022 |
David Marchand <[email protected]> |
vhost: validate FDs attached to messages
Some message handlers do not expect any file descriptor attached as ancillary data. Provide a common way to enforce this by adding a accepts_fd boolean in th
vhost: validate FDs attached to messages
Some message handlers do not expect any file descriptor attached as ancillary data. Provide a common way to enforce this by adding a accepts_fd boolean in the message handler structure. When a message handler sets accepts_fd to true, it is responsible for calling validate_msg_fds with a right expected file descriptor count. This will avoid leaking some file descriptor by mistake when adding support for new vhost user message types.
Signed-off-by: David Marchand <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
e4b12ba5 |
| 25-Apr-2022 |
David Marchand <[email protected]> |
vhost: refactor messages handlers declaration
Move message handler description and callbacks into a single array and remove unneeded VHOST_USER_MAX and VHOST_SLAVE_MAX enums.
Signed-off-by: David M
vhost: refactor messages handlers declaration
Move message handler description and callbacks into a single array and remove unneeded VHOST_USER_MAX and VHOST_SLAVE_MAX enums.
Signed-off-by: David Marchand <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
|
Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2, v22.03-rc1 |
|
| #
af74f7db |
| 18-Jan-2022 |
David Marchand <[email protected]> |
vhost: fix FD leak with inflight messages
Even if unlikely, a buggy vhost-user master might attach fds to inflight messages. Add checks like for other types of vhost-user messages.
Fixes: d87f1a1cb
vhost: fix FD leak with inflight messages
Even if unlikely, a buggy vhost-user master might attach fds to inflight messages. Add checks like for other types of vhost-user messages.
Fixes: d87f1a1cb7b6 ("vhost: support inflight info sharing") Cc: [email protected]
Signed-off-by: David Marchand <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
6442c329 |
| 14-Feb-2022 |
Chenbo Xia <[email protected]> |
vhost: fix queue number check when setting inflight FD
In function vhost_user_set_inflight_fd, queue number in inflight message is used to access virtqueue. However, queue number could be larger tha
vhost: fix queue number check when setting inflight FD
In function vhost_user_set_inflight_fd, queue number in inflight message is used to access virtqueue. However, queue number could be larger than VHOST_MAX_VRING and cause write OOB as this number will be used to write inflight info in virtqueue structure. This patch checks the queue number to avoid the issue and also make sure virtqueues are allocated before setting inflight information.
Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information") Cc: [email protected]
Reported-by: Wenxiang Qian <[email protected]> Signed-off-by: Chenbo Xia <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
762cdb7b |
| 08-Mar-2022 |
David Marchand <[email protected]> |
vhost: fix external message handlers
Following a rework, external message handlers were receiving a pointer to a vhost_user message (as stated in the API), but lost the ability to interact with fds
vhost: fix external message handlers
Following a rework, external message handlers were receiving a pointer to a vhost_user message (as stated in the API), but lost the ability to interact with fds attached to the message. Restore the original layout and put a build check and reminders.
Bugzilla ID: 953 Fixes: 5e0099dc709e ("vhost: remove payload size limitation")
Reported-by: Fan Zhang <[email protected]> Signed-off-by: David Marchand <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]> Tested-by: Jakub Poczatek <[email protected]> Acked-by: Jakub Poczatek <[email protected]> Reviewed-by: Christophe Fontaine <[email protected]>
show more ...
|
| #
04c27cb6 |
| 27-Jan-2022 |
Maxime Coquelin <[email protected]> |
vhost: fix unsafe vring addresses modifications
This patch adds missing protection around vring_invalidate and translate_ring_addresses calls in vhost_user_iotlb_msg.
Fixes: eefac9536a90 ("vhost: p
vhost: fix unsafe vring addresses modifications
This patch adds missing protection around vring_invalidate and translate_ring_addresses calls in vhost_user_iotlb_msg.
Fixes: eefac9536a90 ("vhost: postpone device creation until rings are mapped") Cc: [email protected]
Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
| #
52ade97e |
| 15-Feb-2022 |
Xuan Ding <[email protected]> |
vhost: fix physical address mapping
When choosing IOVA as PA mode, IOVA is likely to be discontinuous, which requires page by page mapping for DMA devices. To be consistent, this patch implements pa
vhost: fix physical address mapping
When choosing IOVA as PA mode, IOVA is likely to be discontinuous, which requires page by page mapping for DMA devices. To be consistent, this patch implements page by page mapping instead of mapping at the region granularity for both IOVA as VA and PA mode.
Fixes: 7c61fa08b716 ("vhost: enable IOMMU for async vhost") Cc: [email protected]
Signed-off-by: Xuan Ding <[email protected]> Signed-off-by: Yuan Wang <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
2ec35974 |
| 15-Feb-2022 |
Xuan Ding <[email protected]> |
vhost: fix field naming in guest page struct
This patch renames the host_phys_addr to host_iova in guest_page struct. The host_phys_addr is iova, it depends on the DPDK IOVA mode.
Fixes: e246896178
vhost: fix field naming in guest page struct
This patch renames the host_phys_addr to host_iova in guest_page struct. The host_phys_addr is iova, it depends on the DPDK IOVA mode.
Fixes: e246896178e6 ("vhost: get guest/host physical address mappings") Cc: [email protected]
Signed-off-by: Xuan Ding <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
30a1de10 |
| 15-Feb-2022 |
Sean Morrissey <[email protected]> |
lib: remove unneeded header includes
These header includes have been flagged by the iwyu_tool and removed.
Signed-off-by: Sean Morrissey <[email protected]>
|
| #
b474ce12 |
| 29-Jan-2022 |
Weiguo Li <[email protected]> |
vhost: fix null pointer dereference in NUMA realloc
Fixes: b53c9d20fa06 ("vhost: improve vhost-user layer logs")
Signed-off-by: Weiguo Li <[email protected]> Reviewed-by: Maxime Coquelin <maxime.c
vhost: fix null pointer dereference in NUMA realloc
Fixes: b53c9d20fa06 ("vhost: improve vhost-user layer logs")
Signed-off-by: Weiguo Li <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
67cdaea0 |
| 27-Jan-2022 |
Xueming Li <[email protected]> |
vhost: add vDPA resource cleanup callback
This patch adds vDPA device cleanup callback to release resources on vhost user connection close.
Signed-off-by: Xueming Li <[email protected]> Reviewed-
vhost: add vDPA resource cleanup callback
This patch adds vDPA device cleanup callback to release resources on vhost user connection close.
Signed-off-by: Xueming Li <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
06c047b6 |
| 09-Feb-2022 |
Stephen Hemminger <[email protected]> |
remove unnecessary null checks
Functions like free, rte_free, and rte_mempool_free already handle NULL pointer so the checks here are not necessary.
Remove redundant NULL pointer checks before free
remove unnecessary null checks
Functions like free, rte_free, and rte_mempool_free already handle NULL pointer so the checks here are not necessary.
Remove redundant NULL pointer checks before free functions found by nullfree.cocci
Signed-off-by: Stephen Hemminger <[email protected]>
show more ...
|
| #
5e0099dc |
| 07-Feb-2022 |
Christophe Fontaine <[email protected]> |
vhost: remove payload size limitation
FDs at the end of the VhostUserMessage structure limits the size of the payload. Move them to an other englobing structure, before the header & payload of a Vho
vhost: remove payload size limitation
FDs at the end of the VhostUserMessage structure limits the size of the payload. Move them to an other englobing structure, before the header & payload of a VhostUserMessage. Also removes a reference to fds in the VHUMsg structure defined in drivers/net/virtio/virtio_user/vhost_user.c
Signed-off-by: Christophe Fontaine <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
| #
5b030165 |
| 26-Jan-2022 |
Maxime Coquelin <[email protected]> |
vhost: remove multi-line logs
This patch replaces multi-lines logs in multiple single- line logs in order to ease logs filtering based on their socket path.
Signed-off-by: Maxime Coquelin <maxime.c
vhost: remove multi-line logs
This patch replaces multi-lines logs in multiple single- line logs in order to ease logs filtering based on their socket path.
Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
| #
c85c35b1 |
| 26-Jan-2022 |
Maxime Coquelin <[email protected]> |
vhost: improve socket layer logs
This patch adds the Vhost socket path whenever possible in order to make debugging possible when multiple Vhost devices are in use. Some vhost-user layer functions a
vhost: improve socket layer logs
This patch adds the Vhost socket path whenever possible in order to make debugging possible when multiple Vhost devices are in use. Some vhost-user layer functions are modified to pass the device path down to the socket layer.
Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
| #
b53c9d20 |
| 26-Jan-2022 |
Maxime Coquelin <[email protected]> |
vhost: improve vhost-user layer logs
This patch adds the Vhost-user socket path to Vhost-user layer logs in order to ease logs filtering.
Signed-off-by: Maxime Coquelin <[email protected]>
vhost: improve vhost-user layer logs
This patch adds the Vhost-user socket path to Vhost-user layer logs in order to ease logs filtering.
Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
| #
2d1c05c9 |
| 26-Jan-2022 |
Maxime Coquelin <[email protected]> |
vhost: improve IOTLB logs
This patch adds IOTLB mempool name when logging debug or error messages, and also prepends the socket path. to all the logs.
Signed-off-by: Maxime Coquelin <maxime.coqueli
vhost: improve IOTLB logs
This patch adds IOTLB mempool name when logging debug or error messages, and also prepends the socket path. to all the logs.
Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
| #
8974b6c7 |
| 14-Jan-2022 |
Andy Pei <[email protected]> |
vhost: add log when setting vring base
This patch adds log for vring related info in handling of vhost message VHOST_USER_SET_VRING_BASE, which will be useful in live migration case.
Signed-off-by:
vhost: add log when setting vring base
This patch adds log for vring related info in handling of vhost message VHOST_USER_SET_VRING_BASE, which will be useful in live migration case.
Signed-off-by: Andy Pei <[email protected]> Reviewed-by: Chenbo Xia <[email protected]>
show more ...
|
| #
7be78d02 |
| 29-Nov-2021 |
Josh Soref <[email protected]> |
fix spelling in comments and strings
The tool comes from https://github.com/jsoref
Signed-off-by: Josh Soref <[email protected]> Signed-off-by: Thomas Monjalon <[email protected]>
|
|
Revision tags: v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2 |
|
| #
ee8024b3 |
| 26-Oct-2021 |
Maxime Coquelin <[email protected]> |
vhost: move async data in dedicated structure
This patch moves async-related metadata from vhost_virtqueue to a dedicated struct. It makes it clear which fields are async related, and also saves som
vhost: move async data in dedicated structure
This patch moves async-related metadata from vhost_virtqueue to a dedicated struct. It makes it clear which fields are async related, and also saves some memory when async feature is not in use.
Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[email protected]> Reviewed-by: Jiayu Hu <[email protected]>
show more ...
|
| #
5fd6e93b |
| 27-Oct-2021 |
Xuan Ding <[email protected]> |
vhost: remove async DMA map status
Async DMA map status flag was added to prevent the unnecessary unmap when DMA devices bound to kernel driver. This brings maintenance cost for a lot of code. This
vhost: remove async DMA map status
Async DMA map status flag was added to prevent the unnecessary unmap when DMA devices bound to kernel driver. This brings maintenance cost for a lot of code. This patch removes the DMA map status by using rte_errno instead.
This patch relies on the following patch to fix a partial unmap check in vfio unmapping API. [1] https://www.mail-archive.com/[email protected]/msg226464.html
Signed-off-by: Xuan Ding <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
|
Revision tags: v21.11-rc1 |
|
| #
7c61fa08 |
| 11-Oct-2021 |
Xuan Ding <[email protected]> |
vhost: enable IOMMU for async vhost
The use of IOMMU has many advantages, such as isolation and address translation. This patch extends the capability of DMA engine to use IOMMU if the DMA engine is
vhost: enable IOMMU for async vhost
The use of IOMMU has many advantages, such as isolation and address translation. This patch extends the capability of DMA engine to use IOMMU if the DMA engine is bound to vfio.
When set memory table, the guest memory will be mapped into the default container of DPDK.
Signed-off-by: Xuan Ding <[email protected]> Tested-by: Yvonne Yang <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
e7cb7fdf |
| 27-Aug-2021 |
Eugenio Pérez <[email protected]> |
vhost: clean IOTLB cache on vring stop
Old IOVA cache entries are left when there is a change on virtio driver in VM. In case that all these old entries have iova addresses lesser than new iova entr
vhost: clean IOTLB cache on vring stop
Old IOVA cache entries are left when there is a change on virtio driver in VM. In case that all these old entries have iova addresses lesser than new iova entries, vhost code will need to iterate all the cache to find the new ones. In case of just a new iova entry needed for the new translations, this condition will last forever.
This has been observed in virtio-net to testpmd's vfio-pci driver transition, reducing the performance from more than 10Mpps to less than 0.07Mpps if the hugepage address was higher than the networking buffers. Since all new buffers are contained in this new gigantic page, vhost needs to scan IOTLB_CACHE_SIZE - 1 for each translation at worst.
Fixes: 69c90e98f483 ("vhost: enable IOMMU support") Cc: [email protected]
Signed-off-by: Eugenio Pérez <[email protected]> Reported-by: Pei Zhang <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[email protected]>
show more ...
|
| #
c2c4f87b |
| 25-Aug-2021 |
Aman Deep Singh <[email protected]> |
net: add macro for MAC address print
Added macro to print six bytes of MAC address. The MAC addresses will be printed in upper case hexadecimal format. In case there is a specific check for lower ca
net: add macro for MAC address print
Added macro to print six bytes of MAC address. The MAC addresses will be printed in upper case hexadecimal format. In case there is a specific check for lower case MAC address, the user may need to make a change in such test case after this patch.
Signed-off-by: Aman Deep Singh <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
|
Revision tags: v21.08, v21.08-rc4, v21.08-rc3 |
|
| #
3c929a0b |
| 26-Jul-2021 |
Maxime Coquelin <[email protected]> |
vhost: fix crash on reconnect
When the vhost-user frontend like Virtio-user tries to reconnect to the restarted Vhost backend, the Vhost backend segfaults when multiqueue is enabled.
This is caused
vhost: fix crash on reconnect
When the vhost-user frontend like Virtio-user tries to reconnect to the restarted Vhost backend, the Vhost backend segfaults when multiqueue is enabled.
This is caused by VHOST_USER_GET_VRING_BASE being called for a virtqueue that has not been created before, causing a NULL pointer dereferencing.
This patch adds the VHOST_USER_GET_VRING_BASE requests to the list of requests that trigger queue pair allocations.
Fixes: 160cbc815b41 ("vhost: remove a hack on queue allocation") Cc: [email protected]
Reported-by: Yinan Wang <[email protected]> Signed-off-by: Maxime Coquelin <[email protected]> Tested-by: Yinan Wang <[email protected]> Reviewed-by: Chenbo Xia <[email protected]>
show more ...
|