From owner-freebsd-emulation@freebsd.org Thu Sep 28 09:56:04 2017 Return-Path: Delivered-To: freebsd-emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C90D2E2E1E1 for ; Thu, 28 Sep 2017 09:56:04 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id AC0C377CE9 for ; Thu, 28 Sep 2017 09:56:04 +0000 (UTC) (envelope-from soralx@cydem.org) Received: by mailman.ysv.freebsd.org (Postfix) id A80A8E2E1E0; Thu, 28 Sep 2017 09:56:04 +0000 (UTC) Delivered-To: emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5B4DE2E1DE for ; Thu, 28 Sep 2017 09:56:04 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71B2077CE8 for ; Thu, 28 Sep 2017 09:56:04 +0000 (UTC) (envelope-from soralx@cydem.org) Received: by freefall.freebsd.org (Postfix) id 9444215CBE; Thu, 28 Sep 2017 09:56:03 +0000 (UTC) Delivered-To: vbox@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 7881115CBD; Thu, 28 Sep 2017 09:56:03 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from smtp.triumf.ca (smtp.triumf.ca [142.90.100.188]) by mx1.freebsd.org (Postfix) with ESMTP id AC19377CE5; Thu, 28 Sep 2017 09:56:02 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from mscad14 (mscad14.triumf.ca [142.90.115.36]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.triumf.ca (Postfix) with ESMTP id 060E5F802; Thu, 28 Sep 2017 02:55:56 -0700 (PDT) Date: Thu, 28 Sep 2017 02:55:55 -0700 From: To: Cc: Subject: Re: [virtualbox-ose] Build failure: global register variable Message-ID: <20170928025555.032ce67a@mscad14> In-Reply-To: <6b02f95f-207b-0f55-8e30-11512979804e@FreeBSD.org> References: <20170917195419.431341e7@mscad14> <20170920191710.58d335df@mscad14> <20170921160000.689755f8@mscad14> <5c68323f-5fed-342b-ad92-e74d178f9daf@FreeBSD.org> <20170924180619.23e149be@mscad14> <6b02f95f-207b-0f55-8e30-11512979804e@FreeBSD.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; amd64-portbld-freebsd9.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 28 Sep 2017 10:31:09 +0000 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Sep 2017 09:56:04 -0000 Jung-uk, > >>> [0] clang/lib/Basic/Targets/X86.h: > >>> 860 bool validateGlobalRegisterVariable(StringRef RegName, > >>> unsigned RegSize, 861 bool > >>> &HasSizeMismatch) const override { 862 // rsp and rbp are the > >>> only 64-bit registers the x86 backend can currently 863 // > >>> handle. 864 if (RegName.equals("rsp") || RegName.equals("rbp")) > >>> { 865 // Check that the register size is 64-bit. > >>> 866 HasSizeMismatch = RegSize != 64; > >>> 867 return true; > >>> 868 } > >> > >> Please try the attached patch. > > > > Thanks for the patch! I gave it a quick try (not an extensive test), > > and VirtualBox, compiled fully with clang, seems to work as usual. > > Committed (r450636), thanks! Sadly, I forgot to disable VT-x when testing. My bad. I tested again, and found that, on unpatched VBox, the virtual machine boots and works fine with both VT-x on and off, while patched version fails to start the VM when VT-x is turned off: VBoxManage: error: No error info VBoxManage: error: Details: code NS_ERROR_CALL_FAILED (0x800706be), component ProgressProxy, interface IProgress How would one go about debugging this? > For more detailed information, please read the commit log. > > https://svnweb.freebsd.org/changeset/ports/450636 > > Jung-uk Kim -- [SorAlx] ridin' VN2000 Classic LT