From owner-freebsd-virtualization@freebsd.org Sun Nov 29 19:44:30 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 919AC4AB5CE for ; Sun, 29 Nov 2020 19:44:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4Ckf2Q3XKTz3LQk for ; Sun, 29 Nov 2020 19:44:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 777A94AB820; Sun, 29 Nov 2020 19:44:30 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 773864AB5CD for ; Sun, 29 Nov 2020 19:44:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ckf2Q2rDZz3Lc8 for ; Sun, 29 Nov 2020 19:44:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 49CA516F1C for ; Sun, 29 Nov 2020 19:44:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 0ATJiUBE017154 for ; Sun, 29 Nov 2020 19:44:30 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0ATJiUxA017153 for virtualization@FreeBSD.org; Sun, 29 Nov 2020 19:44:30 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 251464] OpenBSD 6.7 GPT bootloader causes unemulated instruction in low memory environment Date: Sun, 29 Nov 2020 19:44:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: 12.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: crowston@protonmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.34 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, 29 Nov 2020 19:44:30 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251464 Bug ID: 251464 Summary: OpenBSD 6.7 GPT bootloader causes unemulated instruction in low memory environment Product: Base System Version: 12.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bhyve Assignee: virtualization@FreeBSD.org Reporter: crowston@protonmail.com I am not able to boot a single-processor OpenBSD install with less than 300= MB of memory. Such a configuration kills bhyve with an unemulated instruction abort trap. For example: Failed to emulate instruction [0x45 0xf3 0x11 0xa3 0x3b 0x31 0xcf 0x18 0x48 0x74 0xcc 0x11 0xc4 0xb8 0x39] at 0xe9b656b ./start.sh: line 14: 98904 Abort trap bhyve -c sockets=3D1,cores=3D1,threads=3D1 -m 256M -H -w -u -s 0,amd_hostbridge -s 1:0,virtio-blk,/dev/zvol/tank0/bhyve/xxxx -s 1:1,virtio-net,tap3 -s 1:2,virtio-rnd -s 31,lpc -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -l com1,/dev/nmdm3A xx= xx Console output from the guest is probing: pc0 com0 com1 mem[640K 233M 16M 20K 4M 64K] disk: hd0 >> OpenBSD/amd64 BOOTX64 3.50 switching console to com0 >> OpenBSD/amd64 BOOTX64 3.50 boot>=20 booting hd0a:/bsd: 12879176+2753552+326368+0+704512 [811997- In the instruction hex is decoded in long mode, it looks like 0: 45 rex.RB 1: f3 11 a3 3b 31 cf 18 repz adc DWORD PTR [rbx+0x18cf313b],esp 8: 48 74 cc rex.W je 0xffffffffffffffd7 b: 11 c4 adc esp,eax d: b8 .byte 0xb8 e: 39 .byte 0x39 Booting the exact same configuration with 300 MB or 512 MB works correctly. I am running some patches on top of 12.2-RELEASE, so it's possible I broke something at some stage. I looked at vmm_instruction_emul.c, but none of the latest patches look like they add anything to do with rex.RB or repz adc. --=20 You are receiving this mail because: You are the assignee for the bug.=