[PATCH] net/passt: Fix build failure due to missing GIO dependency

2025-07-18 Thread Laurent Vivier
defined reference to `g_subprocess_get_exit_status' Fix this by adding an explicit weson dependency on GIO for the passt option. The existing dependency on linux is kept because passt is only available on this OS. Reported-by: Thomas Huth Signed-off-by: Laurent Vivier --- meson.build | 1 + 1

[PATCH 2/6] net/vhost-user: Remove unused "err" from net_vhost_user_event() (CID 1612372)

2025-07-17 Thread Laurent Vivier
The "err" variable was declared but never used within the net_vhost_user_event() function. This resulted in a dead code warning (CID 1612372) from Coverity. Remove the unused variable and the associated error block to resolve the issue. Signed-off-by: Laurent Vivier --- net/vhost-

[PATCH 1/6] net/passt: Remove unused "err" from passt_vhost_user_event() (CID 1612375)

2025-07-17 Thread Laurent Vivier
The "err" variable was declared but never used within the passt_vhost_user_event() function. This resulted in a dead code warning (CID 1612375) from Coverity. Remove the unused variable and the associated error block to resolve the issue. Signed-off-by: Laurent Vivier --- net/p

[PATCH 6/6] net/vhost-user: Remove unused "err" from chr_closed_bh() (CID 1612365)

2025-07-17 Thread Laurent Vivier
The "err" variable was declared but never used within the chr_closed_bh() function. This resulted in a dead code warning (CID 1612365) from Coverity. Remove the unused variable and the associated error block to resolve the issue. Signed-off-by: Laurent Vivier --- net/vhost-user.c |

[PATCH 5/6] net/passt: Initialize "error" variable in net_passt_send() (CID 1612368)

2025-07-17 Thread Laurent Vivier
This was flagged by Coverity as a memory illegal access. Initialize the pointer to NULL at declaration. Signed-off-by: Laurent Vivier --- net/passt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/passt.c b/net/passt.c index 43c336e5968c..32ecffb763b4 100644 --- a/net

[PATCH 3/6] net/passt: Remove dead code in passt_vhost_user_start error path (CID 1612371)

2025-07-17 Thread Laurent Vivier
code, as reported by Coverity (CID 1612371). Refactor the error handling to occur inline, removing the goto and the unreachable cleanup block. Signed-off-by: Laurent Vivier --- net/passt.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/net/passt.c b/net/passt.c in

[PATCH 4/6] net/passt: Check return value of g_remove() in net_passt_cleanup() (CID 1612369)

2025-07-17 Thread Laurent Vivier
If g_remove() fails, use warn_report() to log an error. Signed-off-by: Laurent Vivier --- net/passt.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/passt.c b/net/passt.c index ef59d0682be1..43c336e5968c 100644 --- a/net/passt.c +++ b/net/passt.c @@ -103,7 +103,10

[PATCH 0/6] net: Fix various Coverity issues in vhost-user and passt

2025-07-17 Thread Laurent Vivier
ial errors. Laurent Vivier (6): net/passt: Remove unused "err" from passt_vhost_user_event() (CID 1612375) net/vhost-user: Remove unused "err" from net_vhost_user_event() (CID 1612372) net/passt: Remove dead code in passt_vhost_user_start error path (CID 1612

Re: [PULL V2 12/16] net: Add passt network backend

2025-07-17 Thread Laurent Vivier
On 17/07/2025 11:28, Peter Maydell wrote: On Tue, 15 Jul 2025 at 05:42, Jason Wang wrote: From: Laurent Vivier This commit introduces support for passt as a new network backend. passt is an unprivileged, user-mode networking solution that provides connectivity for virtual machines by

Re: [PATCH qemu 1/2] Don't reverse bFLT endianess when not needed

2025-07-16 Thread Laurent Vivier
Le 16/07/2025 à 21:24, ~wojtekka a écrit : From: Wojtek Kaniewski bFLT format is big-endian. get_user_ual() returns host value so for little-endian target and little-endian host it's necessary to reverse words using ntohl(). For big-endian targets we end up with incorrect endianess: $

[PATCH v4 02/11] net: Define net_client_set_link()

2025-07-09 Thread Laurent Vivier
calls the new function. The vhost-user implementation is updated to use net_client_set_link() directly, thereby eliminating the unnecessary client lookup. Signed-off-by: Laurent Vivier --- include/net/net.h | 1 + net/net.c | 32 net/vhost-user.c | 4

[PATCH v4 04/11] net: Add get_vhost_net callback to NetClientInfo

2025-07-09 Thread Laurent Vivier
tInfo struct. The central get_vhost_net() function is now a simple, generic dispatcher that invokes the callback provided by the net client. Each backend now implements its own private getter and registers it in its NetClientInfo. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c

[PATCH v4 08/11] net: Allow network backends to advertise max TX queue size

2025-07-09 Thread Laurent Vivier
supported maximum transmit queue size directly. The virtio_net_max_tx_queue_size() function now retrieves the max TX queue size from the vhost_net struct, if available and set. Otherwise, it defaults to VIRTIO_NET_TX_QUEUE_DEFAULT_SIZE. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c

[PATCH v4 00/11] net: Add passt netdev backend

2025-07-09 Thread Laurent Vivier
fix conflict with 837b87c4c5ba ("net/stream: skip automatic zero-init of large array") - add path parameter to provide path of passt if it is not in PATH - add 2 patches: "net: Allow network backends to advertise max TX queue size" "net: Consolidat

[PATCH v4 09/11] net: Add is_vhost_user flag to vhost_net struct

2025-07-09 Thread Laurent Vivier
' with the new flag. It improves readability and encapsulates the backend type information directly within the vhost_net instance. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c| 3 ++- hw/net/virtio-net.c | 8 ++-- include/hw/virtio/vhost.h | 1 + include/net/vhost

[PATCH v4 06/11] net: Add get_acked_features callback to VhostNetOptions

2025-07-09 Thread Laurent Vivier
dependency. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c | 6 ++ include/net/vhost-user.h | 2 -- include/net/vhost_net.h | 3 +++ net/tap.c| 1 + net/vhost-user.c | 4 +++- net/vhost-vdpa.c | 1 + 6 files changed, 10 insertions(+), 7 deletions

[PATCH v4 07/11] net: Add save_acked_features callback to vhost_net

2025-07-09 Thread Laurent Vivier
implementation. This cleanup allows for the complete removal of the net/vhost-user.h header file. Signed-off-by: Laurent Vivier --- hw/net/vhost_net-stub.c | 1 - hw/net/vhost_net.c| 10 +- include/hw/virtio/vhost.h | 2 ++ include/net/vhost-user.h | 16 include/net

[PATCH v4 03/11] vhost_net: Rename vhost_set_vring_enable() for clarity

2025-07-09 Thread Laurent Vivier
-vhost.c, it has been renamed to vhost_net_set_vring_enable(). This clarifies that the function belongs to the vhost_net module. Signed-off-by: Laurent Vivier --- hw/net/vhost_net-stub.c | 2 +- hw/net/vhost_net.c | 4 ++-- hw/net/virtio-net.c | 4 ++-- include/net/vhost_net.h | 2 +- 4 files

[PATCH v4 01/11] net: Refactor stream logic for reuse in '-net passt'

2025-07-09 Thread Laurent Vivier
StreamData struct. This allows callers to provide their own specific implementations while reusing the common connection and data transfer logic. Signed-off-by: Laurent Vivier --- net/meson.build | 3 +- net/stream.c | 282 +++--- net/stream_da

[PATCH v4 11/11] net/passt: Implement vhost-user backend support

2025-07-09 Thread Laurent Vivier
using the vhost-user protocol. This offloads the datapath from the main QEMU loop, significantly improving network performance. When the vhost-user=on option is used with -netdev passt, the new vhost initialization path is taken instead of the standard stream-based connection. Signed-off-by: La

[PATCH v4 10/11] net: Add passt network backend

2025-07-09 Thread Laurent Vivier
-off-by: Laurent Vivier --- docs/system/devices/net.rst | 40 +++- hmp-commands.hx | 3 + meson.build | 6 + meson_options.txt | 2 + net/clients.h | 4 + net/hub.c | 3 + net/meson.build | 3

[PATCH v4 05/11] net: Consolidate vhost feature bits into vhost_net structure

2025-07-09 Thread Laurent Vivier
-user, and vhost-vdpa). This patch moves the definition of vhost feature bits directly into the vhost_net structure for each relevant network client. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c| 90 ++- include/hw/virtio/vhost.h | 1 + include

[PATCH v3 07/11] net: Add save_acked_features callback to vhost_net

2025-07-07 Thread Laurent Vivier
implementation. This cleanup allows for the complete removal of the net/vhost-user.h header file. Signed-off-by: Laurent Vivier --- hw/net/vhost_net-stub.c | 1 - hw/net/vhost_net.c| 10 +- include/hw/virtio/vhost.h | 2 ++ include/net/vhost-user.h | 16 include/net

[PATCH v3 01/11] net: Refactor stream logic for reuse in '-net passt'

2025-07-07 Thread Laurent Vivier
StreamData struct. This allows callers to provide their own specific implementations while reusing the common connection and data transfer logic. Signed-off-by: Laurent Vivier --- net/meson.build | 3 +- net/stream.c | 282 +++--- net/stream_da

[PATCH v3 09/11] net: Add is_vhost_user flag to vhost_net struct

2025-07-07 Thread Laurent Vivier
' with the new flag. It improves readability and encapsulates the backend type information directly within the vhost_net instance. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c| 3 ++- hw/net/virtio-net.c | 8 ++-- include/hw/virtio/vhost.h | 1 + include/net/vhost

[PATCH v3 03/11] vhost_net: Rename vhost_set_vring_enable() for clarity

2025-07-07 Thread Laurent Vivier
-vhost.c, it has been renamed to vhost_net_set_vring_enable(). This clarifies that the function belongs to the vhost_net module. Signed-off-by: Laurent Vivier --- hw/net/vhost_net-stub.c | 2 +- hw/net/vhost_net.c | 4 ++-- hw/net/virtio-net.c | 4 ++-- include/net/vhost_net.h | 2 +- 4 files

[PATCH v3 10/11] net: Add passt network backend

2025-07-07 Thread Laurent Vivier
-off-by: Laurent Vivier --- docs/system/devices/net.rst | 40 +- hmp-commands.hx | 3 + meson.build | 6 + meson_options.txt | 2 + net/clients.h | 4 + net/hub.c | 3 + net/meson.build

[PATCH v3 11/11] net/passt: Implement vhost-user backend support

2025-07-07 Thread Laurent Vivier
using the vhost-user protocol. This offloads the datapath from the main QEMU loop, significantly improving network performance. When the vhost-user=on option is used with -netdev passt, the new vhost initialization path is taken instead of the standard stream-based connection. Signed-off-by: La

[PATCH v3 00/11] net: Add passt netdev backend

2025-07-07 Thread Laurent Vivier
) - add path parameter to provide path of passt if it is not in PATH - add 2 patches: "net: Allow network backends to advertise max TX queue size" "net: Consolidate vhost feature bits into NetClientInfo" Thanks, Laurent Laurent Vivier (11): net: Refactor stre

[PATCH v3 05/11] net: Consolidate vhost feature bits into vhost_net structure

2025-07-07 Thread Laurent Vivier
-user, and vhost-vdpa). This patch moves the definition of vhost feature bits directly into the vhost_net structure for each relevant network client. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c| 90 ++- include/hw/virtio/vhost.h | 1 + include

[PATCH v3 08/11] net: Allow network backends to advertise max TX queue size

2025-07-07 Thread Laurent Vivier
supported maximum transmit queue size directly. The virtio_net_max_tx_queue_size() function now retrieves the max TX queue size from the vhost_net struct, if available and set. Otherwise, it defaults to VIRTIO_NET_TX_QUEUE_DEFAULT_SIZE. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c

[PATCH v3 06/11] net: Add get_acked_features callback to VhostNetOptions

2025-07-07 Thread Laurent Vivier
dependency. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c | 6 ++ include/net/vhost-user.h | 2 -- include/net/vhost_net.h | 3 +++ net/tap.c| 1 + net/vhost-user.c | 4 +++- net/vhost-vdpa.c | 1 + 6 files changed, 10 insertions(+), 7 deletions

[PATCH v3 02/11] net: Define net_client_set_link()

2025-07-07 Thread Laurent Vivier
calls the new function. The vhost-user implementation is updated to use net_client_set_link() directly, thereby eliminating the unnecessary client lookup. Signed-off-by: Laurent Vivier --- include/net/net.h | 1 + net/net.c | 32 net/vhost-user.c | 4

[PATCH v3 04/11] net: Add get_vhost_net callback to NetClientInfo

2025-07-07 Thread Laurent Vivier
tInfo struct. The central get_vhost_net() function is now a simple, generic dispatcher that invokes the callback provided by the net client. Each backend now implements its own private getter and registers it in its NetClientInfo. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c

Re: [PATCH v2 09/10] net: Add passt network backend

2025-07-01 Thread Laurent Vivier
On 01/07/2025 03:46, Jason Wang wrote: On Wed, Jun 18, 2025 at 11:58 PM Laurent Vivier wrote: This commit introduces support for passt as a new network backend. passt is an unprivileged, user-mode networking solution that provides connectivity for virtual machines by launching an external

Re: [PATCH v2 09/10] net: Add passt network backend

2025-06-25 Thread Laurent Vivier
On 24/06/2025 14:03, Daniel P. Berrangé wrote: On Tue, Jun 24, 2025 at 01:55:20PM +0200, Markus Armbruster wrote: Laurent Vivier writes: On 24/06/2025 10:16, Markus Armbruster wrote: Laurent Vivier writes: This commit introduces support for passt as a new network backend. passt is an

Re: [PATCH v2 09/10] net: Add passt network backend

2025-06-24 Thread Laurent Vivier
On 24/06/2025 10:16, Markus Armbruster wrote: Laurent Vivier writes: This commit introduces support for passt as a new network backend. passt is an unprivileged, user-mode networking solution that provides connectivity for virtual machines by launching an external helper process. The

Re: [PATCH 0/8] net: Add passt netdev backend

2025-06-23 Thread Laurent Vivier
On 23/06/2025 10:03, Jason Wang wrote: On Wed, Jun 18, 2025 at 4:39 PM Laurent Vivier wrote: This series introduces support for passt as a new network backend for QEMU. passt is a modern, unprivileged, user-mode networking solution that provides guest connectivity by launching an external

[PATCH v2 06/10] net: Add get_acked_features callback to NetClientInfo

2025-06-18 Thread Laurent Vivier
is updated to provide this callback, and its getter function is now static. The call site in vhost_net.c is simplified to use the new generic helper, removing the type check and the direct dependency. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c | 18 +++--- include/net

[PATCH v2 05/10] net: Consolidate vhost feature bits into NetClientInfo

2025-06-18 Thread Laurent Vivier
n the future without modifying core vhost logic. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c | 80 ++-- include/net/net.h| 1 + include/net/vhost-vdpa.h | 2 - net/tap.c| 19 ++ net/vhost-user.c

[PATCH v2 02/10] net: Define net_client_set_link()

2025-06-18 Thread Laurent Vivier
calls the new function. The vhost-user implementation is updated to use net_client_set_link() directly, thereby eliminating the unnecessary client lookup. Signed-off-by: Laurent Vivier --- include/net/net.h | 1 + net/net.c | 32 net/vhost-user.c | 4

[PATCH v2 07/10] net: Add save_acked_features callback to NetClientInfo

2025-06-18 Thread Laurent Vivier
-user implementation. This cleanup allows for the complete removal of the net/vhost-user.h header file. Signed-off-by: Laurent Vivier --- hw/net/vhost_net-stub.c | 1 - hw/net/vhost_net.c | 7 ++- include/net/net.h| 2 ++ include/net/vhost-user.h | 16 net

[PATCH v2 09/10] net: Add passt network backend

2025-06-18 Thread Laurent Vivier
-off-by: Laurent Vivier --- hmp-commands.hx | 3 + meson.build | 6 + meson_options.txt | 2 + net/clients.h | 4 + net/hub.c | 3 + net/meson.build | 3 + net/net.c | 4 + net/passt.c | 434 ++ qapi

[PATCH v2 00/10] net: Add passt netdev backend

2025-06-18 Thread Laurent Vivier
not in PATH - add 2 patches: "net: Allow network backends to advertise max TX queue size" "net: Consolidate vhost feature bits into NetClientInfo" Thanks, Laurent Laurent Vivier (10): net: Refactor stream logic for reuse in '-net passt' net: Defi

[PATCH v2 01/10] net: Refactor stream logic for reuse in '-net passt'

2025-06-18 Thread Laurent Vivier
StreamData struct. This allows callers to provide their own specific implementations while reusing the common connection and data transfer logic. Signed-off-by: Laurent Vivier --- net/meson.build | 3 +- net/stream.c | 282 +++--- net/stream_da

[PATCH v2 03/10] net: Introduce helper to identify vhost-user clients

2025-06-18 Thread Laurent Vivier
pointer in the NetClientInfo structure, which is implemented by the vhost-user backend. All existing direct checks are replaced with calls to the new helper. This simplifies the logic in vhost_net.c and virtio-net.c, making the code cleaner and more maintainable. Signed-off-by: Laurent Vivier

[PATCH v2 10/10] net/passt: Implement vhost-user backend support

2025-06-18 Thread Laurent Vivier
When the vhost-user=on option is used with -netdev passt, the new vhost initialization path is taken instead of the standard stream-based connection. Signed-off-by: Laurent Vivier --- net/passt.c | 334 1 file changed, 334 insertions(+) diff --

[PATCH v2 04/10] net: Add get_vhost_net callback to NetClientInfo

2025-06-18 Thread Laurent Vivier
tInfo struct. The central get_vhost_net() function is now a simple, generic dispatcher that invokes the callback provided by the net client. Each backend now implements its own private getter and registers it in its NetClientInfo. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c

[PATCH v2 08/10] net: Allow network backends to advertise max TX queue size

2025-06-18 Thread Laurent Vivier
supported maximum transmit queue size directly. This change centralizes the configuration of transmit queue sizes, simplifying the virtio-net driver and making it easier to integrate new network backends with diverse queue size capabilities. Signed-off-by: Laurent Vivier --- hw/net/virtio-net.c

[PATCH 5/8] net: Add get_acked_features callback to NetClientInfo

2025-06-18 Thread Laurent Vivier
is updated to provide this callback, and its getter function is now static. The call site in vhost_net.c is simplified to use the new generic helper, removing the type check and the direct dependency. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c | 18 +++--- include/net

[PATCH 0/8] net: Add passt netdev backend

2025-06-18 Thread Laurent Vivier
ytes 32.0 Gbits/sec receiver Thanks, Laurent Laurent Vivier (8): net: Refactor stream logic for reuse in '-net passt' net: Define net_client_set_link() net: Introduce helper to identify vhost-user clients net: Add get_vhost_net callback to NetClientInfo net: Add get_acked_feat

[PATCH 1/8] net: Refactor stream logic for reuse in '-net passt'

2025-06-18 Thread Laurent Vivier
StreamData struct. This allows callers to provide their own specific implementations while reusing the common connection and data transfer logic. Signed-off-by: Laurent Vivier --- net/meson.build | 3 +- net/stream.c | 282 +++--- net/stream_da

[PATCH 7/8] net: Add passt network backend

2025-06-18 Thread Laurent Vivier
-off-by: Laurent Vivier --- hmp-commands.hx | 3 + meson.build | 6 + meson_options.txt | 2 + net/clients.h | 4 + net/hub.c | 3 + net/meson.build | 3 + net/net.c | 4 + net/passt.c | 430 ++ qapi

[PATCH 4/8] net: Add get_vhost_net callback to NetClientInfo

2025-06-18 Thread Laurent Vivier
tInfo struct. The central get_vhost_net() function is now a simple, generic dispatcher that invokes the callback provided by the net client. Each backend now implements its own private getter and registers it in its NetClientInfo. Signed-off-by: Laurent Vivier --- hw/net/vhost_net.c

[PATCH 8/8] net/passt: Implement vhost-user backend support

2025-06-18 Thread Laurent Vivier
When the vhost-user=on option is used with -netdev passt, the new vhost initialization path is taken instead of the standard stream-based connection. Signed-off-by: Laurent Vivier --- net/passt.c | 288 1 file changed, 288 insertions(+) diff --

[PATCH 3/8] net: Introduce helper to identify vhost-user clients

2025-06-18 Thread Laurent Vivier
pointer in the NetClientInfo structure, which is implemented by the vhost-user backend. All existing direct checks are replaced with calls to the new helper. This simplifies the logic in vhost_net.c and virtio-net.c, making the code cleaner and more maintainable. Signed-off-by: Laurent Vivier

[PATCH 6/8] net: Add save_acked_features callback to NetClientInfo

2025-06-18 Thread Laurent Vivier
-user implementation. This cleanup allows for the complete removal of the net/vhost-user.h header file. Signed-off-by: Laurent Vivier --- hw/net/vhost_net-stub.c | 1 - hw/net/vhost_net.c | 7 ++- include/net/net.h| 2 ++ include/net/vhost-user.h | 16 net

[PATCH 2/8] net: Define net_client_set_link()

2025-06-18 Thread Laurent Vivier
calls the new function. The vhost-user implementation is updated to use net_client_set_link() directly, thereby eliminating the unnecessary client lookup. Signed-off-by: Laurent Vivier --- include/net/net.h | 1 + net/net.c | 32 net/vhost-user.c | 4

Re: [PATCH] Fixes: failed to call mq_open/mq_unlink in qemu-arm

2025-06-06 Thread Laurent Vivier
Le 05/06/2025 à 16:46, Zhang He a écrit : i write some bare-metal c code need mq_open/mq_unlink syscall, but the syscall failed in passed name param check, arg1 in this scenario is the correct address from user-space, arg1 - 1 not. i have tested in arm cortex-m55 cpu model, maybe should add condi

Re: [PATCH v1] tests/qtest/aspeed_smc-test: Fix memory leaks

2025-05-13 Thread Laurent Vivier
(ast1030_evb_data.tmp_path); +g_free(palmetto_data.tmp_path); +g_free(ast2500_evb_data.tmp_path); +g_free(ast2600_evb_data.tmp_path); +g_free(ast1030_evb_data.tmp_path); + return ret; } Reviewed-by: Laurent Vivier

Re: [PATCH v15 2/6] qmp: add QMP command x-query-virtio-status

2025-05-05 Thread Laurent Vivier
On 05/05/2025 08:30, Thomas Huth wrote: On 02/05/2025 00.09, Philippe Mathieu-Daudé wrote: Hello, (patch merged as commit 90c066cd682). On 11/8/22 14:24, Jonah Palmer wrote: From: Laurent Vivier This new command shows the status of a VirtIODevice, including its corresponding vhost device&#

Re: [PATCH v2] Running with `--enable-ubsan` leads to a qtest failure:

2025-04-30 Thread Laurent Vivier
| -le16_to_cpu(*(uint16_t *)(address + 4))); +lduw_le_p((uint16_t *)(address + 4))); /* Set supported receive descriptor mode */ e1000e_macreg_write(&d->e1000e, Reviewed-by: Laurent Vivier Tested-by: Laurent Vivier

Re: [PATCH] tests/qtest/libqos: Fix UBSan misalignment finding

2025-04-29 Thread Laurent Vivier
On 28/04/2025 23:20, Nabih Estefan wrote: Running with `--enable-ubsan` leads to a qtest failure: ``` ../tests/qtest/libqos/igb.c:106:5: runtime error: load of misaligned address 0x562040be8e33 for type 'uint32_t', which requires 4 byte alignment ``` Instead of straight casting the uint8_t array

Re: [PATCH v2] docs: Explain how to use passt

2025-03-20 Thread Laurent Vivier
Hi, I think it could be interesting to have this information in the current release. Thanks, Laurent On 14/03/2025 09:43, Laurent Vivier wrote: cc: trivial On 11/03/2025 14:27, Laurent Vivier wrote: Add a chapter to explain how to use passt(1) instead of '-net user'. passt

[PATCH] docs: Explain how to use passt

2025-03-15 Thread Laurent Vivier
oject/qemu/-/issues/2827 Signed-off-by: Laurent Vivier --- docs/system/devices/net.rst | 93 + 1 file changed, 93 insertions(+) diff --git a/docs/system/devices/net.rst b/docs/system/devices/net.rst index 2ab516d4b097..5f70b1039198 100644 --- a/docs/syst

Re: [PATCH v2] docs: Explain how to use passt

2025-03-15 Thread Laurent Vivier
cc: trivial On 11/03/2025 14:27, Laurent Vivier wrote: Add a chapter to explain how to use passt(1) instead of '-net user'. passt(1) can be connected to QEMU using UNIX socket or vhost-user. With vhost-user, migration of the VM is allowed and internal state of passt(1) is transfere

[PATCH v2] docs: Explain how to use passt

2025-03-11 Thread Laurent Vivier
oject/qemu/-/issues/2827 Signed-off-by: Laurent Vivier --- docs/system/devices/net.rst | 100 1 file changed, 100 insertions(+) diff --git a/docs/system/devices/net.rst b/docs/system/devices/net.rst index 2ab516d4b097..a3efbdcabd1a 100644 --- a/docs/syst

Re: [PATCH v2 3/3] binfmt: Add --ignore-family option

2025-02-20 Thread Laurent Vivier
,preserve-argv0:,ignore-family:" +options=$(getopt -o ds:Q:S:e:hc:p:g:F:i: -l ${_longopts} -- "$@") eval set -- "$options" while true ; do @@ -418,6 +427,10 @@ while true ; do shift PRESERVE_ARG0="$1" ;; + -i|--ignore-family) +shift +IGNORE_FAMILY="$1" +;; *) break ;; Reviewed-by: Laurent Vivier

Re: [PATCH v2 2/3] binfmt: Normalize host CPU architecture

2025-02-20 Thread Laurent Vivier
*) echo "$cpu" @@ -309,7 +309,13 @@ EOF qemu_set_binfmts() { # probe cpu type -host_family=$(qemu_get_family) +host_cpu=$(qemu_normalize ${HOST_ARCH:-$(uname -m)}) +host_family=$(eval echo \$${host_cpu}_family) + +if [ "$host_family" = "" ] ; then +echo "INTERNAL ERROR: unknown host cpu $host_cpu" 1>&2 +exit 1 +fi # register the interpreter for each cpu except for the native one Reviewed-by: Laurent Vivier

Re: [PATCH v2 1/3] binfmt: Shuffle things around

2025-02-20 Thread Laurent Vivier
-qemu="$QEMU_PATH/qemu-i386" +if [ "$host_family" = "$family" ] ; then +continue fi -qemu="$qemu$QEMU_SUFFIX" -if [ "$host_family" != "$family" ] ; then -$BINFMT_SET -fi +$BINFMT_SET done } Reviewed-by: Laurent Vivier

Re: [PATCH v4] net: vhost-user: add QAPI events to report connection state

2025-02-18 Thread Laurent Vivier
On 18/02/2025 08:50, Markus Armbruster wrote: Laurent Vivier writes: The netdev reports NETDEV_VHOST_USER_CONNECTED event when the chardev is connected, and NETDEV_VHOST_USER_DISCONNECTED when it is disconnected. The NETDEV_VHOST_USER_CONNECTED event includes the chardev id. This allows a

Re: [PATCH] net: vhost-user: add QAPI events to report connection state

2025-02-17 Thread Laurent Vivier
On 14/02/2025 15:19, Daniel P. Berrangé wrote: On Fri, Feb 14, 2025 at 01:59:20PM +, Daniel P. Berrangé wrote: On Fri, Feb 14, 2025 at 11:18:55AM +0100, Laurent Vivier wrote: On 14/02/2025 11:06, Markus Armbruster wrote: Laurent Vivier writes: The netdev reports

[PATCH v4] net: vhost-user: add QAPI events to report connection state

2025-02-17 Thread Laurent Vivier
t;: { "netdev-id": "netdev0" } } [automatic reconnection with reconnect-ms] { "timestamp": { "seconds": 1739538638, "microseconds": 354181 }, "event": "NETDEV_VHOST_USER_CONNECTED", "data": { "netdev-id":

[PATCH v3] net: vhost-user: add QAPI events to report connection state

2025-02-14 Thread Laurent Vivier
t;: { "netdev-id": "netdev0" } } [automatic reconnection with reconnect-ms] { "timestamp": { "seconds": 1739538638, "microseconds": 354181 }, "event": "NETDEV_VHOST_USER_CONNECTED", "data": { "netdev-id": &qu

Re: [PATCH] net: vhost-user: add QAPI events to report connection state

2025-02-14 Thread Laurent Vivier
On 14/02/2025 11:06, Markus Armbruster wrote: Laurent Vivier writes: The netdev reports NETDEV_VHOST_USER_CONNECTED event when the chardev is connected, and NETDEV_VHOST_USER_DISCONNECTED when it is disconnected. The NETDEV_VHOST_USER_CONNECTED event includes the ChardevInfo (label, filename

[PATCH v2] net: vhost-user: add QAPI events to report connection state

2025-02-14 Thread Laurent Vivier
"data": { "netdev-id": "netdev0", "info": { "frontend-open": true, "filename": "unix:", "label": "chr0" } } } Tested-by: Stefano Brivio Signed-off-by: Laur

[PATCH] net: vhost-user: add QAPI events to report connection state

2025-02-13 Thread Laurent Vivier
"data": { "netdev-id": "netdev0", "info": { "frontend-open": true, "filename": "unix:", "label": "chr0" } } } Signed-off-by: Laurent Vivier --- qapi/char.

Re: [PATCH 0/2] net: Fix announce_self with vhost

2025-02-02 Thread Laurent Vivier
Le 01/02/2025 à 20:36, Michael Tokarev a écrit : 17.01.2025 17:05, Laurent Vivier wrote: CC: qemu-stable and qemu-trivial. On 17/01/2025 12:17, Laurent Vivier wrote: announce_self that sends a RARP packet after migration or with announce_self QMP/HMP command doesn't work with vhost becau

Re: [PATCH 0/2] net: Fix announce_self with vhost

2025-01-30 Thread Laurent Vivier
On 18/01/2025 21:20, Michael Tokarev wrote: 17.01.2025 14:17, Laurent Vivier wrote: announce_self that sends a RARP packet after migration or with announce_self QMP/HMP command doesn't work with vhost because of the vnet headers. announce_self is the only user of QEMU_NET_PACKET_FLAG_RA

Re: [PATCH v4 1/7] linux-user: netlink: Add missing IFA_PROTO to host_to_target_data_addr_rtattr()

2025-01-23 Thread Laurent Vivier
Le 22/01/2025 à 22:20, Helge Deller a écrit : * Laurent Vivier : [...] It would be cleaner to replace all the IFA_XXX by their QEMU_IFA_XXX. Thanks for review, Laurent! Below I've merged patch #1 and #7, as suggested by you. Is this OK? Yes, thanks Can you review? Reviewed-by: La

Re: [PATCH] vhost-user: Silence unsupported VHOST_USER_PROTOCOL_F_RARP error

2025-01-22 Thread Laurent Vivier
On 22/01/2025 17:51, Stefano Garzarella wrote: On Wed, Jan 22, 2025 at 05:41:15PM +0100, Laurent Vivier wrote: On 22/01/2025 17:20, Stefano Garzarella wrote: On Wed, Jan 22, 2025 at 08:59:22AM -0500, Michael S. Tsirkin wrote: On Wed, Jan 22, 2025 at 02:42:14PM +0100, Stefano Garzarella wrote

Re: [PATCH v4 1/7] linux-user: netlink: Add missing IFA_PROTO to host_to_target_data_addr_rtattr()

2025-01-22 Thread Laurent Vivier
and use those instead. Already existing IFA_XXX usages are converted to QEMU_IFA_XXX in a followup-patch. Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier --- linux-user/fd-trans.c | 17 + 1 file changed, 17 insertions(+) diff --git a/linux-user/fd-trans.c b/linux-user/fd

Re: [PATCH v4 7/7] linux-user: netlink: Use QEMU_IFA_XXX values instead of IFA_XXX

2025-01-22 Thread Laurent Vivier
Le 20/01/2025 à 22:33, del...@kernel.org a écrit : From: Helge Deller Convert existing places to use QEMU_IFA_XXX values. Signed-off-by: Helge Deller --- linux-user/fd-trans.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/linux-user/fd-trans.c b/linux

Re: [PATCH] vhost-user: Silence unsupported VHOST_USER_PROTOCOL_F_RARP error

2025-01-22 Thread Laurent Vivier
On 22/01/2025 17:20, Stefano Garzarella wrote: On Wed, Jan 22, 2025 at 08:59:22AM -0500, Michael S. Tsirkin wrote: On Wed, Jan 22, 2025 at 02:42:14PM +0100, Stefano Garzarella wrote: On Tue, Jan 21, 2025 at 11:00:29AM +0100, Laurent Vivier wrote: > In vhost_user_receive()

[PATCH] vhost-user: Silence unsupported VHOST_USER_PROTOCOL_F_RARP error

2025-01-21 Thread Laurent Vivier
pport VHOST_USER_PROTOCOL_F_RARP. Don't report the error if vhost_net_notify_migration_done() returns -ENOTSUP (from vhost_user_migration_done()) Update vhost_net-stub.c to return -ENOTSUP too. Signed-off-by: Laurent Vivier --- hw/net/vhost_net-stub.c | 2 +- net/vhost-user.c| 2 +- 2 files

Re: [PATCH] hw/virtio/vhost: Disable IOTLB callbacks when IOMMU gets disabled

2025-01-21 Thread Laurent Vivier
On 20/01/2025 18:33, Eric Auger wrote: When a guest exposed with a vhost device and protected by an intel IOMMU gets rebooted, we sometimes observe a spurious warning: Fail to lookup the translated address e000 We observe that the IOMMU gets disabled through a write to the global command re

Re: [PATCH v3 1/6] linux-user: netlink: Add missing IFA_PROTO to host_to_target_data_addr_rtattr()

2025-01-20 Thread Laurent Vivier
Le 19/01/2025 à 05:41, del...@kernel.org a écrit : From: Helge Deller Fixes this warning: Unknown host IFA type: 11 Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier --- linux-user/fd-trans.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/fd-trans.c b/linux-user

Re: [PATCH v3 4/6] linux-user: netlink: Add emulation of IP_MULTICAST_IF

2025-01-20 Thread Laurent Vivier
), the argument is an in_addr structure. Signed-off-by: Helge Deller v2: (based on feedback by Laurent Vivier) - refined commit message and restructure the copying of ip_mreqn fields diff --git a/linux-user/syscall.c b/linux-user/syscall.c index bbe2560927..4360543e20 100644 --- a/linux-user

Re: [PATCH v3 3/6] linux-user: netlink: Add IP_PKTINFO cmsg parsing

2025-01-20 Thread Laurent Vivier
Le 19/01/2025 à 05:41, del...@kernel.org a écrit : From: Helge Deller Fixes those warnings: Unsupported host ancillary data: 0/8 Signed-off-by: Helge Deller v2: (based on feedback by Laurent Vivier) - add target_in_pktinfo struct and fix copying target_in_addr fields --- linux-user

Re: [PATCH 0/2] net: Fix announce_self with vhost

2025-01-17 Thread Laurent Vivier
CC: qemu-stable and qemu-trivial. On 17/01/2025 12:17, Laurent Vivier wrote: announce_self that sends a RARP packet after migration or with announce_self QMP/HMP command doesn't work with vhost because of the vnet headers. announce_self is the only user of QEMU_NET_PACKET_FLAG_RAW and

[PATCH 2/2] net/dump: Correctly compute Ethernet packet offset

2025-01-17 Thread Laurent Vivier
..@daynix.com Signed-off-by: Laurent Vivier --- net/dump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/dump.c b/net/dump.c index d7dd2ce461de..140215aa1054 100644 --- a/net/dump.c +++ b/net/dump.c @@ -155,7 +155,8 @@ static ssize_t filter_dump_receive_iov(NetFi

[PATCH 1/2] net: Fix announce_self

2025-01-17 Thread Laurent Vivier
010: 9a2b 2c2d 2e2f 0x0020: Reported-by: Xiaohui Li Bug: https://issues.redhat.com/browse/RHEL-73891 Fixes: b9ad513e1876 ("net: Remove receive_raw()") Cc: akihiko.od...@daynix.com Signed-off-by: Laurent Vivier ---

[PATCH 0/2] net: Fix announce_self with vhost

2025-01-17 Thread Laurent Vivier
ilter-dump and in qemu_deliver_packet_iov(). Laurent Vivier (2): net: Fix announce_self net/dump: Correctly compute Ethernet packet offset net/dump.c | 3 ++- net/net.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) -- 2.47.1

[PATCH v2 0/2] virtio-net: vhost-user: Implement internal migration

2025-01-15 Thread Laurent Vivier
Add support of VHOST_USER_PROTOCOL_F_DEVICE_STATE in virtio-net with vhost-user backend. v2: - Add stubs for the migration state transfer interface Laurent Vivier (2): vhost: Add stubs for the migration state transfer interface virtio-net: vhost-user: Implement internal migration include

[PATCH v2 2/2] virtio-net: vhost-user: Implement internal migration

2025-01-15 Thread Laurent Vivier
Add support of VHOST_USER_PROTOCOL_F_DEVICE_STATE in virtio-net with vhost-user backend. Cc: Hanna Czenczek Signed-off-by: Laurent Vivier --- hw/net/virtio-net.c | 135 1 file changed, 112 insertions(+), 23 deletions(-) diff --git a/hw/net/virtio

[PATCH v2 1/2] vhost: Add stubs for the migration state transfer interface

2025-01-15 Thread Laurent Vivier
vhost_supports_device_state(), vhost_save_backend_state() and vhost_load_backend_state(). Cc: Hanna Czenczek Signed-off-by: Laurent Vivier --- include/hw/virtio/vhost.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h

Re: [PATCH] virtio-net: vhost-user: Implement internal migration

2025-01-15 Thread Laurent Vivier
On 15/01/2025 11:10, Michael S. Tsirkin wrote: On Wed, Dec 18, 2024 at 03:34:53PM +0100, Laurent Vivier wrote: Add support of VHOST_USER_PROTOCOL_F_DEVICE_STATE in virtio-net with vhost-user backend. Cc: Hanna Czenczek Signed-off-by: Laurent Vivier Breaks windows builds: https

Re: [PATCH v2 5/6] linux-user: netlink: add netlink neighbour emulation

2025-01-10 Thread Laurent Vivier
tr(NDM_RTA(ndm), nlh->nlmsg_len - + NLMSG_LENGTH(sizeof(*ndm))); +} +break; case RTM_NEWROUTE: case RTM_DELROUTE: case RTM_GETROUTE: Reviewed-by: Laurent Vivier

Re: [PATCH v2 6/6] linux-user: netlink: Add missing QEMU_IFLA entries

2025-01-10 Thread Laurent Vivier
uot;Unknown host QEMU_IFLA type: %d\n", rtattr->rta_type); Reviewed-by: Laurent Vivier

Re: [PATCH v2 4/6] linux-user: netlink: Add emulation of IP_MULTICAST_IF

2025-01-10 Thread Laurent Vivier
Le 27/12/2024 à 21:54, del...@kernel.org a écrit : From: Helge Deller Share code with IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP. Signed-off-by: Helge Deller --- linux-user/syscall.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-u

  1   2   3   4   5   6   7   8   9   10   >