Date: Mon, 1 Mar 2010 09:59:10 +0000 (GMT) From: Alexander Eichner <alexeichi@yahoo.de> To: freebsd-hackers@freebsd.org Subject: Allocating physical memory without a kernel mapping Message-ID: <317657.30145.qm@web27603.mail.ukl.yahoo.com>
next in thread | raw e-mail | index | archive | help
Hi,=0A=0AI'm currently trying to finish the R0 memory implementation[1] of = FreeBSD for VirtualBox. One of the missing methods allocates physical non c= ontiguous pages which don't need to have a kernel mapping (rtR0MemObjNative= AllocPhysNC). I'm using vm_phys_alloc_contig to achieve this. The pages are= than mapped into the user space VM process using pmap_enter (rtR0MemObjNat= iveMapUser) and if they are not needed anymore vm_page_free_toq is used to = free the pages (rtR0MemObjNativeFree).=0AEverything works as long as the VM= runs but if the VM process terminates and I do something else the host wil= l panic at some point (usually when I try to start a gnome session) with "p= map_enter: missing reference to page table page <va>"[2].=0AThere seems to = some problem with the wire count of that page but I can't see what I'm doin= g wrong at the moment.=0AThanks in advance for any help.=0A=0ARegards,=0AAl= exander Eichner=0A=0A[1] http://www.virtualbox.org/browser/trunk/src/VBox/R= untime/r0drv/freebsd/memobj-r0drv-freebsd.c?rev=3D26899=0A[2]http://fxr.wat= son.org/fxr/source/amd64/amd64/pmap.c?im=3Dbigexcerpts#L3076=0A=0A_________= _________________________________________=0ADo You Yahoo!?=0ASie sind Spam = leid? Yahoo! Mail verf=FCgt =FCber einen herausragenden Schutz gegen Massen= mails. =0Ahttp://mail.yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?317657.30145.qm>