On Thu, Jul 23, 2026 at 03:30:03PM -0700, Connor Kite wrote:
> Add a memory-isolation property to NetdevPassOptions and
> NetDevVhostUserOptions in net.json.  This property will
> be used for vhost-user devices to disable access to guest
> memory from devices.
> 
> It will be passed into vhost_user_init() in a future patch.
> 
> Signed-off-by: Connor Kite <[email protected]>
> ---
>  net/passt.c      |  7 +++++++
>  net/vhost-user.c |  4 ++++
>  qapi/net.json    | 15 +++++++++++----
>  3 files changed, 22 insertions(+), 4 deletions(-)
> 
> diff --git a/net/passt.c b/net/passt.c
> index 45440c399b..ce80186883 100644
> --- a/net/passt.c
> +++ b/net/passt.c
> @@ -735,6 +735,13 @@ int net_init_passt(const Netdev *netdev, const char 
> *name,
>      s->pidfile = pidfile;
>  
>      if (netdev->u.passt.has_vhost_user && netdev->u.passt.vhost_user) {
> +        bool memory_isolation G_GNUC_UNUSED = false;
> +
> +        if (netdev->u.passt.has_memory_isolation &&
> +           netdev->u.passt.memory_isolation) {
> +            memory_isolation = true;
> +        }

This is dead code (hence G_GNUC_UNUSED) and is harder to review because
we don't know how it will be used until later in the patch series. I
guess vhost_user_init() and net_passt_vhost_user_init() will gain a
memory_isolation argument in a future patch.

Linear reviews of the patch series are easiest for reviewers. Please
reorder this so that vhost_user_init() and net_pass_vhost_user_init()
are changed first. You can hardcode the argument to false in those
patches. This patch can be moved afterwards so that memory_isolation is
never dead code.

Attachment: signature.asc
Description: PGP signature

Reply via email to