From owner-freebsd-current@FreeBSD.ORG Wed Feb 24 12:26:12 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE383106564A for ; Wed, 24 Feb 2010 12:26:12 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-fx0-f226.google.com (mail-fx0-f226.google.com [209.85.220.226]) by mx1.freebsd.org (Postfix) with ESMTP id 703D88FC1D for ; Wed, 24 Feb 2010 12:26:12 +0000 (UTC) Received: by fxm26 with SMTP id 26so2794962fxm.13 for ; Wed, 24 Feb 2010 04:26:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=YhMP6ZuULnBVsdzROwLhHo6j1uBHHLal/E33ncspBVE=; b=pJEzRMmhFiIBXuwhThZoyQV615wz8P73FxscZegamr4pLqj+u+yFAKKe7e+GTxWFOb /blJUoHhpFn9Pg1mNDEiKaxwqN4iwLKLQdGMtxLWtZIRvbrRx7g0q2xAh8VQJsV4ooRk BN0bwuE1CMKATTyOgHvfiFPm6HoVQ06xDK3KE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=VJRV1BFhtcJtCi/7VRsL1wD2ZNB4ICucSrS8FnsT2K2NWIUDayJw5IPQdl/dwBftkl 4iOYhV26B2jx5VJ0flugFUSeJoHVox/dOJwdzmRlV6z6LF+vr58olh3uf1IrVxJfEFzI MXIMTh3vOFtXYzFvXlFu8/dL0kLGGVkd/96L8= MIME-Version: 1.0 Received: by 10.223.95.69 with SMTP id c5mr8760957fan.44.1267014365576; Wed, 24 Feb 2010 04:26:05 -0800 (PST) In-Reply-To: References: <61b573981002240058m51a45bf8l1ca55063ef277492@mail.gmail.com> Date: Wed, 24 Feb 2010 13:26:05 +0100 Message-ID: <4e6cba831002240426l6a549e24i81ea85e523422fe4@mail.gmail.com> From: Giovanni Trematerra To: Jacques Fourie Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Ian FREISLICH , Shteryana Shopova , current@freebsd.org Subject: Re: Virtualbox X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2010 12:26:12 -0000 On Wed, Feb 24, 2010 at 12:16 PM, Jacques Fourie wrote: > As a test you can apply the following mod to sys/i386/include/pmap.h > and re-compile vboxdrv.ko. It fixed the problem for me but I'm by no > means an expert on the i386 pmap stuff so use at your own risk. Also > revert the change to pmap.h after re-compiling vboxdrv just so that > you don't inadvertently break something else. > > Index: pmap.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- pmap.h =A0 =A0 =A0(revision 204194) > +++ pmap.h =A0 =A0 =A0(working copy) > @@ -296,7 +296,10 @@ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * however, safe to use the old PDE becaus= e the page table > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * page is preserved by the promotion. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 */ > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 pa =3D KPTmap[i386_btop(va)]; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (va >=3D KERNBASE) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pa =3D KPTmap[i386_btop(va)= ]; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 else > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pa =3D *vtopte(va); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pa =3D (pa & PG_FRAME) | (va & PAGE_MASK); > =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0return (pa); pmap_kextract is intend to be used with kernel virtual addresses and not user virtual addresses. The problem lies in the driver not in the kernel. The vboxdrv call vtophys macro passing user virtual addresses through rtR0MemObjNativeGetPagePhysAddr and this is wrong. If you want a way to get virtualbox works try to revert this commit (r20289= 4): http://www.mail-archive.com/svn-src-all@freebsd.org/msg19081.html If you don't use ZFS with superpages enable you have a good chance to get a work system until a patch to vboxdrv will be around. -- Gianni