It is defined in Mm.h (linux-2.6-xen-sparse\include\linux), and only
used in Memory.c (linux-2.6-xen-sparse\mm) as follow:
#ifdef CONFIG_XEN
if (vma && (vma->vm_flags & VM_FOREIGN)) {
struct page **map = vma->vm_private_data;
int offset = (start - vma->vm_start) >>
PAGE_SHIFT;
if (map[offset] != NULL) {
if (pages) {
struct page *page = map[offset];
pages[i] = page;
get_page(page);
}
if (vmas)
vmas[i] = vma;
i++;
start += PAGE_SIZE;
len--;
continue;
}
}
#endif
But I never saw when the bit is set, so this code path can not be
reached?
-Xin
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
> But I never saw when the bit is set, so this code path can not be > reached? >It''s used by the blktap driver. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
VM_FOREIGN is used to allow zero-copy of data pages for the blktap driver. When foreign block data pages are mapped to user space, the PTEs aren''t backed by page structs, so get_user_pages becomes upset when called to map the block requests down onto physical page addresses. VM_FOREIGN vm_areas use the vm_private_data field to contain an array of mappings to the associate page structs, and get_user_pages uses this table to handle pages that have been foreign mapped. The code that sets up the mapping is in drivers/xen/blktap.c. a. On 8/1/06, Keir Fraser <Keir.Fraser@cl.cam.ac.uk> wrote:> > > But I never saw when the bit is set, so this code path can not be > > reached? > > > > It''s used by the blktap driver. > > -- Keir > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel