From: Avi Kivity <avi@redhat.com> To: Cam Macdonell <cam@cs.ualberta.ca> Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org Subject: Re: [PATCH v4 3/3] Inter-VM shared memory PCI device Date: Thu, 15 Apr 2010 11:33:43 +0300 [thread overview] Message-ID: <4BC6CF67.5060608@redhat.com> (raw) In-Reply-To: <m2s8286e4ee1004141630u9fcce2i395e4af96cb53e2e@mail.gmail.com> On 04/15/2010 02:30 AM, Cam Macdonell wrote: >> >>> Sample programs, init scripts and the shared memory server are available >>> in a >>> git repo here: >>> >>> www.gitorious.org/nahanni >>> >>> >> Please consider qemu.git/contrib. >> > Should the compilation be tied into Qemu's regular build with a switch > (e.g. --enable-ivshmem-server)? Or should it be its own separate > build? > It can have its own makefile. >>> --- >>> Makefile.target | 3 + >>> hw/ivshmem.c | 700 >>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++ >>> qemu-char.c | 6 + >>> qemu-char.h | 3 + >>> >>> >> qemu-doc.texi | 45 +++++++++++++ >> > Seems to be light on qdev devices. I notice there is a section named > "Data Type Index" that "could be used for qdev device names and > options", but is currently empty. Should I place documentation there > of device there or just add it to "3.3 Invocation"? > I think those are in qemu-options.hx. Just put it somewhere where it seems appropriate. > >> >>> 4 files changed, 712 insertions(+), 0 deletions(-) >>> create mode 100644 hw/ivshmem.c >>> >>> diff --git a/Makefile.target b/Makefile.target >>> index 1ffd802..bc9a681 100644 >>> --- a/Makefile.target >>> +++ b/Makefile.target >>> @@ -199,6 +199,9 @@ obj-$(CONFIG_USB_OHCI) += usb-ohci.o >>> obj-y += rtl8139.o >>> obj-y += e1000.o >>> >>> +# Inter-VM PCI shared memory >>> +obj-y += ivshmem.o >>> + >>> >>> >> depends on CONFIG_PCI >> > as in > > obj-($CONFIG_PCI) += ivshmem.o > > > the variable CONFIG_PCI doesn't seem to be set during configuration. > I don't see any other PCI devices that depend on it. My mistake, keep as is. > Do we also want > to depend on CONFIG_KVM? > No real need. >>> +static void create_shared_memory_BAR(IVShmemState *s, int fd) { >>> + >>> + s->shm_fd = fd; >>> + >>> + s->ivshmem_offset = qemu_ram_mmap(s->shm_fd, s->ivshmem_size, >>> + MAP_SHARED, 0); >>> >>> >> Where did the offset go? >> > 0 is the offset. I include the offset parameter in qemu_ram_mmap() to > make it flexible for other uses. Makes sense. > Are you suggesting to take an > optional offset as an argument to -device? > No need. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com> To: Cam Macdonell <cam@cs.ualberta.ca> Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] Re: [PATCH v4 3/3] Inter-VM shared memory PCI device Date: Thu, 15 Apr 2010 11:33:43 +0300 [thread overview] Message-ID: <4BC6CF67.5060608@redhat.com> (raw) In-Reply-To: <m2s8286e4ee1004141630u9fcce2i395e4af96cb53e2e@mail.gmail.com> On 04/15/2010 02:30 AM, Cam Macdonell wrote: >> >>> Sample programs, init scripts and the shared memory server are available >>> in a >>> git repo here: >>> >>> www.gitorious.org/nahanni >>> >>> >> Please consider qemu.git/contrib. >> > Should the compilation be tied into Qemu's regular build with a switch > (e.g. --enable-ivshmem-server)? Or should it be its own separate > build? > It can have its own makefile. >>> --- >>> Makefile.target | 3 + >>> hw/ivshmem.c | 700 >>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++ >>> qemu-char.c | 6 + >>> qemu-char.h | 3 + >>> >>> >> qemu-doc.texi | 45 +++++++++++++ >> > Seems to be light on qdev devices. I notice there is a section named > "Data Type Index" that "could be used for qdev device names and > options", but is currently empty. Should I place documentation there > of device there or just add it to "3.3 Invocation"? > I think those are in qemu-options.hx. Just put it somewhere where it seems appropriate. > >> >>> 4 files changed, 712 insertions(+), 0 deletions(-) >>> create mode 100644 hw/ivshmem.c >>> >>> diff --git a/Makefile.target b/Makefile.target >>> index 1ffd802..bc9a681 100644 >>> --- a/Makefile.target >>> +++ b/Makefile.target >>> @@ -199,6 +199,9 @@ obj-$(CONFIG_USB_OHCI) += usb-ohci.o >>> obj-y += rtl8139.o >>> obj-y += e1000.o >>> >>> +# Inter-VM PCI shared memory >>> +obj-y += ivshmem.o >>> + >>> >>> >> depends on CONFIG_PCI >> > as in > > obj-($CONFIG_PCI) += ivshmem.o > > > the variable CONFIG_PCI doesn't seem to be set during configuration. > I don't see any other PCI devices that depend on it. My mistake, keep as is. > Do we also want > to depend on CONFIG_KVM? > No real need. >>> +static void create_shared_memory_BAR(IVShmemState *s, int fd) { >>> + >>> + s->shm_fd = fd; >>> + >>> + s->ivshmem_offset = qemu_ram_mmap(s->shm_fd, s->ivshmem_size, >>> + MAP_SHARED, 0); >>> >>> >> Where did the offset go? >> > 0 is the offset. I include the offset parameter in qemu_ram_mmap() to > make it flexible for other uses. Makes sense. > Are you suggesting to take an > optional offset as an argument to -device? > No need. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
next prev parent reply other threads:[~2010-04-15 8:33 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-04-07 22:51 [PATCH v4 0/3] PCI Shared memory device Cam Macdonell 2010-04-07 22:51 ` [Qemu-devel] " Cam Macdonell 2010-04-07 22:51 ` [PATCH v4 1/3] Device specification for shared memory PCI device Cam Macdonell 2010-04-07 22:51 ` [Qemu-devel] " Cam Macdonell 2010-04-07 22:51 ` [PATCH v4 2/3] Support adding a file to qemu's ram allocation Cam Macdonell 2010-04-07 22:51 ` [Qemu-devel] " Cam Macdonell 2010-04-07 22:52 ` [PATCH v4 3/3] Inter-VM shared memory PCI device Cam Macdonell 2010-04-07 22:52 ` [Qemu-devel] " Cam Macdonell 2010-04-12 20:56 ` Avi Kivity 2010-04-12 20:56 ` [Qemu-devel] " Avi Kivity 2010-04-14 23:30 ` Cam Macdonell 2010-04-14 23:30 ` [Qemu-devel] " Cam Macdonell 2010-04-15 8:33 ` Avi Kivity [this message] 2010-04-15 8:33 ` Avi Kivity 2010-04-12 20:38 ` [PATCH v4 2/3] Support adding a file to qemu's ram allocation Avi Kivity 2010-04-12 20:38 ` [Qemu-devel] " Avi Kivity 2010-04-07 23:00 ` [PATCH v4] Shared memory uio_pci driver Cam Macdonell 2010-04-07 23:00 ` [Qemu-devel] " Cam Macdonell 2010-04-12 20:57 ` Avi Kivity 2010-04-12 20:57 ` [Qemu-devel] " Avi Kivity 2010-04-23 17:45 ` Cam Macdonell 2010-04-23 17:45 ` [Qemu-devel] " Cam Macdonell 2010-04-24 9:28 ` Avi Kivity 2010-04-24 9:28 ` [Qemu-devel] " Avi Kivity 2010-04-12 20:34 ` [PATCH v4 1/3] Device specification for shared memory PCI device Avi Kivity 2010-04-12 20:34 ` [Qemu-devel] " Avi Kivity 2010-04-12 21:11 ` Cam Macdonell 2010-04-12 21:11 ` [Qemu-devel] " Cam Macdonell 2010-04-12 21:17 ` [PATCH v4 0/3] PCI Shared memory device Michael S. Tsirkin 2010-04-12 21:17 ` [Qemu-devel] " Michael S. Tsirkin
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=4BC6CF67.5060608@redhat.com \ --to=avi@redhat.com \ --cc=cam@cs.ualberta.ca \ --cc=kvm@vger.kernel.org \ --cc=qemu-devel@nongnu.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.