From mboxrd@z Thu Jan 1 00:00:00 1970 From: Izik Eidus Subject: Re: need some help with shared memory Date: Tue, 06 Nov 2007 00:10:45 +0200 Message-ID: <472F94E5.503@qumranet.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Francesco Cipollone Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Francesco Cipollone wrote: > Hy, > i'm trying to do somthing like a shared memory for communication > between host and guest > now i'v implemented something very trivial: > a buffer in guest kernel of dimension sizeof(STRING)+10*sizeof(char) > where i put a STRING. > i search from host kernel the STRING in qemu memory space (from task > struct) and use the remaining 10 chars as a buffer. > the problem is that when i find the string in the qemu address space i > can't see the changes in the buffer. > if i do some changes in buffer in GUEST i can't see these changes in > the HOST... > if someone is interested to this problem let me know. > thanks > Francesco > i dont understand how such thing can happn, how do you access the guest memory?, (from task_struct ?!!?) changing the the memory phys_ram_base is poiting to, will change the memory the guest will see i suggest for you to start with: allocate in the guest block of memory, give to the host the physical (the virtual is useless) address of this memory, and start to play and see how each see every change another thing you might want to look at is: cpu_physical_memory_rw() in qemu/exec.c (note that this function do iomem as well as physical memory write) (this really not going to be easy if you not familier with qemu, so feel free to ask any "look like trivial question" you have!) ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/