Received: from eggs.gnu.org ([2001:4830:134:3::10]:48641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkF4i-0005sy-EX for qemu-devel@nongnu.org; Tue, 13 May 2014 11:57:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkF4Z-00063Q-9P for qemu-devel@nongnu.org; Tue, 13 May 2014 11:57:04 -0400 Received: from mail-qg0-x234.google.com ([2607:f8b0:400d:c04::234]:50373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkF4Z-00063M-5c for qemu-devel@nongnu.org; Tue, 13 May 2014 11:56:55 -0400 Received: by mail-qg0-f52.google.com with SMTP id a108so633369qge.25 for ; Tue, 13 May 2014 08:56:54 -0700 (PDT) Date: Tue, 13 May 2014 11:56:52 -0400 From: "Gabriel L. Somlo" Message-ID: <20140513155651.GL30030@ERROL.INI.CMU.EDU> References: <20140513150003.GK30030@ERROL.INI.CMU.EDU> <53723748.7080403@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53723748.7080403@redhat.com> 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: Laszlo Ersek Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com 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 :) 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...