From owner-freebsd-virtualization@freebsd.org Sun Mar 11 17:00:56 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6B01F3AC0C for ; Sun, 11 Mar 2018 17:00:55 +0000 (UTC) (envelope-from fabian.freyer@physik.tu-berlin.de) Received: from mail.physik.tu-berlin.de (mail.physik-pool.tu-berlin.de [130.149.50.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57DF773F03 for ; Sun, 11 Mar 2018 17:00:54 +0000 (UTC) (envelope-from fabian.freyer@physik.tu-berlin.de) Received: from [192.168.119.1] (wlan-141-23-171-244.tubit.tu-berlin.de [141.23.171.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.physik.tu-berlin.de (Postfix) with ESMTPSA id BC9B061FB2; Sun, 11 Mar 2018 17:00:44 +0000 (UTC) From: "Fabian Freyer" To: "Martin Lucina" Cc: rumpkernel-users@freelists.org, freebsd-virtualization@freebsd.org Subject: Re: rumpkernel and bhyve: triple faults Date: Sun, 11 Mar 2018 18:00:41 +0100 X-Mailer: MailMate (1.10r5443) Message-ID: <0A39950F-698C-4A2C-80D6-B35A5B254BAA@physik.tu-berlin.de> In-Reply-To: <20180310224607.wscuqebheq5bjxww@nodbug.lucina.net> References: <20180310224607.wscuqebheq5bjxww@nodbug.lucina.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_MailMate_772233C2-4F3C-413C-9C3B-FC3F90578CA5_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2018 17:00:56 -0000 This is an OpenPGP/MIME signed message (RFC 3156 and 4880). --=_MailMate_772233C2-4F3C-413C-9C3B-FC3F90578CA5_= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10 Mar 2018, at 23:46, Martin Lucina wrote: > On Friday, 09.03.2018 at=C2=A018:45, Fabian Freyer wrote: >> On 6 Mar 2018, at 7:45, Fabian Freyer wrote: >>> I=E2=80=99m not sure where to go from here. Is this a bug in bhyve(4)= , should these >>> values be initialised somehow, or should I patch rumpkernel(7) to ski= p this check >>> when running on bhyve(4)? > > You probably want to use a serial console rather than VGA on bhyve in a= ny > case, so you'll want to add the appropriate checks to hypervisor.c and > cons.c. I=E2=80=99ve started on a patch, but the check should fail if bios_crtc_b= ase is unset anyways. >> A build on Linux (which boots fine) shows [bios_com1_base, bios_crtc_b= ase] not to >> be uninitialised: >> 00000000003e3480 g O .bss 0000000000000002 bios_com1_base >> 00000000003e44a0 g O .bss 0000000000000002 bios_crtc_base > > When you write "which boots fine", I presume you're referring to bootin= g on > bhyve? Yes. The rumprun kernel built on Linux boots fine (including serial outpu= t by default on Linux. The one built on FreeBSD triple faults, due to accessing 0x2. >> Further down the rabbit hole, this goes on in rumprun.o: >> >> On Linux, bios_crtc_base is not a local symbol: >> 0000000000000002 O *COM* 0000000000000002 bios_crtc_base >> 0000000000000002 O *COM* 0000000000000002 bios_com1_base >> >> While on FreeBSD, they are marked as local: >> 0000000000000002 l O *COM* 0000000000000002 bios_crtc_base >> 0000000000000002 l O *COM* 0000000000000002 bios_com1_base > > That seems wrong. Can you try and force the toolchain to use the more > recent GNU ld from devel/binutils and see if that fixes the problem? I=E2=80=99m using GNU Binutils from devel/binutils: pkg list binutils | grep /usr/local/bin/ld /usr/local/bin/ld /usr/local/bin/ld.bfd /usr/local/bin/ld.gold $(x86_64-rumprun-netbsd-gcc -print-prog-name=3Dld) -v GNU ld (GNU Binutils) 2.30 Fabian --=_MailMate_772233C2-4F3C-413C-9C3B-FC3F90578CA5_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQJWBAEBCgBAFiEEX6JoxdmEemcFacQZmealkcs85+YFAlqlYLkiHGZhYmlhbi5m cmV5ZXJAcGh5c2lrLnR1LWJlcmxpbi5kZQAKCRCZ5qWRyzzn5qeIEACjO1rhn9zI dpfoA4VsBwMFxIiN5hvNG4peSaGzDQSWknhxpN5Fx7EmnWm+iy1Dgym4ie2ia4bC 25Zy+EDREHx/WjGzYaBA8LPqk5ccJuF7zIhKwM7hShakrYQdaQ0C/EthArCNzkTA QbFc4GFd4ggKuSBSrTJapNmAx9rh+CVvcJEw4NrQbEaouf4M/ys/wiOeUDYP0XKG pkX22JsgR6uirXU1/+k8ubyAcloGqmYyOkKfIZmx/ejQdhX5i0XI3hUIf+zrA+7H YlR6Gk1BRQ5Az85KwkKv+D5qkS/SSpQe9vJy+Q2AD4qp0lZcTE5gm782KQ/6R8SZ +slpoKsS+AhwS0AlHj3yfqt3BIE+VF/1Ulu5R18KrJvTtY9bqY099DCoIVVGVnI7 LqWXGrBfwSO72kOpLGhk4LGbWAvzGnnHOJ7YiAoldRlfXNp99XoXIXUkGa/T9HoN byXNBmq3M7vDL62yzC0sGiEXwJaQk9wYM9lrujtTdB0IQCzTgDtIgET1N497LP+t 8+uY4Bb22ASCKTLSpSRpc/vhhzeNnkNO4o+h9Hp4d2qk/yhzUa+cxO2qvd1pRZeD DhaPJQ7DRvZIZmdFYD8AfU6YyrL9+3g1uDYvxHpWiC96cCaaqfXYBNxUWEcMm0Sj dl9mU3nP5iRSE20u1PFY2wqR2D+N8vnsUQ== =T7nM -----END PGP SIGNATURE----- --=_MailMate_772233C2-4F3C-413C-9C3B-FC3F90578CA5_=--