|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH 08/11] xen p2m: transparently change the p2m mapp
On Wed, 15 Dec 2010, Jeremy Fitzhardinge wrote:
> On 12/15/2010 05:40 AM, stefano.stabellini@xxxxxxxxxxxxx wrote:
> > From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> >
> > In m2p_add_override store the original mfn into page->index and then
> > change the p2m mapping, setting mfns as FOREIGN_FRAME.
> >
> > In m2p_remove_override restore the original mapping.
> >
> > Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> > ---
> > arch/x86/xen/p2m.c | 4 ++++
> > 1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
> > index 8db19d5..7dde8e4 100644
> > --- a/arch/x86/xen/p2m.c
> > +++ b/arch/x86/xen/p2m.c
> > @@ -407,8 +407,11 @@ static unsigned long mfn_hash(unsigned long mfn)
> > void m2p_add_override(unsigned long mfn, struct page *page)
> > {
> > unsigned long flags;
> > + unsigned long pfn = page_to_pfn(page);
> > page->private = mfn;
> > + page->index = pfn_to_mfn(pfn);
>
> Is there any risk that a page being used for a granted mfn will end up
> getting xen_create_contiguous_region() applied to it via the DMA API?
> That would be messy...
I don't think so because AFAIK xen_create_contiguous_region is only
called:
- by xen_swiotlb_fixup on xen_io_tlb_start (+ offset) that has been
allocated using alloc_bootmem;
- by xen_swiotlb_alloc_coherent on memory allocated using
__get_free_pages.
if in the future xen_create_contiguous_region will be called on other
memory ranges then maybe, but at the moment there are no problems.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 00/11] xen: allow usermode to map granted pages, Stefano Stabellini
- [Xen-devel] [PATCH 01/11] xen: define gnttab_set_map_op/unmap_op, stefano . stabellini
- [Xen-devel] [PATCH 03/11] xen/gntdev: add VM_PFNMAP to vma, stefano . stabellini
- [Xen-devel] [PATCH 02/11] xen/gntdev: allow usermode to map granted pages, stefano . stabellini
- [Xen-devel] [PATCH 05/11] xen: add m2p override mechanism, stefano . stabellini
- [Xen-devel] [PATCH 06/11] xen: gntdev: move use of GNTMAP_contains_pte next to the map_op, stefano . stabellini
- [Xen-devel] [PATCH 04/11] xen: move p2m handling to separate file, stefano . stabellini
- [Xen-devel] [PATCH 07/11] xen/gntdev: stop using "token" argument, stefano . stabellini
- [Xen-devel] [PATCH 08/11] xen p2m: transparently change the p2m mappings in the m2p override, stefano . stabellini
- [Xen-devel] [PATCH 09/11] xen: introduce gnttab_map_refs and gnttab_unmap_refs, stefano . stabellini
- [Xen-devel] [PATCH 11/11] xen p2m: clear the old pte when adding a page to m2p_override, stefano . stabellini
- [Xen-devel] [PATCH 10/11] xen gntdev: use gnttab_map_refs and gnttab_unmap_refs, stefano . stabellini
- [Xen-devel] Re: [PATCH 00/11] xen: allow usermode to map granted pages, Stefano Stabellini
|
|
|
|
|