[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191009094432.by5zs4c3binrznpp@steredhat>
Date: Wed, 9 Oct 2019 11:44:32 +0200
From: Stefano Garzarella <sgarzare@...hat.com>
To: netdev@...r.kernel.org, Stefan Hajnoczi <stefanha@...hat.com>
Cc: linux-hyperv@...r.kernel.org,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Sasha Levin <sashal@...nel.org>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
virtualization@...ts.linux-foundation.org,
Stephen Hemminger <sthemmin@...rosoft.com>,
Jason Wang <jasowang@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Dexuan Cui <decui@...rosoft.com>,
Jorgen Hansen <jhansen@...are.com>
Subject: Re: [RFC PATCH 11/13] vsock: add 'transport_hg' to handle g2h\h2g
transports
On Fri, Sep 27, 2019 at 01:27:01PM +0200, Stefano Garzarella wrote:
> VMCI transport provides both g2h and h2g behaviors in a single
> transport.
> We are able to set (or not) the g2h behavior, detecting if we
> are in a VMware guest (or not), but the h2g feature is always set.
> This prevents to load other h2g transports while we are in a
> VMware guest.
>
> This patch adds a new 'transport_hg' to handle this case, reducing
> the priority of transports that provide both g2h and h2g
> behaviors. A transport that has g2h and h2g features, can be
> bypassed by a transport that has only the h2g feature.
>
Since I'm enabling the VSOCK_TRANSPORT_F_G2H in the vmci_transport only
when we run in a VMware guest, this patch doesn't work well if a KVM (or
HyperV) guest application create an AF_VSOCK socket and no transports are
loaded, because in this case the vmci_transport is loaded
(MODULE_ALIAS_NETPROTO(PF_VSOCK)) and it is registered as transport_h2g.
At this point, if we want to run a nested VM using vhost_transport, we
can't load it.
So, I can leave VSOCK_TRANSPORT_F_G2H always set in the vmci_transport
and this should fix this issue.
Or maybe I need to change how the registering works, e.g. handling a list
of transport registered, setting priority or using the last registered
transport.
Any suggestion?
Thanks,
Stefano
Powered by blists - more mailing lists