From: Sasha Levin <levinsasha928@gmail.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: David Evensky <evensky@sandia.gov>,
penberg@kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] kvm tools: adds a PCI device that exports a host shared segment as a PCI BAR in the guest
Date: Fri, 26 Aug 2011 09:11:43 +0300 [thread overview]
Message-ID: <1314339103.3647.15.camel@lappy> (raw)
In-Reply-To: <4E56C021.4040909@codemonkey.ws>
On Thu, 2011-08-25 at 16:35 -0500, Anthony Liguori wrote:
> On 08/24/2011 05:25 PM, 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
> >
> > diff -uprN -X linux-kvm/Documentation/dontdiff linux-kvm/tools/kvm/include/kvm/pci-shmem.h linux-kvm_pci_shmem/tools/kvm/include/kvm/pci-shmem.h
> > --- linux-kvm/tools/kvm/include/kvm/pci-shmem.h 1969-12-31 16:00:00.000000000 -0800
> > +++ linux-kvm_pci_shmem/tools/kvm/include/kvm/pci-shmem.h 2011-08-13 15:43:01.067953711 -0700
> > @@ -0,0 +1,13 @@
> > +#ifndef KVM__PCI_SHMEM_H
> > +#define KVM__PCI_SHMEM_H
> > +
> > +#include<linux/types.h>
> > +#include<linux/list.h>
> > +
> > +struct kvm;
> > +struct shmem_info;
> > +
> > +int pci_shmem__init(struct kvm *self);
> > +int pci_shmem__register_mem(struct shmem_info *si);
> > +
> > +#endif
> > diff -uprN -X linux-kvm/Documentation/dontdiff linux-kvm/tools/kvm/include/kvm/virtio-pci-dev.h linux-kvm_pci_shmem/tools/kvm/include/kvm/virtio-pci-dev.h
> > --- linux-kvm/tools/kvm/include/kvm/virtio-pci-dev.h 2011-08-09 15:38:48.760120973 -0700
> > +++ linux-kvm_pci_shmem/tools/kvm/include/kvm/virtio-pci-dev.h 2011-08-18 10:06:12.171539230 -0700
> > @@ -15,10 +15,13 @@
> > #define PCI_DEVICE_ID_VIRTIO_BLN 0x1005
> > #define PCI_DEVICE_ID_VIRTIO_P9 0x1009
> > #define PCI_DEVICE_ID_VESA 0x2000
> > +#define PCI_DEVICE_ID_PCI_SHMEM 0x0001
> >
> > #define PCI_VENDOR_ID_REDHAT_QUMRANET 0x1af4
> > +#define PCI_VENDOR_ID_PCI_SHMEM 0x0001
> > #define PCI_SUBSYSTEM_VENDOR_ID_REDHAT_QUMRANET 0x1af4
>
> FYI, that's not a valid vendor and device ID.
>
> Perhaps the RH folks would be willing to reserve a portion of the device
> ID space in their vendor ID for ya'll to play around with.
I'm working on a patch on top of David's patch to turn it into a ivshmem
device. Once it's ready we would use same vendor/device IDs.
--
Sasha.
prev parent reply other threads:[~2011-08-26 6:11 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 22:25 [PATCH] kvm tools: adds a PCI device that exports a host shared segment as a PCI BAR in the guest David Evensky
2011-08-25 3:27 ` Alexander Graf
2011-08-25 4:49 ` David Evensky
2011-08-25 4:52 ` Alexander Graf
2011-08-25 5:11 ` Pekka Enberg
[not found] ` <A16CB574-D2F7-440B-BD26-12EB4DEAD917@suse.de>
2011-08-25 5:37 ` Pekka Enberg
2011-08-25 5:38 ` Alexander Graf
2011-08-25 5:06 ` Pekka Enberg
2011-08-25 5:49 ` David Evensky
2011-08-25 10:31 ` Stefan Hajnoczi
2011-08-25 10:37 ` Pekka Enberg
2011-08-25 10:59 ` Stefan Hajnoczi
2011-08-25 11:15 ` Pekka Enberg
2011-08-25 11:30 ` Avi Kivity
2011-08-25 11:38 ` Pekka Enberg
2011-08-25 11:51 ` Avi Kivity
2011-08-25 12:01 ` Pekka Enberg
2011-08-25 11:51 ` Sasha Levin
2011-08-25 11:25 ` Sasha Levin
2011-08-25 15:08 ` David Evensky
2011-08-25 22:08 ` Eric Northup
2011-08-25 22:27 ` David Evensky
2011-08-26 6:33 ` Sasha Levin
2011-08-26 15:05 ` David Evensky
[not found] ` <30669_1314285268_p7PFESZN013126_20110825150806.GF24996@dancer.ca.sandia.gov>
2011-08-25 21:00 ` David Evensky
2011-08-25 21:11 ` Avi Kivity
2011-08-25 22:03 ` David Evensky
2011-08-28 7:34 ` Avi Kivity
2011-08-29 4:55 ` David Evensky
2011-08-25 5:41 ` Avi Kivity
2011-08-25 6:01 ` David Evensky
2011-08-25 6:02 ` Pekka Enberg
2011-08-25 6:11 ` David Evensky
[not found] ` <CAFO3S41WOutTEmMGAeor6w=OZ_cax_AHB7Wo24jfUioynv3DFg@mail.gmail.com>
[not found] ` <4E55E378.4060904@kernel.org>
2011-08-25 6:30 ` Asias He
2011-08-25 7:02 ` Pekka Enberg
2011-08-25 7:20 ` Asias He
2011-08-25 7:24 ` Pekka Enberg
2011-08-25 21:35 ` Anthony Liguori
2011-08-25 21:50 ` David Evensky
2011-08-26 6:11 ` Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314339103.3647.15.camel@lappy \
--to=levinsasha928@gmail.com \
--cc=anthony@codemonkey.ws \
--cc=evensky@sandia.gov \
--cc=kvm@vger.kernel.org \
--cc=penberg@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox