From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5462C10F14 for ; Thu, 10 Oct 2019 13:04:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C5EAC206B6 for ; Thu, 10 Oct 2019 13:04:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387853AbfJJNEn (ORCPT ); Thu, 10 Oct 2019 09:04:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55429 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387710AbfJJNEn (ORCPT ); Thu, 10 Oct 2019 09:04:43 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2289811A30 for ; Thu, 10 Oct 2019 13:04:43 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id w10so2736172wrl.5 for ; Thu, 10 Oct 2019 06:04:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2MtH4zvS+teTx0r1qM2asg1XxOF0qUFTTboopmawOE4=; b=W0iqLv5jpkAdzXL76jbpS2EU24FPwY3vG2imw2bE3F0xvjzCvny1Wuc8ZD6t+dDw/t pYnE2jjtEyTUcM4P8b7FgZR+R8n/I/lDaEhkVOhpSJMDV9AC25b/yAwgz4Wj92IGItpL 3yTifN5xDZVg8W3ELLVGVqtu0dd18/9WAL9+aWq+30HGCguoNdSHkl4j5tyW2cSqVGOc VxQSU1DXuz6Zy/ZygFMjrR4eBxXxrEOwLSjiizk0tB1NbNUripLdkxcX6ZdoONfV0QVr hL14tXHfJ72B51pMZkOtapDRdslFPNoqnxTzZ9iBzFx6snTTG9/WZbeo1RiScA7v+45E 65nA== X-Gm-Message-State: APjAAAWdTqPx+3NmUvAnu/4ifwCZW83vzpIN3USqc0wd2IuiEw99Bc85 Zg0XrUEf4git0i1iNWM9wRDL+TvHG6Rk7lDya47yWR8JQ/U+9afOw9O6/8gi6AknGCSdMwDEjGP 480/AJBMiTWeQ X-Received: by 2002:a05:600c:2549:: with SMTP id e9mr7070286wma.74.1570712681805; Thu, 10 Oct 2019 06:04:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKWS9Yagf4LaasayMPOMgQigEaVeXAInUpVNhLSOAsaDv27fYHGGISL/SEaullOo401iX5OQ== X-Received: by 2002:a05:600c:2549:: with SMTP id e9mr7070261wma.74.1570712681580; Thu, 10 Oct 2019 06:04:41 -0700 (PDT) Received: from steredhat (host174-200-dynamic.52-79-r.retail.telecomitalia.it. [79.52.200.174]) by smtp.gmail.com with ESMTPSA id r7sm4504378wrt.28.2019.10.10.06.04.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 06:04:40 -0700 (PDT) Date: Thu, 10 Oct 2019 15:04:38 +0200 From: Stefano Garzarella To: Stefan Hajnoczi Cc: netdev@vger.kernel.org, Sasha Levin , linux-hyperv@vger.kernel.org, Stephen Hemminger , kvm@vger.kernel.org, "Michael S. Tsirkin" , Dexuan Cui , Haiyang Zhang , linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Stefan Hajnoczi , "David S. Miller" , Jorgen Hansen Subject: Re: [RFC PATCH 11/13] vsock: add 'transport_hg' to handle g2h\h2g transports Message-ID: <20191010130438.3hbv33fgslmlprtf@steredhat> References: <20190927112703.17745-1-sgarzare@redhat.com> <20190927112703.17745-12-sgarzare@redhat.com> <20191009131643.GL5747@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191009131643.GL5747@stefanha-x1.localdomain> User-Agent: NeoMutt/20180716 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, Oct 09, 2019 at 02:16:43PM +0100, Stefan Hajnoczi wrote: > 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. > > In the vhost_vsock.ko case we only register the h2g transport when > userspace has loaded the module (by opening /dev/vhost-vsock). > > VMCI has something kind of similar: /dev/vmci and the > vmci_host_active_users counter. Maybe we can use this instead of > introducing the transport_hg concept? Yes, maybe we can register the host in the vmci_host_do_init_context(). I also don't like a lot the transport_hg concept, so I'll try to found an alternative. Thanks, Stefano