Skip to contentSkip to conversation

How to share memory with kernel and hypervisor?

DISCUSSION DcMichael 3 participants 3 messages Dec 7, 2011 – Dec 15, 2011

lore
Share & tools
lore

DcMichael

author
#0 lore raw

Hi!
I'm first in here.
anyway I want to make kernel and hypervisor share there memory. which the kernal write memory, then hypervisor can read it. without any function like copy_from_user.

I'll use this memory very many time, so I want share memory like shmget. but using ring use push function every time.

can I share memory like this way?

#1 lore raw
Quoted 8 lines · DcMichael

Hi!
I'm first in here.
anyway I want to make kernel and hypervisor share there memory. which the kernal write memory, then hypervisor can read it. without any function like copy_from_user.

I'll use this memory very many time, so I want share memory like shmget. but using ring use push function every time.

Why would you want to do this? Maybe a better question is - what is your goal.

Quoted 2 lines

can I share memory like this way?

Sure.. You would have to setup the hypervisor to have a pagetable entry for the physical page.

Quoted 6 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
In reply to DcMichael
Quoted 10 lines · DcMichael

Hi!
I'm first in here.
anyway I want to make kernel and hypervisor share there memory. which the kernal write memory, then hypervisor can read it. without any function like copy_from_user.

I'll use this memory very many time, so I want share memory like shmget. but using ring use push function every time.

can I share memory like this way?

Using share_xen_page_with_guest() might be one way.

Ian.