From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a21Sq-00060j-8T for qemu-devel@nongnu.org; Thu, 26 Nov 2015 13:40:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a21Sn-0001wY-3D for qemu-devel@nongnu.org; Thu, 26 Nov 2015 13:40:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a21Sm-0001wU-U7 for qemu-devel@nongnu.org; Thu, 26 Nov 2015 13:40:13 -0500 References: <5654969F.3000306@redhat.com> <1448523799.8613.7.camel@redhat.com> From: Laszlo Ersek Message-ID: <5657520A.6070204@redhat.com> Date: Thu, 26 Nov 2015 19:40:10 +0100 MIME-Version: 1.0 In-Reply-To: <1448523799.8613.7.camel@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [SeaBIOS] bug: incorrect uuid in seabios output List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , Cole Robinson Cc: seabios@seabios.org, qemu-devel , Eduardo Habkost On 11/26/15 08:43, Gerd Hoffmann wrote: > On Di, 2015-11-24 at 11:55 -0500, Cole Robinson wrote: >> Hi, >> >> The UUID seabios reports in its boot output doesn't match what is passed via >> qemu -uuid option. An example is reported here: >> >> https://bugzilla.redhat.com/show_bug.cgi?id=1284259 >> >> This is due to: >> >> commit caad057bb6ce86a9cb71520af395fd0bd04a659f >> Author: Eduardo Habkost >> Date: Wed Oct 29 11:26:08 2014 -0200 >> >> smbios: Encode UUID according to SMBIOS specification >> >> Differently from older versions, SMBIOS version 2.6 is explicit about >> the encoding of UUID fields: >> >> > Although RFC 4122 recommends network byte order for all fields, the PC >> > industry (including the ACPI, UEFI, and Microsoft specifications) has >> > consistently used little-endian byte encoding for the first three fields: >> > time_low, time_mid, time_hi_and_version. The same encoding, also known as >> > wire format, should also be used for the SMBIOS representation of the UUID. >> > >> > The UUID {00112233-4455-6677-8899-AABBCCDDEEFF} would thus be represented >> > as 33 22 11 00 55 44 77 66 88 99 AA BB CC DD EE FF. >> >> The dmidecode tool implements this and decodes the above "wire format" >> when SMBIOS version >= 2.6. We moved from SMBIOS version 2.4 to 2.8 when >> we started building the SMBIOS entry point inside QEMU, on commit >> c97294ec1b9e36887e119589d456557d72ab37b5. >> >> >> seabios doesn't seem to handle this special UUID format when reading from smbios. > > Hmm. Changing the ordering in display_uuid() is easy. There seems to > be no easy way to figure which format to use though. Checking the > version like dmidecode doesn't fly as there are qemu versions with old > format but version smbios 2.8 in the wild ... Plus, because this is guest visible, Eduardo's patch noted above only changes the encoding for 2.2 and later QEMU machine types. If you run your reproducer but flip the machine type to 2.1 or earlier, you should see the UUID on the SeaBIOS screen change. Thanks Laszlo