From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Re: Sharing variables/memory between host and guest ? Date: Sat, 12 Jul 2008 15:33:48 +0300 Message-ID: <4878A4AC.7070805@qumranet.com> References: <896ae46a0807111716u49fda2d7uf6481aa6c09daa90@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Arn Return-path: Received: from il.qumranet.com ([212.179.150.194]:13983 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752552AbYGLMfY (ORCPT ); Sat, 12 Jul 2008 08:35:24 -0400 In-Reply-To: <896ae46a0807111716u49fda2d7uf6481aa6c09daa90@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Arn wrote: > How can one share memory (a few variables not necessarily a page) > between host/hypervisor and guest VM ? > Since the guest is just a process within the host, there should be > existing ways to do this. > It's not that straight forward since the host has its pfn (page frame number) while the guest has gfn (guest frame number) and also use virtual memory. > What about using something like debugfs or sysfs, is it possible to > share variables this way ? Note, I want a system that > is fast, i.e. changes to shared variable/memory should be visible instantly. > > A paravirtualized driver can take care of that with driver in the guest and device side in qemu/host kernel. You can use 9p virtio solution in Linux that implements a shared file system. > I search the kvm-devel archives and found emails referring to "kshmem" > but a search on the kvm-70 code turns up nothing. > There are also some emails on sharing a page but no final outcome or > what exactly to do. > > Thanks > Arn > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >