[vbox-dev] Shared memory API like mmap for fast IPC

Nev vbox at zavalon.com
Thu Oct 9 20:44:53 GMT 2008


Thank you (and Frank) for your responses.

I was unable to build the source on CentOS 5 (because of missing
PulseAudio), but did get it to build on Ubuntu 8.04, running as a vbox
guest.

I have not spent a lot of time looking at the source, but have looked at
the SDKRef.pdf. My immediate problems are

1. I was unable to find any functions that would allow a program to be
launched within a guest from the host. Have I missed something, or is
this not supported in the existing API.

2. The existing shared memory API requires the guest to share a "guest
physical" memory block with the host. Is my understanding correct, that
this will not allow guest to guest sharing of a memory block? I failed
to state this requirement in my original question; but I need to be able
to create a shared memory block, that is shared by the host and multiple
guests.

Thank you


-----Original Message-----
From: Sander van Leeuwen <Sander.Vanleeuwen at Sun.COM>
Reply-To: VirtualBox developer's list <vbox-dev at virtualbox.org>
To: VirtualBox developer's list <vbox-dev at virtualbox.org>
Subject: Re: [vbox-dev] Shared memory API like mmap for fast IPC
Date: Wed, 08 Oct 2008 13:22:52 +0200

There is unfortunately no documentation on HGCM right now.
HGCM (which stands for host-guest communication manager) consists of two 
components:
- guest client (e.g. clipboard: 
src\VBox\Additions\winnt\VBoxTray\VBoxClipboard.cpp
- host server (e.g. clipboard: src\VBox\HostServices\SharedClipboard)

The host server must register itself in the HGCM name space. The 
supported host services
are currently hard coded in src\VBox\Main\VMMDevInterface.cpp 
(VMMDev::drvConstruct).
We could make this more generic if required, but it's enough to start with.

The guest client talks to the VBox guest additions driver to connect to 
the host service. Once
connected they can talk to each other. Communication can be done using 
copying or sharing
guest physical addresses.

Hope that helps to get you started,

Sander

Nev wrote:
> The following, is a post I made on the VirtualBox user forum. And
> "sandervl" from Sun Microsystems, suggest I redirect my question here.
>
> I have an application that requires very fast communications between the
> guest application and host application. Host is Linux, Centos 5, Guest
> is XP. Current implementation is based on VMware workstation 6.0 using
> VMCI shared memory interface, but this interface has been removed in
> workstation 6.5 and replaced with a socket interface, which is way too
> slow. I have searched, but unable to find any such interface in
> VirtualBox. Is it possible to share memory with an existing interface,
> that I have missed?
>
> sandervl suggested the HGCM interface is appropriate (with some
> coding?), I have been unable to find any documentation on this
> interface. Is it documented, or do I need to refer to the source?
>
> I have downloaded the source, but have not yet been able to satisfy the
> Prerequisites. Current issue is missing PulseAudio.
>
> Any help would be appreciated
>
> Thank you
>
>
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-dev
>   







More information about the vbox-dev mailing list