public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* shared memory between host and VMs (windows xp) using virtio
@ 2009-10-23  9:29 Nev
  2009-10-25 14:03 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Nev @ 2009-10-23  9:29 UTC (permalink / raw)
  To: kvm

I need to be able to share memory between guest VMs and the host. I have
been using VMware workstation 6.0.5. As Cam Macdonell stated in one of
his posts, VMware dropped the shared memory as part of their VMCI
interface in later versions. I am the person he refered to in his post
that is running simulation across multiple VMs.

My requirements are different from Cam's. 
1. I need to be able to dynamically allocate multiple blocks of shared
memory of different sizes. Size of each shared block can vary from a few
bytes to a few MBytes
2. I need to be able to have any number of Guest, include zero, and any
number of host processes, including zero, sharing the memory.
3. The virtual address used to access the memory *can* be different for
each host process and guest process. eg no requirements
4. I dont need interrupts.

A user interface like the following could satisfy my requirements.
connect(char const * const key, int const size)
disconnect(char const * const key)
and a query and cleanup function for when users code fails to
disconnect.

or something like shmget, shmat, shmdt, shmctl.

I expect to use shm* as the backend to allocate the shared memory.

I *think* I will need a host kernel module (device drive?) to service
the requests.
The module needs to be accessible from use level host code, and user
guest code via a Guest device driver, or service and then via virtio to
the host module.

I am assuming there is little or no documentation for virtio, and I need
to look at the code.

I would like a little help to get started.
1. Should I be looking at quemu-kvm or kvm or somewhere else?
2. Can I get some hints at what function to look for and where?
3. If there is any documentation please indicate where I might find it.

I would prefer to *not* modify the existing kvm code, but would prefer
to write stand allow modules that interface to the kvm code. I will be
happy to make the source for these modules publicly available.

Any help will be greatly appreciated. 

Nev


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: shared memory between host and VMs (windows xp) using virtio
  2009-10-23  9:29 shared memory between host and VMs (windows xp) using virtio Nev
@ 2009-10-25 14:03 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-10-25 14:03 UTC (permalink / raw)
  To: kvm; +Cc: kvm

On 10/23/2009 11:29 AM, Nev wrote:
> I need to be able to share memory between guest VMs and the host. I have
> been using VMware workstation 6.0.5. As Cam Macdonell stated in one of
> his posts, VMware dropped the shared memory as part of their VMCI
> interface in later versions. I am the person he refered to in his post
> that is running simulation across multiple VMs.
>
> My requirements are different from Cam's.
> 1. I need to be able to dynamically allocate multiple blocks of shared
> memory of different sizes. Size of each shared block can vary from a few
> bytes to a few MBytes
> 2. I need to be able to have any number of Guest, include zero, and any
> number of host processes, including zero, sharing the memory.
> 3. The virtual address used to access the memory *can* be different for
> each host process and guest process. eg no requirements
> 4. I dont need interrupts.
>    

Probably best served with a single shared area with an internal memory 
allocator.

> I *think* I will need a host kernel module (device drive?) to service
> the requests.
> The module needs to be accessible from use level host code, and user
> guest code via a Guest device driver, or service and then via virtio to
> the host module.
>
>    

No need for host kernel modifications (as Cam's work shows).

> I am assuming there is little or no documentation for virtio, and I need
> to look at the code.
>
> I would like a little help to get started.
> 1. Should I be looking at quemu-kvm or kvm or somewhere else?
> 2. Can I get some hints at what function to look for and where?
> 3. If there is any documentation please indicate where I might find it.
>    

virtio is mostly useful for dynamic dma from guest memory; for static 
sharing of host memory it isn't a good fit.

> I would prefer to *not* modify the existing kvm code, but would prefer
> to write stand allow modules that interface to the kvm code. I will be
> happy to make the source for these modules publicly available.
>
> Any help will be greatly appreciated.
>    

Best starting point is Cam's patches, IMO.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-25 14:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-23  9:29 shared memory between host and VMs (windows xp) using virtio Nev
2009-10-25 14:03 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox