tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
uvm object page remove question
Hello,
for Xen I need some non-standard VM operation: the tools want to map
some Xen objects for which we don't have a physical address.
The map/unmap operations are done with hypercalls which does the
page table update. In my implementation the tools ask the kernel to
do this via a ioctl on /kern/xen/privcmds
When a tool wants to map one of these Xen object, it first does a
mmap() to get some virtual space, and then an ioctl to map it.
The ioctl allocates a uvm_object and uvm_map() it for the range.
The pgo_fault() handler will map the VA to the Xen object using the
dedictated hypercall; this works fine.
But I have a problem for unmap: when uvm wants to remove the mapping
(either because the process called munmap() or because it exited),
pmap_remove() will try to clear the page table entries for this
special mapping, and Xen will kill the VM. This has to be done with
the right hypercall.
I see 2 ways to fix this: add a pgo_remove() and have UVM call it,
or intercept the pmap_remove() calls at the pmap level, and check
the VA against our uvm_objects.
Is there something I missed to get a custom page remove for uvm ojbects ?
what would be the best way to handle this ?
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index