From: Alexander Graf Subject: Re: [PATCH] kvm tools: adds a PCI device that exports a host shared segment as a PCI BAR in the guest Date: Wed, 24 Aug 2011 22:27:18 -0500 Message-ID: <232C9ABA-F703-4AE5-83BC-774C715D4D8F@suse.de> References: <20110824222510.GC14835@dancer.ca.sandia.gov> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Cc: penberg@kernel.org, Sasha Levin , kvm@vger.kernel.org To: David Evensky Return-path: Received: from cantor2.suse.de ([195.135.220.15]:53977 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750835Ab1HYD1X convert rfc822-to-8bit (ORCPT ); Wed, 24 Aug 2011 23:27:23 -0400 In-Reply-To: <20110824222510.GC14835@dancer.ca.sandia.gov> Sender: kvm-owner@vger.kernel.org List-ID: On 24.08.2011, at 17:25, David Evensky wrote: > > > This patch adds a PCI device that provides PCI device memory to the > guest. This memory in the guest exists as a shared memory segment in > the host. This is similar memory sharing capability of Nahanni > (ivshmem) available in QEMU. In this case, the shared memory segment > is exposed as a PCI BAR only. > > A new command line argument is added as: > --shmem pci:0xc8000000:16MB:handle=/newmem:create > > which will set the PCI BAR at 0xc8000000, the shared memory segment > and the region pointed to by the BAR will be 16MB. On the host side > the shm_open handle will be '/newmem', and the kvm tool will create > the shared segment, set its size, and initialize it. If the size, > handle, or create flag are absent, they will default to 16MB, > handle=/kvm_shmem, and create will be false. The address family, > 'pci:' is also optional as it is the only address family currently > supported. Only a single --shmem is supported at this time. Did you have a look at ivshmem? It does that today, but also gives you an IRQ line so the guests can poke each other. For something as simple as this, I don't see why we'd need two competing implementations. Alex