Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3714979imu; Fri, 18 Jan 2019 15:59:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN4LT5SzKRh8O8PUTcYuKbhg6nHzR0sOyj4sjSEJhvsRWY5Q//8G/fT+wwWYnLYRV34JrZD4 X-Received: by 2002:a62:9111:: with SMTP id l17mr21289026pfe.200.1547855981301; Fri, 18 Jan 2019 15:59:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547855981; cv=none; d=google.com; s=arc-20160816; b=vHXLbvnnHO1a3f4Cpz8WdpXEvZK7jl0hsbbxFQ0mPkdclAJOgA0B2arpuZLm0CxtUy rBaxeOFfu/iDjxQOA9TqeWzQ/JMLeprYLsvSUGLJZ92g4fz6U6dwYVRVDBfayM+PwQlf bMamFSezuIS0qM/ZVbtybWoEyByNk0J/OrbBVtVAhEKiQ+A642vBLthtc7rQ1/kp1gG4 9oeXjeuOVc6xCBPIdRKXDFlHzfP5BqZq97Bj00KfOZc8LibP02Qtc0MSUoVUtGaJlZ3p uopw6a5F0LnvSSZxPnstcN69Kv84vbHbSNMm9S1pz8qgA05aIIaZFNxXlTS9GDuCh4aa lYrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=GfQ/92t44PGynHN5jqlInpFoslIjrYo3s89TtahCUXY=; b=lk1zf+9P5ELupPFTQ5yjB2PkHz4YtGgjX3eMyZdj9EWNDLwSQS0+FhtHgy/Pei8BpF 70uy0WYghpanFuN4ozeQSUdpgNo1WvADfU7q84uD3BRdhBh7XqHsqGJ35+ZBq8ttb3CG 5B5epVDzKFgAcHrZtF+2ejy+zW7xyZ2XI8Z9d9NFzZgtlg6gtLY/E4Qn3mnyoDYpp0rr q8heTe/CDKHxb7WAM7bFSSwqAYEPA28A9cotN/xu0lklLuL3ajPQ5MdPG80thr3DQMvs rrx/Lgso1fSCknPUoYsZueLQwLXSuOHZSbRmDnhfM2FlOUX0Q8M0kM7x/nhlkO+w6Oho YuSg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o13si6029022pgp.540.2019.01.18.15.59.20; Fri, 18 Jan 2019 15:59:41 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730156AbfARX5j (ORCPT + 99 others); Fri, 18 Jan 2019 18:57:39 -0500 Received: from avon.wwwdotorg.org ([104.237.132.123]:52524 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730118AbfARX5j (ORCPT ); Fri, 18 Jan 2019 18:57:39 -0500 X-Greylist: delayed 500 seconds by postgrey-1.27 at vger.kernel.org; Fri, 18 Jan 2019 18:57:39 EST Received: from [10.20.204.51] (unknown [216.228.112.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPSA id 74F021C0086; Fri, 18 Jan 2019 16:49:18 -0700 (MST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.2 at avon.wwwdotorg.org Subject: Re: [PATCH 0/8] Virtio-over-PCIe on non-MIC To: Vincent Whitchurch Cc: sudeep.dutt@intel.com, ashutosh.dixit@intel.com, gregkh@linuxfoundation.org, arnd@arndb.de, linux-kernel@vger.kernel.org, Vincent Whitchurch , "ABRAHAM, KISHON VIJAY" , Lorenzo Pieralisi , "linux-pci@vger.kernel.org" , linux-ntb@googlegroups.com, Jon Mason , Dave Jiang , Allen Hubbe , Christoph Hellwig References: <20190116163253.23780-1-vincent.whitchurch@axis.com> From: Stephen Warren Message-ID: Date: Fri, 18 Jan 2019 16:49:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190116163253.23780-1-vincent.whitchurch@axis.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/16/19 9:32 AM, Vincent Whitchurch wrote: > The Virtio-over-PCIe framework living under drivers/misc/mic/vop implements a > generic framework to use virtio between two Linux systems, given shared memory > and a couple of interrupts. It does not actually require the Intel MIC > hardware, x86-64, or even PCIe for that matter. This patch series makes it > buildable on more systems and adds a loopback driver to test it without special > hardware. > > Note that I don't have access to Intel MIC hardware so some testing of the > patchset (especially the patch "vop: Use consistent DMA") on that platform > would be appreciated, to ensure that the series does not break anything there. So a while ago I took a look at running virtio over PCIe. I found virtio basically had two parts: 1) The protocol used to enumerate which virtio devices exist, and perhaps configure them. 2) The ring buffer protocol that actually transfers the data. I recall that data transfer was purely based on simple shared memory and interrupts, and hence could run over PCIe (e.g. via the PCIe endpoint subsystem in the kernel) without issue. However, the enumeration/configuration protocol requires the host to be able to do all kinds of strange things that can't possibly be emulated over PCIe; IIRC the configuration data contains "registers" that when written select the data other "registers" access. When the virtio device is exposed by a hypervisor, and all the accesses are emulated synchronously through a trap, this is easy enough to implement. However, if the two ends of this configuration parsing are on different ends of a PCIe bus, there's no way this can work. Are you thinking of doing something different for enumeration/configuration, and just using the virtio ring buffer protocol over PCIe? I did post asking about this quite a while back, but IIRC I didn't receive much of a response. Yes, here it is: > https://lists.linuxfoundation.org/pipermail/virtualization/2018-March/037276.html "virtio over SW-defined/CPU-driven PCIe endpoint"