Mmap to user space (question)
Quoted 119 lines · Ruslan Nikolaev
From: Ruslan Nikolaev <[email protected]>
Subject: Re: [Xen-devel] Mmap to user space (question)
To: "Keir Fraser" <[email protected]>
Date: Wednesday, October 6, 2010, 9:53 PM--- On Wed, 10/6/10, Keir Fraser <[email protected]>
Quoted 2 lines · wrote:
From: Keir Fraser <[email protected]>
Subject: Re: [Xen-devel] Mmap to user space(question)
Quoted 1 line
To: "Ruslan Nikolaev" <[email protected]>,
Quoted 6 lines
Date: Wednesday, October 6, 2010, 10:52 AM
Quoted 1 line · Ruslan Nikolaev
Note: I already posted the message on xci-devel,
but I
Quoted 2 lines
think this list is
Quoted 1 line
better suited for this question. So, I duplicated
it
Quoted 7 lines
here.
Quoted 6 lines
----
Hi
I need to map
shared_info(provided by hypervisorto
Quoted 2 lines
each guest) to user space
Quoted 1 line
(read-only access). I am curious how I can do it,
and
Quoted 8 lines
if there are some good
Quoted 1 line
examples for the case if NO autotranslation is
available. (BTW, Am I correct
Quoted 1 line
that I can use regular
vm_insert_pageor
remap_pfn_rangeif autotranslation isQuoted 1 line
available?)
I wouldn't worry about auto-translate for PV guests.
It's
Quoted 3 lines
pretty broken.
You will be using a similar mapping path to ioremap.
So
Quoted 4 lines
something like
remap_pfn_range. A function calledxen_remap_domain_mfn_rangesounds promising. There's no grant table or other nonsenseto
Quoted 2 lines
worry about. You just
need to get the page mapped into a special vmareathat
Quoted 6 lines
won't be subject to
paging or any other kernel VM machinery. Like mmap on/dev/memand/proc/xen/privcmd, then.-- Keir
Thank you! I think,
xen_remap_domain_mfn_rangeis indeed what I am looking for.Ruslan.
Quoted 2 lines
Quoted 2 lines
If I am correct,
shared_infopage is mappedinitially
Quoted 2 lines
into some fixmap area in
Quoted 1 line
the guest. However, no actual pfn exists for the
page.
Quoted 4 lines
Instead, guest gets mfn
Quoted 3 lines
address from
start_info.Now, what is the standard procedure to handle
this
Quoted 2 lines
situation? I found
Quoted 1 line
xen_remap_domain_mfn_rangefunction, but not sureif
Quoted 2 lines
it is what I am looking
Quoted 1 line
for. Also, I am not sure if I need to update
grant
Quoted 2 lines
tables. I would greatly
Quoted 1 line
appreciate if someone can enlighten me on this
issue,
Quoted 23 lines
and, perhaps, refer to
Quoted 8 lines
some examples.
Thank you!
Ruslan.
Quoted 6 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel