Bug 1152922
Summary: | smbios uuid mismatched | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Chengyou Liu <cheliu> | ||||
Component: | qemu-kvm-rhev | Assignee: | Virtualization Maintenance <virt-maint> | ||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.1 | CC: | coli, ehabkost, hhuang, juzhang, lveyde, michen, mkalinin, pdhamdhe, scui, shuang, virt-maint, xfu, xiagao, xuhan, xutian, xwei, yaxue | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | qemu-kvm-rhev-2.1.2-7.el7 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-03-05 09:56:41 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
(In reply to Chengyou Liu from comment #0) > Steps to Reproduce: > 1. boot a guest with this: > -uuid 5B37F308-9143-11E1-A13F-E41F13EBC57A \ > -smbios type=1,manufacturer='IBM',product='System x3650 > M4',uuid='5B37F308-9143-11E1-A13F-E41F13EBC57A',serial='06BKEN8', > version='0A',family='VIRT',sku='KVM' \ > 2. # dmidecode -t 1 get UUID 08F3375B-4391-E111-A13F-E41F13EBC57A Bug introduced upstream on QEMU 2.1, by: commit c97294ec1b9e36887e119589d456557d72ab37b5 Author: Gabriel L. Somlo <gsomlo> Date: Wed Apr 23 09:42:42 2014 -0400 SMBIOS: Build aggregate smbios tables and entry point Build an aggregate set of smbios tables and an entry point structure. Insert tables and entry point into fw_cfg respectively under "etc/smbios/smbios-tables" and "etc/smbios/smbios-anchor". Machine types <= 2.0 will for now continue using field-by-field overrides to SeaBIOS defaults, but for machine types 2.1 and up we expect the BIOS to look for and use the aggregate tables generated by this patch. Signed-off-by: Gabriel Somlo <somlo> [ kraxel: fix 32bit build ] Signed-off-by: Gerd Hoffmann <kraxel> The bug seems to be related to the byte ordering on the wire format of the UUID, from the SMBIOS specification. But what's confusing me is that the byte order on the binary dump extracted using "dmidecode --dump-bin" is exactly the same. Probably there are tweaks that depend on the reported SMBIOS version inside dmidecode, to handle different byte ordering. I need to investigate further, compare the SMBIOS 2.4 and 2.8 specs, and check the dmidecode source code. dmidecode source code: /* * As of version 2.6 of the SMBIOS specification, the first 3 * fields of the UUID are supposed to be encoded on little-endian. * The specification says that this is the defacto standard, * however I've seen systems following RFC 4122 instead and use * network byte order, so I am reluctant to apply the byte-swapping * for older versions. */ if (ver >= 0x0206) printf("%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", p[3], p[2], p[1], p[0], p[5], p[4], p[7], p[6], p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15]); else printf("%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15]); It loos like making -uuid match the wire format byte-ordering (instead of the UUID format translated for humans) while using SMBIOS 2.8 version is a QEMU bug, and we will want to fix it in QEMU 2.2 (and on qemu-kvm-rhev). The pre-2.6 behavior in dmidecode may be implementing a feature or working around a bug (I don't know yet) but we can just leave old machine-types as is, anyway, and fix it on pc-2.2/rhel7.1.0 and newer. For reference, SMBIOS 2.5 says: "Universal Unique ID number. If the value is all FFh, the ID is not currently present in the system, but is settable. If the value is all 00h, the ID is not present in the system." I don't see any information about byte ordering. SMBIOS 2.6.0 is more specific: "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." Fix submitted upstream: From: Eduardo Habkost <ehabkost> To: qemu-devel Date: Wed, 29 Oct 2014 11:26:06 -0200 Message-Id: <1414589168-19516-1-git-send-email-ehabkost> Subject: [Qemu-devel] [PATCH 0/2] smbios: Encode UUID according to SMBIOS specification Fix included in qemu-kvm-rhev-2.1.2-7.el7 on host qemu-kvm-rhev-2.1.2-7.el7.x86_64 OVMF-20140822-1.git9ece15a.el7.x86_64 seabios-bin-1.7.5-5.el7.noarch with rhel7 vm now qemu pass smbios uuid correctly [root@dhcp-66-106-155 ~]# dmidecode -t system # dmidecode 2.12 SMBIOS 2.8 present. Handle 0x0100, DMI type 1, 27 bytes System Information Manufacturer: Fedora Product Name: KVM Version: RHEL 7.1.0 PC (i440FX + PIIX, 1996) Serial Number: Not Specified UUID: 0B16AC05-C324-4485-8C91-6A429B5EBCFC Wake-up Type: Power Switch SKU Number: Not Specified Family: Red Hat Enterprise Linux Handle 0x2000, DMI type 32, 11 bytes System Boot Information Status: No errors detected [root@dhcp-66-106-155 ~]# dmidecode -t bios # dmidecode 2.12 SMBIOS 2.8 present. Handle 0x0000, DMI type 0, 24 bytes BIOS Information Vendor: LENOVO Version: Not Specified Release Date: Not Specified Address: 0xE8000 Runtime Size: 96 kB ROM Size: 64 kB Characteristics: BIOS characteristics not supported Targeted content distribution is supported System is a virtual machine BIOS Revision: 0.0 [root@dhcp-66-106-155 ~]# uname -r 3.10.0-123.el7.x86_64 [root@dhcp-66-106-155 ~]# # virsh dumpxml rhel7.0 <domain type='kvm' id='4'> <name>rhel7.0</name> <uuid>0b16ac05-c324-4485-8c91-6a429b5ebcfc</uuid> <memory unit='KiB'>2097152</memory> <currentMemory unit='KiB'>2097152</currentMemory> <vcpu placement='static'>2</vcpu> <resource> <partition>/machine</partition> </resource> <sysinfo type='smbios'> <bios> <entry name='vendor'>LENOVO</entry> </bios> <system> <entry name='manufacturer'>Fedora</entry> </system> </sysinfo> <os> <type arch='x86_64' machine='pc-i440fx-rhel7.1.0'>hvm</type> <boot dev='hd'/> <smbios mode='sysinfo'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>Opteron_G5</model> </cpu> <clock offset='utc'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <pm> <suspend-to-mem enabled='no'/> <suspend-to-disk enabled='no'/> </pm> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/home/kvm_autotest_root/images/rhel70-64-virtio.qcow2'/> <backingStore/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </disk> <disk type='block' device='cdrom'> <driver name='qemu' type='raw'/> <backingStore/> <target dev='hda' bus='ide'/> <readonly/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb0'/> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <alias name='usb0'/> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <alias name='usb0'/> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='virtio-serial' index='0'> <alias name='virtio-serial0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </controller> <interface type='network'> <mac address='52:54:00:3c:b6:61'/> <source network='default'/> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/1'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/1'> <source path='/dev/pts/1'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <channel type='spicevmc'> <target type='virtio' name='com.redhat.spice.0'/> <alias name='channel0'/> <address type='virtio-serial' controller='0' bus='0' port='2'/> </channel> <channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/rhel7.0.agent'/> <target type='virtio' name='org.qemu.guest_agent.0'/> <alias name='channel1'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <sound model='ich6'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <video> <model type='qxl' ram='65536' vram='65536' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <redirdev bus='usb' type='spicevmc'> <alias name='redir0'/> </redirdev> <redirdev bus='usb' type='spicevmc'> <alias name='redir1'/> </redirdev> <redirdev bus='usb' type='spicevmc'> <alias name='redir2'/> </redirdev> <redirdev bus='usb' type='spicevmc'> <alias name='redir3'/> </redirdev> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='selinux' relabel='yes'> <label>system_u:system_r:svirt_t:s0:c646,c961</label> <imagelabel>system_u:object_r:svirt_image_t:s0:c646,c961</imagelabel> </seclabel> </domain> Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0624.html |
Created attachment 947140 [details] seabios log Description of problem: smbios uuid mismatched dmidecode doesn't get a reasonable UUID. But seems seabios get a right one: 2014-10-15 10:48:43: SeaBIOS (version seabios-1.7.5-5.el7) 2014-10-15 10:48:43: Machine UUID 5b37f308-9143-11e1-a13f-e41f13ebc57a 2014-10-15 10:48:43: UHCI init on dev 00:03.0 (io=c060) Attached is a seabios log Hit the issue both on RHEL6 guest & RHEL7 guest. And Don't hit this on qemu-kvm-1.5.3-75.el7.x86_64. Version-Release number of selected component (if applicable): kernel-3.10.0-187.el7.x86_64 seavgabios-bin-1.7.5-5.el7.noarch seabios-bin-1.7.5-5.el7.noarch qemu-kvm-rhev-2.1.2-3.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. boot a guest with this: -uuid 5B37F308-9143-11E1-A13F-E41F13EBC57A \ -smbios type=1,manufacturer='IBM',product='System x3650 M4',uuid='5B37F308-9143-11E1-A13F-E41F13EBC57A',serial='06BKEN8',version='0A',family='VIRT',sku='KVM' \ 2. # dmidecode -t 1 3. Actual results: The UUID is not the same as the parameter specified. Expected results: Should be the same as the the parameter specified Additional info: CML to boot guest: /bin/qemu-kvm \ -S \ -name 'virt-tests-vm1' \ -sandbox off \ -M pc \ -nodefaults \ -vga qxl \ -global qxl-vga.vram_size=33554432 \ -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20141015-104840-8hQ4Ci5k,server,nowait \ -mon chardev=qmp_id_qmpmonitor1,mode=control \ -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20141015-104840-8hQ4Ci5k,server,nowait \ -device isa-serial,chardev=serial_id_serial0 \ -chardev socket,id=seabioslog_id_20141015-104840-8hQ4Ci5k,path=/tmp/seabios-20141015-104840-8hQ4Ci5k,server,nowait \ -device isa-debugcon,chardev=seabioslog_id_20141015-104840-8hQ4Ci5k,iobase=0x402 \ -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 \ -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=04 \ -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/home/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-7.1-64-virtio.raw \ -device scsi-hd,id=image1,drive=drive_image1 \ -device virtio-net-pci,mac=9a:fc:fd:fe:ff:00,id=idIcLdt7,vectors=4,netdev=idXi5Q5n,bus=pci.0,addr=05 \ -netdev tap,id=idXi5Q5n,vhost=on \ -m 32768 \ -smp 16,cores=4,threads=2,sockets=2 \ -cpu 'SandyBridge',+kvm_pv_unhalt \ -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \ -spice port=3000,password=123456,addr=0,image-compression=auto_glz,zlib-glz-wan-compression=auto,streaming-video=all,agent-mouse=on,playback-compression=on,ipv4 \ -rtc base=utc,clock=host,driftfix=slew \ -boot order=cdn,once=c,menu=off \ -no-kvm-pit-reinjection \ -uuid 5B37F308-9143-11E1-A13F-E41F13EBC57A \ -smbios type=1,manufacturer='IBM',product='System x3650 M4',uuid='5B37F308-9143-11E1-A13F-E41F13EBC57A',serial='06BKEN8',version='0A',family='VIRT',sku='KVM' \ -enable-kvm \ -monitor stdio Host Info: processor : 23 vendor_id : GenuineIntel cpu family : 6 model : 45 model name : Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz stepping : 7 microcode : 0x710 cpu MHz : 1750.937 cache size : 15360 KB physical id : 1 siblings : 12 core id : 5 cpu cores : 6 apicid : 43 initial apicid : 43 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid bogomips : 4004.23 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management: