| c5736998 | 24-Mar-2022 |
Maxime Coquelin <[email protected]> |
vhost: fix missing virtqueue lock protection
This patch ensures virtqueue metadata are not being modified while rte_vhost_vring_call() is executed.
Fixes: 6c299bb7322f ("vhost: introduce vring call
vhost: fix missing virtqueue lock protection
This patch ensures virtqueue metadata are not being modified while rte_vhost_vring_call() is executed.
Fixes: 6c299bb7322f ("vhost: introduce vring call API") Cc: [email protected]
Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
| 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 ...
|
| 1419e8d9 | 08-Apr-2022 |
Xuan Ding <[email protected]> |
vhost: add unsafe API to check in-flight packets
In async data path, when vring state changes or device is destroyed, it is necessary to know the number of in-flight packets in DMA engine. This patc
vhost: add unsafe API to check in-flight packets
In async data path, when vring state changes or device is destroyed, it is necessary to know the number of in-flight packets in DMA engine. This patch provides a thread unsafe API to return the number of in-flight packets for a vhost queue without using any lock.
Signed-off-by: Xuan Ding <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| 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 ...
|
| 4f670c5a | 15-Feb-2022 |
Peng Yu <[email protected]> |
vhost: fix linker script syntax
The punctuation after the `global` keyword should be colon, not semicolon. The default gcc linker accepts both colon and semicolon, but the gold linker will report sy
vhost: fix linker script syntax
The punctuation after the `global` keyword should be colon, not semicolon. The default gcc linker accepts both colon and semicolon, but the gold linker will report syntax error if we use semicolon after the `global` keyword.
Fixes: 94c16e89d779 ("vhost: mark vDPA driver API as internal") Cc: [email protected]
Signed-off-by: Peng Yu <[email protected]> Reviewed-by: Chenbo Xia <[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 ...
|
| cedca408 | 16-Feb-2022 |
Brian Dooley <[email protected]> |
vhost: add missing C++ guards
Some public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
Fixes: d7280c9fffcb ("vhost: support s
vhost: add missing C++ guards
Some public header files were missing 'extern "C"' C++ guards, and couldn't be used by C++ applications. Add the missing guards.
Fixes: d7280c9fffcb ("vhost: support selective datapath") Fixes: 78639d54563a ("vhost: introduce async enqueue registration API") Fixes: 3bb595ecd682 ("vhost/crypto: add request handler") Fixes: 94c16e89d779 ("vhost: mark vDPA driver API as internal") Cc: [email protected]
Signed-off-by: Brian Dooley <[email protected]> Acked-by: Bruce Richardson <[email protected]> Reviewed-by: Chenbo Xia <[email protected]> Acked-by: Tyler Retzlaff <[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 ...
|
| 53d3f477 | 09-Feb-2022 |
Jiayu Hu <[email protected]> |
vhost: integrate dmadev in asynchronous data-path
Since dmadev is introduced in 21.11, to avoid the overhead of vhost DMA abstraction layer and simplify application logics, this patch integrates dma
vhost: integrate dmadev in asynchronous data-path
Since dmadev is introduced in 21.11, to avoid the overhead of vhost DMA abstraction layer and simplify application logics, this patch integrates dmadev in asynchronous data path.
Signed-off-by: Jiayu Hu <[email protected]> Signed-off-by: Sunil Pai G <[email protected]> Tested-by: Yvonne Yang <[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 ...
|
| 1d1126ad | 10-Feb-2022 |
Bruce Richardson <[email protected]> |
vhost: fix C++ include
The virtio kernel header includes are already noted as being incompatible with C++. We can ensure that the header is safe for inclusion in C++ code by not including those head
vhost: fix C++ include
The virtio kernel header includes are already noted as being incompatible with C++. We can ensure that the header is safe for inclusion in C++ code by not including those headers during C++ builds. While not ideal, this does ensure that all DPDK headers can be included in C++ code without errors.
Fixes: f8904d563691 ("vhost: fix header for strict compilation flags") Cc: [email protected]
Signed-off-by: Bruce Richardson <[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 ...
|
| 8b764f46 | 17-Jan-2022 |
Yuan Wang <[email protected]> |
vhost: fix guest to host physical address mapping
Async copy fails when looking up hpa in the gpa to hpa mapping table. This happens because the gpa is matched exactly in the merged mapping table, a
vhost: fix guest to host physical address mapping
Async copy fails when looking up hpa in the gpa to hpa mapping table. This happens because the gpa is matched exactly in the merged mapping table, and the merge loses the mapping entries. A new range comparison method is introduced to solve this issue.
Fixes: 6563cf92380a ("vhost: fix async copy on multi-page buffers") Cc: [email protected]
Signed-off-by: Yuan Wang <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| afd857cb | 26-Jan-2022 |
Maxime Coquelin <[email protected]> |
vhost: use proper logging type for data path
This patch changes type from config to data for functions called in the datapath.
Suggested-by: David Marchand <[email protected]> Signed-off-by
vhost: use proper logging type for data path
This patch changes type from config to data for functions called in the datapath.
Suggested-by: David Marchand <[email protected]> Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[email protected]> Reviewed-by: David Marchand <[email protected]>
show more ...
|
| d8472302 | 26-Jan-2022 |
Maxime Coquelin <[email protected]> |
vhost: differentiate IOTLB logs
Same logging messages were used for both IOTLB cache insertion failure and IOTLB pending insertion failure.
This patch differentiate them to ease logs analysis.
Sug
vhost: differentiate IOTLB logs
Same logging messages were used for both IOTLB cache insertion failure and IOTLB pending insertion failure.
This patch differentiate them to ease logs analysis.
Suggested-by: David Marchand <[email protected]> Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[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 ...
|
| 02798b07 | 26-Jan-2022 |
Maxime Coquelin <[email protected]> |
vhost: improve virtio-net layer logs
This patch standardizes logging done in Virtio-net, so that the Vhost-user socket path is always prepended to the logs. It will ease log analysis when multiple V
vhost: improve virtio-net layer logs
This patch standardizes logging done in Virtio-net, so that the Vhost-user socket path is always prepended to the logs. It will ease log analysis when multiple Vhost-user ports are in use.
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 ...
|