VirtualBox and vtophys

Kostik Belousov kostikbel at
Wed Feb 24 15:32:22 UTC 2010

On Wed, Feb 24, 2010 at 09:43:20AM -0500, John Baldwin wrote:
> On Wednesday 24 February 2010 6:41:31 am Jacques Fourie wrote:
> > I've noticed that my virtualbox vboxdrv.ko started crashing after
> > updating my 8.0-stable install. The crash occurs when vboxdrv calls
> > vtophys() on a userland virtual address. Prior to r202894 this was
> > working fine. Modifying pmap_kextract() to use vtopte() for non-kernel
> > virtual adresses fixes the problem. Is it intended for vtophys() to
> > still work on userland virtual addresses?
> Use pmap_extract(pmap, ...) for user addresses.  Granted, that is only 
> reliable if the user pages have been wired in some fashion.

The reference code is in
sys/dev/cxgb/ulp/tom/cxgb_vm.c:vm_fault_hold_user_pages(), it holds
and returns the page that was mapped at the moment of the call at the
specified address.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url :

More information about the freebsd-hackers mailing list