is written to a guest's
Doorbell.
Sample programs, init scripts and the shared memory server are available in a
git repo here:
www.gitorious.org/nahanni
Cam Macdonell (2):
Support adding a file to qemu's ram allocation
Inter-VM shared memory PCI device
Makefile.target |3 +
cpu
This avoids the need of using qemu_ram_alloc and mmap with MAP_FIXED to map a
host file into guest RAM. This function mmaps the opened file anywhere and adds
the memory to the ram blocks.
Usage is
qemu_ram_mmap(fd, size, MAP_SHARED, offset);
---
cpu-common.h |1 +
exec.c | 33
.
+ *
+ * Author:
+ * Cam Macdonell c...@cs.ualberta.ca
+ *
+ * Based On: cirrus_vga.c and rtl8139.c
+ *
+ * This code is licensed under the GNU GPL v2.
+ */
+#include sys/mman.h
+#include sys/types.h
+#include sys/socket.h
+#include sys/io.h
+#include sys/ioctl.h
+#include sys/eventfd.h
+#include hw.h
+1,235 @@
+/*
+ * UIO IVShmem Driver
+ *
+ * (C) 2009 Cam Macdonell
+ * based on Hilscher CIF card driver (C) 2007 Hans J. Koch h...@linutronix.de
+ *
+ * Licensed under GPL version 2 only.
+ *
+ */
+
+#include linux/device.h
+#include linux/module.h
+#include linux/pci.h
+#include linux/uio_driver.h
On Thu, Mar 25, 2010 at 3:21 AM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Mar 25, 2010 at 11:04:54AM +0200, Avi Kivity wrote:
Again, I recommend Rusty's virtio-pci for inspiration.
Not just inspiration, how about building on virtio-pci?
Virtio was discussed at good length last year
On Thu, Mar 25, 2010 at 3:15 AM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote:
This patch adds a driver for my shared memory PCI device using the uio_pci
interface. The driver has three memory regions. The first memory region
On Thu, Mar 25, 2010 at 3:46 AM, Avi Kivity a...@redhat.com wrote:
On 03/25/2010 08:09 AM, Cam Macdonell wrote:
This patch adds a driver for my shared memory PCI device using the uio_pci
interface. The driver has three memory regions. The first memory region
is for
device registers
On Thu, Mar 25, 2010 at 3:05 AM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote:
This patch adds a driver for my shared memory PCI device using the uio_pci
interface. The driver has three memory regions. The first memory region
On Thu, Mar 25, 2010 at 3:04 AM, Avi Kivity a...@redhat.com wrote:
On 03/25/2010 08:08 AM, Cam Macdonell wrote:
Support an inter-vm shared memory device that maps a shared-memory object
as a PCI device in the guest. This patch also supports interrupts between
guest by communicating over
On Thu, Mar 25, 2010 at 10:34 AM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Mar 25, 2010 at 10:30:42AM -0600, Cam Macdonell wrote:
On Thu, Mar 25, 2010 at 3:05 AM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote:
This patch adds
On Thu, Mar 25, 2010 at 11:02 AM, Avi Kivity a...@redhat.com wrote:
On 03/25/2010 06:50 PM, Cam Macdonell wrote:
Please put the spec somewhere publicly accessible with a permanent URL.
I
suggest a new qemu.git directory specs/. It's more important than the
code
IMO.
Sorry
On Thu, Mar 25, 2010 at 11:48 AM, Avi Kivity a...@redhat.com wrote:
On 03/25/2010 07:35 PM, Cam Macdonell wrote:
Ah, I see. You adjusted for the different behaviours in the driver.
Still I recommend dropping the status register: this allows single-msi
and
PIRQ to behave the same way. Also
On Thu, Mar 25, 2010 at 7:32 PM, Jamie Lokier ja...@shareable.org wrote:
Cam Macdonell wrote:
An irqfd can only trigger a single vector in a guest. Right now I
only have one eventfd per guest. So ioeventfd/irqfd restricts the
current implementation to a single vector that a guest can
On Sat, Mar 27, 2010 at 11:48 AM, Avi Kivity a...@redhat.com wrote:
On 03/26/2010 07:14 PM, Cam Macdonell wrote:
I'm not familiar with the uio internals, but for the interface, an
ioctl()
on the fd to assign an eventfd to an MSI vector. Similar to ioeventfd,
but
instead of mapping
On Mon, Mar 29, 2010 at 2:59 PM, Avi Kivity a...@redhat.com wrote:
On 03/28/2010 10:48 PM, Cam Macdonell wrote:
On Sat, Mar 27, 2010 at 11:48 AM, Avi Kivitya...@redhat.com wrote:
On 03/26/2010 07:14 PM, Cam Macdonell wrote:
I'm not familiar with the uio internals, but for the interface
Hi,
I'm trying to use ioeventfds for notification between guests. After
assigning a handful of ioeventfds I was getting a no space left on
device error. The culprit seems to be that only 6 devices are
allowed for a guest on the kvm IO bus. The comment indicates a
somewhat low number was
On Wed, Apr 7, 2010 at 5:30 AM, Mohammed Gamal m.gamal...@gmail.com wrote:
Hi,
I am interested in the Shared memory transport between guest(s) and
host project for GSoC 2010. The description of the project is pretty
straightforward, but I am a little bit lost on some parts:
1- Is there any
to eventfds. Only values of 1 are now
written to ensure correct usage
Cam Macdonell (3):
Device specification for shared memory PCI device
Support adding a file to qemu's ram allocation
Inter-VM shared memory PCI device
Makefile.target|3 +
cpu-common.h
---
docs/specs/ivshmem_device_spec.txt | 85
1 files changed, 85 insertions(+), 0 deletions(-)
create mode 100644 docs/specs/ivshmem_device_spec.txt
diff --git a/docs/specs/ivshmem_device_spec.txt
b/docs/specs/ivshmem_device_spec.txt
new file mode 100644
This avoids the need of using qemu_ram_alloc and mmap with MAP_FIXED to map a
host file into guest RAM. This function mmaps the opened file anywhere and adds
the memory to the ram blocks.
Usage is
qemu_ram_mmap(fd, size, MAP_SHARED, offset);
---
cpu-common.h |1 +
exec.c | 33
+
# Hardware support
obj-i386-y = pckbd.o dma.o
obj-i386-y += vga.o
diff --git a/hw/ivshmem.c b/hw/ivshmem.c
new file mode 100644
index 000..2ec6c2c
--- /dev/null
+++ b/hw/ivshmem.c
@@ -0,0 +1,700 @@
+/*
+ * Inter-VM Shared Memory PCI device.
+ *
+ * Author:
+ * Cam Macdonell c
/uio_ivshmem.c b/drivers/uio/uio_ivshmem.c
new file mode 100644
index 000..42ac9a7
--- /dev/null
+++ b/drivers/uio/uio_ivshmem.c
@@ -0,0 +1,252 @@
+/*
+ * UIO IVShmem Driver
+ *
+ * (C) 2009 Cam Macdonell
+ * based on Hilscher CIF card driver (C) 2007 Hans J. Koch h...@linutronix.de
+ *
+ * Licensed under
On Mon, Apr 12, 2010 at 3:34 PM, Avi Kivity a...@redhat.com wrote:
On 04/08/2010 01:51 AM, Cam Macdonell wrote:
(sorry about the late review)
+
+Regular Interrupts
+--
+
+If regular interrupts are used (due to either a guest not supporting MSI
or the
+user specifying
On Mon, Apr 12, 2010 at 2:56 PM, Avi Kivity a...@redhat.com wrote:
On 04/08/2010 01:52 AM, Cam Macdonell wrote:
Support an inter-vm shared memory device that maps a shared-memory object
as a
PCI device in the guest. This patch also supports interrupts between
guest by
communicating over
This avoids the need of using qemu_ram_alloc and mmap with MAP_FIXED to map a
host file into guest RAM. This function mmaps the opened file anywhere and adds
the memory to the ram blocks.
Usage is
qemu_ram_mmap(fd, size, MAP_SHARED, offset);
---
cpu-common.h |2 ++
exec.c | 36
---
docs/specs/ivshmem_device_spec.txt | 91
1 files changed, 91 insertions(+), 0 deletions(-)
create mode 100644 docs/specs/ivshmem_device_spec.txt
diff --git a/docs/specs/ivshmem_device_spec.txt
b/docs/specs/ivshmem_device_spec.txt
new file mode 100644
. Only values of 1 are now
written to ensure correct usage
Cam Macdonell (5):
Device specification for shared memory PCI device
Support adding a file to qemu's ram allocation
Adds two new functions for assigning ioeventfd and irqfds.
Inter-VM shared memory PCI device
the stand-alone
Generic functions to assign irqfds and ioeventfds.
---
kvm-all.c | 44
kvm.h | 14 ++
2 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index fb8d4b8..d5c7775 100644
--- a/kvm-all.c
+++
@@
+/*
+ * Inter-VM Shared Memory PCI device.
+ *
+ * Author:
+ * Cam Macdonell c...@cs.ualberta.ca
+ *
+ * Based On: cirrus_vga.c and rtl8139.c
+ *
+ * This code is licensed under the GNU GPL v2.
+ */
+#include sys/mman.h
+#include sys/types.h
+#include sys/socket.h
+#include sys/io.h
+#include sys
this code is a standalone server which will pass file descriptors for the shared
memory region and eventfds to support interrupts between guests using inter-VM
shared memory.
---
contrib/ivshmem-server/Makefile | 16 ++
contrib/ivshmem-server/README | 30 +++
Apologies, I wasn't on the latest KVM HEAD and so missed that Michael had added
an irqfd assignment function (and a more correct one at that). So now this
patch has just one function.
---
kvm-all.c | 26 ++
kvm.h |7 +++
2 files changed, 33 insertions(+), 0
On Mon, Apr 12, 2010 at 2:57 PM, Avi Kivity a...@redhat.com wrote:
There is work now to bring msi to the generic pci 2.3 driver, perhaps we can
use that instead. From a quick look it looks fine.
I'd be interested to follow this development. I can't find anything
on LKML, is it being
On Mon, Apr 26, 2010 at 12:54 PM, Anthony Liguori anth...@codemonkey.ws wrote:
On 04/26/2010 01:49 PM, Marcelo Tosatti wrote:
On Mon, Apr 26, 2010 at 01:27:30PM -0500, Anthony Liguori wrote:
On 04/26/2010 12:59 PM, Marcelo Tosatti wrote:
Which allows drivers to register an mmaped region
On Mon, Apr 26, 2010 at 11:59 AM, Marcelo Tosatti mtosa...@redhat.com wrote:
Which allows drivers to register an mmaped region into ram block mappings.
To be used by device assignment driver.
CC: Cam Macdonell c...@cs.ualberta.ca
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
---
cpu
On Wed, May 5, 2010 at 5:20 PM, Frank Berreth frank...@google.com wrote:
Hi there,
this is just an update if you are interested in the outcome. I turns out
that my initial assumption that there would be page faults/trapping on the
memory pages was false. The reason the throughput is so low is
On Thu, May 6, 2010 at 11:32 AM, Anthony Liguori anth...@codemonkey.ws wrote:
On 04/21/2010 12:53 PM, Cam Macdonell wrote:
Support an inter-vm shared memory device that maps a shared-memory object
as a
PCI device in the guest. This patch also supports interrupts between
guest
On Mon, May 10, 2010 at 5:59 AM, Avi Kivity a...@redhat.com wrote:
On 04/21/2010 08:53 PM, Cam Macdonell wrote:
Support an inter-vm shared memory device that maps a shared-memory object
as a
PCI device in the guest. This patch also supports interrupts between
guest by
communicating over
On Mon, May 10, 2010 at 4:39 AM, Avi Kivity a...@redhat.com wrote:
On 04/21/2010 08:53 PM, Cam Macdonell wrote:
This avoids the need of using qemu_ram_alloc and mmap with MAP_FIXED to
map a
host file into guest RAM. This function mmaps the opened file anywhere
and adds
the memory
On Mon, May 10, 2010 at 9:28 AM, Avi Kivity a...@redhat.com wrote:
On 05/10/2010 06:22 PM, Cam Macdonell wrote:
+
+ /* if the position is -1, then it's shared memory region fd */
+ if (incoming_posn == -1) {
+
+ s-num_eventfds = 0;
+
+ if (check_shm_size(s
On Mon, May 10, 2010 at 9:38 AM, Anthony Liguori anth...@codemonkey.ws wrote:
On 05/10/2010 10:28 AM, Avi Kivity wrote:
On 05/10/2010 06:22 PM, Cam Macdonell wrote:
+
+ /* if the position is -1, then it's shared memory region fd */
+ if (incoming_posn == -1) {
+
+ s
On Mon, May 10, 2010 at 10:40 AM, Avi Kivity a...@redhat.com wrote:
On 05/10/2010 06:41 PM, Cam Macdonell wrote:
What would happen to any data written to the BAR before the the handshake
completed? I think it would disappear.
But, the BAR isn't there until the handshake is completed. Only
On Mon, May 10, 2010 at 11:25 AM, Anthony Liguori anth...@codemonkey.ws wrote:
On 05/10/2010 11:59 AM, Avi Kivity wrote:
On 05/10/2010 06:38 PM, Anthony Liguori wrote:
Otherwise, if the BAR is allocated during initialization, I would have
to use MAP_FIXED to mmap the memory. This is what I
On Mon, May 10, 2010 at 11:52 AM, Anthony Liguori anth...@codemonkey.ws wrote:
On 05/10/2010 12:43 PM, Cam Macdonell wrote:
On Mon, May 10, 2010 at 11:25 AM, Anthony Liguorianth...@codemonkey.ws
wrote:
On 05/10/2010 11:59 AM, Avi Kivity wrote:
On 05/10/2010 06:38 PM, Anthony Liguori
On Mon, May 10, 2010 at 5:59 AM, Avi Kivity a...@redhat.com wrote:
On 04/21/2010 08:53 PM, Cam Macdonell wrote:
Support an inter-vm shared memory device that maps a shared-memory object
as a
PCI device in the guest. This patch also supports interrupts between
guest by
communicating over
On Tue, May 11, 2010 at 8:03 AM, Avi Kivity a...@redhat.com wrote:
On 05/11/2010 04:10 PM, Anthony Liguori wrote:
On 05/11/2010 02:59 AM, Avi Kivity wrote:
(Replying again to list)
What data structure would you use? For a lockless ring queue, you can
only support a single producer and
On Tue, May 11, 2010 at 9:51 AM, Anthony Liguori anth...@codemonkey.ws wrote:
On 05/11/2010 09:53 AM, Avi Kivity wrote:
On 05/11/2010 05:17 PM, Cam Macdonell wrote:
The master is the shared memory area. It's a completely separate entity
that is represented by the backing file (or shared
On Tue, May 11, 2010 at 11:05 AM, Anthony Liguori anth...@codemonkey.ws wrote:
On 05/11/2010 11:39 AM, Cam Macdonell wrote:
Most of the people I hear from who are using my patch are using a peer
model to share data between applications (simulations, JVMs, etc).
But guest-to-host applications
On Tue, May 11, 2010 at 12:13 PM, Avi Kivity a...@redhat.com wrote:
On 05/11/2010 08:05 PM, Anthony Liguori wrote:
On 05/11/2010 11:39 AM, Cam Macdonell wrote:
Most of the people I hear from who are using my patch are using a peer
model to share data between applications (simulations, JVMs
On Wed, May 12, 2010 at 9:49 AM, Avi Kivity a...@redhat.com wrote:
On 05/10/2010 07:48 PM, Cam Macdonell wrote:
On Mon, May 10, 2010 at 10:40 AM, Avi Kivitya...@redhat.com wrote:
On 05/10/2010 06:41 PM, Cam Macdonell wrote:
What would happen to any data written to the BAR before
On Mon, May 10, 2010 at 5:59 AM, Avi Kivity a...@redhat.com wrote:
On 04/21/2010 08:53 PM, Cam Macdonell wrote:
+
+ /* allocate/initialize space for interrupt handling */
+ s-eventfds = qemu_mallocz(s-nr_alloc_guests * sizeof(int *));
+ s-eventfd_table = qemu_mallocz(s
On Mon, May 10, 2010 at 10:52 AM, Anthony Liguori anth...@codemonkey.ws wrote:
Yes, I think the ack is the way to go, so the guest has to be aware of
it. Would setting a flag in the driver-specific config space be an
acceptable ack that the shared region is now mapped?
You know it's mapped
The phys_ram_dirty array consists of 8-bit values for storing 3 dirty bits.
Change to more generic phys_ram_flags and use lower 4-bits for dirty status and
leave upper 4 for other uses of marking memory pages.
One potential use for upper bits is to mark certain device pages to not be
migrated.
Non-migrated memory is useful for devices that do not want to take memory
region data with them on migration.
As suggested by Avi, an alternative approach could add a flags parameter to
cpu_register_physical_memory() rather than explicityly call
cpu_mark_pages_no_migrate(). However, having a
---
kvm-all.c | 32
kvm.h |1 +
2 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 47f58a6..2982631 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1257,6 +1257,38 @@ int kvm_set_signal_mask(CPUState *env, const
phys_ram_dirty are 8-bit values storing 3 dirty bits. Change to more generic
phys_ram_flags and use lower 4-bits for dirty status and leave upper 4 for
other uses.
The names of functions may need to be changed as well, such as
c_p_m_get_dirty().
---
cpu-all.h | 16 +---
exec.c
:
- moved to single Doorbell register and use datamatch to trigger different
VMs rather than one register per eventfd
- remove writing arbitrary values to eventfds. Only values of 1 are now
written to ensure correct usage
Cam Macdonell (6):
Device specification for shared memory PCI
This is useful for devices that do not want to take memory regions data with
them on migration.
---
arch_init.c | 28
cpu-all.h|2 ++
cpu-common.h |2 ++
exec.c | 12
4 files changed, 32 insertions(+), 12 deletions(-)
diff --git
/ivshmem.c
@@ -0,0 +1,852 @@
+/*
+ * Inter-VM Shared Memory PCI device.
+ *
+ * Author:
+ * Cam Macdonell c...@cs.ualberta.ca
+ *
+ * Based On: cirrus_vga.c
+ * Copyright (c) 2004 Fabrice Bellard
+ * Copyright (c) 2004 Makoto Suzuki (suzu)
+ *
+ * and rtl8139.c
this code is a standalone server which will pass file descriptors for the shared
memory region and eventfds to support interrupts between guests using inter-VM
shared memory.
---
contrib/ivshmem-server/Makefile | 16 ++
contrib/ivshmem-server/README | 30 +++
+ *
+ * (C) 2009 Cam Macdonell
+ * based on Hilscher CIF card driver (C) 2007 Hans J. Koch h...@linutronix.de
+ *
+ * Licensed under GPL version 2 only.
+ *
+ */
+
+#include linux/device.h
+#include linux/module.h
+#include linux/pci.h
+#include linux/uio_driver.h
+
+#include asm/io.h
+
+#define
On Sat, Jun 5, 2010 at 3:44 AM, Blue Swirl blauwir...@gmail.com wrote:
On Fri, Jun 4, 2010 at 9:45 PM, Cam Macdonell c...@cs.ualberta.ca wrote:
Support an inter-vm shared memory device that maps a shared-memory object as
a
PCI device in the guest. This patch also supports interrupts between
On Mon, Oct 12, 2009 at 2:55 AM, Avi Kivity a...@redhat.com wrote:
On 10/12/2009 08:53 AM, Sivaram Kannan wrote:
Hi all,
I am a KVM newbie and I picked up the following task from the TODO of the
KVM wiki.
Add a qemu interface for sharing memory between guests. Using a pci device
to
On Tue, Jun 8, 2010 at 1:15 PM, Alex Williamson
alex.william...@redhat.com wrote:
This makes the RAM block list easier to manipulate. Also incorporate
relevant variables into the RAMList struct.
Signed-off-by: Alex Williamson alex.william...@redhat.com
---
arch_init.c | 14 ++-
Hi Anthony,
Is my implementation of master/peer roles acceptable? I realize with
Alex's RAMList changes I may need to modify my patch, but is the
approach of marking memory non-migratable an acceptable
implementation?
Thanks,
Cam
On Fri, Jun 4, 2010 at 3:45 PM, Cam Macdonell c
On Mon, Jun 14, 2010 at 9:51 AM, Anthony Liguori anth...@codemonkey.ws wrote:
On 06/04/2010 04:45 PM, Cam Macdonell wrote:
This is useful for devices that do not want to take memory regions data
with them on migration.
---
arch_init.c | 28
cpu-all.h
On Mon, Jun 14, 2010 at 9:53 AM, Anthony Liguori anth...@codemonkey.ws wrote:
On 06/04/2010 04:45 PM, Cam Macdonell wrote:
this code is a standalone server which will pass file descriptors for the
shared
memory region and eventfds to support interrupts between guests using
inter-VM
shared
How does this look for marking the device as non-migratable? It adds a field
'no_migrate' to the SaveStateEntry and tests for it in vmstate_save. This would
replace anything that touches memory.
Cam
---
hw/hw.h |1 +
savevm.c | 32 +---
2 files changed, 30
A non-migratable device should be removed before migration and re-added after.
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
hw/hw.h |1 +
savevm.c | 32 +---
2 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index d78d814
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
kvm-all.c | 32
kvm.h |1 +
2 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 47f58a6..2982631 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1257,6 +1257,38
=path,id=id
The shared memory server, sample programs and init scripts are in a git repo
here:
www.gitorious.org/nahanni
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
Makefile.target |3 +
hw/ivshmem.c| 823 +++
qemu-char.c
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
docs/specs/ivshmem_device_spec.txt | 96
1 files changed, 96 insertions(+), 0 deletions(-)
create mode 100644 docs/specs/ivshmem_device_spec.txt
diff --git a/docs/specs/ivshmem_device_spec.txt
b/docs
:
- moved to single Doorbell register and use datamatch to trigger different
VMs rather than one register per eventfd
- remove writing arbitrary values to eventfds. Only values of 1 are now
written to ensure correct usage
Cam Macdonell (4):
Device specification for shared memory PCI
On Tue, Jun 15, 2010 at 10:32 AM, Anthony Liguori anth...@codemonkey.ws wrote:
On 06/15/2010 11:16 AM, Cam Macdonell wrote:
How does this look for marking the device as non-migratable? It adds a
field
'no_migrate' to the SaveStateEntry and tests for it in vmstate_save. This
would
replace
][,role=peer|master]
-chardev socket,path=path,id=id
The shared memory server, sample programs and init scripts are in a git repo
here:
www.gitorious.org/nahanni
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
Makefile.target |3 +
hw/ivshmem.c| 828
On Tue, Jul 6, 2010 at 8:46 AM, Juan Quintela quint...@redhat.com wrote:
Today was a short call as Anthony didn't attend.
- Jes reminded people that Linux Plumbers deadline is July 19th
- Qemu 0.13 (from the agenda, we didn't discuss it without Anthony).
List of patches missing
][,msi=on][,irqfd=on][,vectors=n][,role=peer|master]
-chardev socket,path=path,id=id
The shared memory server, sample programs and init scripts are in a git repo
here:
www.gitorious.org/nahanni
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
Makefile.target |3 +
hw/ivshmem.c
On Mon, Jul 26, 2010 at 7:48 AM, Anthony Liguori anth...@codemonkey.ws wrote:
On 06/15/2010 03:23 PM, Cam Macdonell wrote:
Latest patch for PCI shared memory device that maps a host shared memory
object
to be shared between guests
Is this against qemu.git or qemu-kvm.git? It depends
On Mon, Jul 26, 2010 at 1:51 PM, Avi Kivity a...@redhat.com wrote:
On 07/26/2010 10:01 PM, Cam Macdonell wrote:
Is this against qemu.git or qemu-kvm.git? It depends on functions like
qemu_ram_map() which are not present in qemu.git (and are present in
qemu-kvm.git).
It is against qemu
On Mon, Jul 26, 2010 at 2:11 PM, Avi Kivity a...@redhat.com wrote:
On 07/26/2010 11:03 PM, Cam Macdonell wrote:
Please add qemu_ram_map() as a separate patch to avoid interdependencies.
Try to keep it at the same place etc., that will reduce merge
difficulties
later.
qemu_ram_map() isn't
arbitrary values to eventfds. Only values of 1 are now
written to ensure correct usage
Cam Macdonell (5):
Provide a function to add an allocated region of memory to the qemu
RAM.
Device specification for shared memory PCI device
Add function to assign ioeventfd to MMIO.
Support marking
Provide a function to add an allocated region of memory to the qemu RAM.
This patch is copied from Marcelo's qemu_ram_map() in qemu-kvm and given the
clearer name qemu_ram_alloc_from_ptr().
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
cpu-common.h |2 ++
exec.c | 43
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
kvm-all.c | 32
kvm.h |1 +
2 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 7635f2f..d9a5dd0 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1241,6 +1241,38
A non-migratable device should be removed before migration and re-added after.
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
hw/hw.h |2 ++
savevm.c | 44 +---
2 files changed, 43 insertions(+), 3 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
,path=path,id=id
The shared memory server, sample programs and init scripts are in a git repo
here:
www.gitorious.org/nahanni
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
Makefile.target |3 +
hw/ivshmem.c| 834 +++
qemu
=on][,vectors=n][,role=peer|master]
-chardev socket,path=path,id=id
The shared memory server, sample programs and init scripts are in a git repo
here:
www.gitorious.org/nahanni
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
Makefile.target |3 +
hw/ivshmem.c| 828
On Wed, Aug 11, 2010 at 4:35 AM, Stefan Weil w...@mail.berlios.de wrote:
Am 27.07.2010 18:54, schrieb Cam Macdonell:
resend for bug fix related to removal of irqfd
Support an inter-vm shared memory device that maps a shared-memory object
as a
PCI device in the guest. This patch also
---
Makefile.target |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile.target b/Makefile.target
index b791492..c8281e9 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -191,7 +191,7 @@ obj-y += rtl8139.o
obj-y += e1000.o
# Inter-VM PCI shared memory
-obj-y
---
kvm-stub.c |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/kvm-stub.c b/kvm-stub.c
index 3378bd3..d45f9fa 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -136,3 +136,8 @@ int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr,
uint16_t val, bool assign)
{
return
On Wed, Aug 11, 2010 at 2:28 PM, Stefan Weil w...@mail.berlios.de wrote:
Am 11.08.2010 20:16, schrieb Cam Macdonell:
---
kvm-stub.c | 5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/kvm-stub.c b/kvm-stub.c
index 3378bd3..d45f9fa 100644
--- a/kvm-stub.c
+++ b/kvm
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
kvm-stub.c |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/kvm-stub.c b/kvm-stub.c
index 3378bd3..d45f9fa 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -136,3 +136,8 @@ int kvm_set_ioeventfd_pio_word(int fd, uint16_t
Signed-off-by: Cam Macdonell c...@cs.ualberta.ca
---
Makefile.target |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile.target b/Makefile.target
index b791492..c8281e9 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -191,7 +191,7 @@ obj-y += rtl8139.o
obj-y
On Sat, Aug 14, 2010 at 11:24 AM, Andreas Färber andreas.faer...@web.de wrote:
Am 11.08.2010 um 20:16 schrieb Cam Macdonell:
---
kvm-stub.c | 5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/kvm-stub.c b/kvm-stub.c
index 3378bd3..d45f9fa 100644
--- a/kvm-stub.c
Hi Khaled,
On Sun, Feb 28, 2010 at 1:20 PM, Khaled Ibrahim kz...@hotmail.com wrote:
Cam,I am interested in the shared memory support you developed on
KVM, but the whole process is not very clear to me. I patched the kernel on
the
guest OSs and used the samples codes found in
PCI
device
+ *
+ * Copyright 2009 Cam Macdonell c...@cs.ualberta.ca
+ *
+ * Based on cirrusfb.c and 8139cp.c:
+ * Copyright 1999-2001 Jeff Garzik
+ * Copyright 2001-2004 Jeff Garzik
+ *
+ */
+
+#include linux/init.h
+#include linux/kernel.h
+#include linux/module.h
+#include linux
:
+ * Cam Macdonell c...@cs.ualberta.ca
+ *
+ * Based On: cirrus_vga.c and rtl8139.c
+ *
+ * This code is licensed under the GNU GPL v2.
+ */
+
+#include hw.h
+#include console.h
+#include pc.h
+#include pci.h
+#include sysemu.h
+
+#include qemu-common.h
+#include sys/mman.h
+#include sys/socket.h
On Wed, Mar 3, 2010 at 12:06 AM, Khaled Ibrahim kz...@hotmail.com wrote:
Hi Cam,
I used your patches successfully to support shared memory on KVM and
used the test cases successfully, but qemu-kvm crashes when I increased the
size of the shared memory. I
applied the ivshmem patch to
On Wed, Mar 3, 2010 at 3:38 PM, Khaled Ibrahim kz...@hotmail.com wrote:
Date: Wed, 3 Mar 2010 15:09:17 -0700
Subject: Re: IVSHMEM and limits on shared memory
From: c...@cs.ualberta.ca
To: kz...@hotmail.com
CC: kvm@vger.kernel.org
On Wed, Mar 3,
On Thu, Mar 4, 2010 at 1:12 PM, Khaled Ibrahim kz...@hotmail.com wrote:
As a test, I removed anywhere my patch stored the size of the shared
memory region and hard coded the size of 512 MB into qemu_ram_alloc
and pci_register_bar, so that my patch never writes the size of the
memory region
ide/pci.o ide/piix.o
obj-i386-y += pckbd.o $(sound-obj-y) dma.o
diff --git a/hw/ivshmem.c b/hw/ivshmem.c
new file mode 100644
index 000..aa88c07
--- /dev/null
+++ b/hw/ivshmem.c
@@ -0,0 +1,561 @@
+/*
+ * Inter-VM Shared Memory PCI device.
+ *
+ * Author:
+ * Cam Macdonell c
This avoids the need of using qemu_ram_alloc and mmap with MAP_FIXED to map a
host file into guest RAM. This function mmaps the opened file anywhere and
adds the memory to the ram blocks.
Usage is
qemu_add_file_to_ram(fd, size, MAP_SHARED);
---
cpu-common.h |1 +
exec.c | 33
1 - 100 of 164 matches
Mail list logo