Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2341160ybp; Thu, 10 Oct 2019 06:07:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWip5Yt06fnPLCYbtBL4nZ61gJE/mR7CMJ4x6zhAnSf4iL9mEO68r9rcrjX1C57ccTvW9y X-Received: by 2002:a17:906:4d85:: with SMTP id s5mr8201612eju.192.1570712865931; Thu, 10 Oct 2019 06:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570712865; cv=none; d=google.com; s=arc-20160816; b=f0uOBOMh6HyzZlCy6Xf3Jexjf4EpU/e8mteHcrA8f8ZWVtp3xHwaaO/doDYnnrcWGe M1YeYAnvwaYgfZ5X/fDel9uLt6fSLf8CgYafvDJ+z+yVHF9NgBXk3+wMTkh2EiJzLV+k 5aD1zoy6jA8pY+quiHaepkJeuhlAeuAn/2ZzxkW+4SciWk1TN/4QXnrarN5hUJbeh7Ak p4I1Eppm+FGUEPZqThSI8gg/3lJBg3ofFx7TUivzoAA+LsXeZbanVB52h1jDbQwSA+vB PBvVsTE3Oh8W0rb2v+YLBJFMxN5Zhm4lc5I9HQsrn0Pm7OL8lvtQ1eXd9cCQdWjOP0ER 7upA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=2MtH4zvS+teTx0r1qM2asg1XxOF0qUFTTboopmawOE4=; b=Ubd+nbHaNeLEkMjSvJMorDJmemGtRA74Pfyb4HF94mQQNK/cTyEk+xeL0/kDYrGMpc vlvYu97ZJmfKQVKnFS8nZ0KWKxY14ES1ssFczsebD/LwhiHi/HL7ejyaGUEAo4x4JYoh rvUR6iE7y5UAuO9FzE5tOI9C5VMqIup58KhbRRzMh4G9Rfmt6HytoLpNKevHDSrwZLsi bRItyHShs3eXvcTUjus3ysOG/BoXj/UIPrLhSa0xyoBzr22hRYMY00nLhba/VjRlDLiL ytd37Uf2cV8y4CnKIiX0CvNOQ7iqcxLjCD1Urrfgfr4kjcn+IL5V5qCxd/5jX7xYIrfo 122w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j17si2955456ejd.314.2019.10.10.06.07.07; Thu, 10 Oct 2019 06:07:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387898AbfJJNEn (ORCPT + 99 others); Thu, 10 Oct 2019 09:04:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49278 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387624AbfJJNEn (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 1DD814ACA7 for ; Thu, 10 Oct 2019 13:04:43 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id o10so2718260wrm.22 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=QgvRUVFKG6WC1nOg7m8pG8MF9rqokdvTGOYi3lXVI5ZAelZk0KiAbTME3Z/mIoItvL MEv1m1UQ8Q0QJr9v3eiXsRGQ/DDotB9EVZ0p18gwwQnISHkPfB9ZYwVpPG+aY8CM0WNf villHGSN66NjNCpbOn82MzxMx65cJ4RcS8bYZkVGHp37m8ClbU5vDNYkwlL/fNeBCpgQ WMkePPsHzIZOe9j3Ldmebcz+DK2eYxv6H2r2Uy6LYKVzJSI9Rxfv2wdZJA3y2s427PQU +EyQhI+HbiQgy9VclZGB6ej2FckKyArlsE4AwBRTChaUBQlzZ2THbLd0sMdDOuvJOxhB HpFg== X-Gm-Message-State: APjAAAX5YlKWaIbPT6H82+p/h0CasPiWSwW1MsscnJAYJpz538zIopFn R7nFxoRMVURp9b1UgvuPN16fwc8S9je50ENIc3DNKPi/bdj6xy36IM7WlszotSBMHhRnrGRKR5i 1dIGi9aBFzBDtScJY2kOXooRz X-Received: by 2002:a05:600c:2549:: with SMTP id e9mr7070288wma.74.1570712681809; Thu, 10 Oct 2019 06:04:41 -0700 (PDT) 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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