From owner-freebsd-virtualization@freebsd.org Tue Jun 25 03:26:34 2019 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 7F6B715B9D70 for ; Tue, 25 Jun 2019 03:26:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 17D056E3C2 for ; Tue, 25 Jun 2019 03:26:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id CEFDF15B9D6E; Tue, 25 Jun 2019 03:26:33 +0000 (UTC) Delivered-To: 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 AA73F15B9D6D for ; Tue, 25 Jun 2019 03:26:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B60D6E3C1 for ; Tue, 25 Jun 2019 03:26:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 7A3037C06 for ; Tue, 25 Jun 2019 03:26:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x5P3QWxj007210 for ; Tue, 25 Jun 2019 03:26:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x5P3QWdJ007202 for virtualization@FreeBSD.org; Tue, 25 Jun 2019 03:26:32 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 238794] LAPIC register test failure with OpenBSD 6.5-snapshot guest Date: Tue, 25 Jun 2019 03:26:32 +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: 11.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jason@tubnor.net 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.29 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: Tue, 25 Jun 2019 03:26:34 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238794 Bug ID: 238794 Summary: LAPIC register test failure with OpenBSD 6.5-snapshot guest Product: Base System Version: 11.3-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: bhyve Assignee: virtualization@FreeBSD.org Reporter: jason@tubnor.net OpenBSD has just imported LLVM 8.0 into -current and the way the compiler builds code to test the LAPIC register has changed (though still valid according to Intel documentation). guenther@ from the OpenBSD project provided some insights based on informat= ion provided. Below is an extract from the email thread: > Below is output from bhyve.log: >=20 > rdmsr to register 0xc80 on vcpu 0 > Failed to emulate instruction [0xf7 0x04 0x25 0x00 0xd3 0xd1 0x81 0x00 0x= 10 > 0x00 0x00 0x74 0x08 0xf3 0x90] at 0xffffffff817648f0 According to objdump -d, that's: f7 04 25 00 d3 d1 81 testl $0x1000,0xffffffff81d1d300 00 10 00 00 74 08 je f3 90 pause That's testing the LAPIC ICRLO, a memory-mapped register. Previously, the= =20 compiler generated code like this: 8b 0c 25 00 63 cf 81 mov 0xffffffff81cf6300,%ecx f7 c1 00 10 00 00 test $0x1000,%ecx 74 09 je f3 90 pause=20=20 where it loaded the LAPIC register into %ecx and then tested that value;=20 now it combines them and does a direct test. Congrats, that's legal=20 according to Intel (reportedly, Windows will use SSE(!) instructions to=20 read LAPIC registers), so this seems like a bug in Bhyve. The full thread can be found here: https://marc.info/?l=3Dopenbsd-bugs&m=3D156142900518812&w=3D2 --=20 You are receiving this mail because: You are the assignee for the bug.=