public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* need some help with shared memory
@ 2007-11-05 19:54 Francesco Cipollone
       [not found] ` <d269bda00711051154w122ef528n7e3ee07ed1daf44e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Francesco Cipollone @ 2007-11-05 19:54 UTC (permalink / raw)
  To: kvm-devel


[-- Attachment #1.1: Type: text/plain, Size: 608 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 658 bytes --]

[-- Attachment #2: Type: text/plain, Size: 314 bytes --]

-------------------------------------------------------------------------
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/

[-- Attachment #3: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

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

* Re: need some help with shared memory
       [not found] ` <d269bda00711051154w122ef528n7e3ee07ed1daf44e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-11-05 22:10   ` Izik Eidus
  0 siblings, 0 replies; 2+ messages in thread
From: Izik Eidus @ 2007-11-05 22:10 UTC (permalink / raw)
  To: Francesco Cipollone; +Cc: kvm-devel

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/

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

end of thread, other threads:[~2007-11-05 22:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-05 19:54 need some help with shared memory Francesco Cipollone
     [not found] ` <d269bda00711051154w122ef528n7e3ee07ed1daf44e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-11-05 22:10   ` Izik Eidus

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