From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkFu5-0007EG-8j for qemu-devel@nongnu.org; Tue, 13 May 2014 12:50:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkFty-0007io-Po for qemu-devel@nongnu.org; Tue, 13 May 2014 12:50:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkFty-0007g0-IO for qemu-devel@nongnu.org; Tue, 13 May 2014 12:50:02 -0400 Message-ID: <53724D35.3010506@redhat.com> Date: Tue, 13 May 2014 18:49:57 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <20140513150003.GK30030@ERROL.INI.CMU.EDU> <53723748.7080403@redhat.com> <20140513155651.GL30030@ERROL.INI.CMU.EDU> In-Reply-To: <20140513155651.GL30030@ERROL.INI.CMU.EDU> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] SMBIOS: Update Type 0 struct generator for machines >= 2.1 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gabriel L. Somlo" Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com On 05/13/14 17:56, Gabriel L. Somlo wrote: > On Tue, May 13, 2014 at 05:16:24PM +0200, Laszlo Ersek wrote: >> The idea and the implementation in this patch seems fine to me (and >> thanks for it!), except I object to the conversion of >> "bios_characteristics" to uint64_t. I think that will break when you >> emulate eg. an x86_64 target (ie. an SMBIOS-consuming, little endian >> guest) on a big endian host (where you produce the SMBIOS payload). >> >> If you back out the changes to "bios_characteristics", I'll add my R-b. > > Would it be acceptable if I used > > t->bios_characteristics = cpu_to_le64(0x08); > > instead ? The smbios spec pdf does say "QWORD", after all :) Fine by me. > If that's a bad idea for some other reason I haven't figured > out yet, I have no problem backing it out... > > Thanks, > --Gabriel > > PS Now that you mention emulating x86_64 on a BE machine, I think > there may actually be a few more places that require cpu_to_le*() > wrappers... Oops... Sorry! :) BTW can you also consult the seabios list about hardcoding the "virtual machine" bit? I don't think it should hurt, but early exposure is good. Thank you Laszlo