Bug 2169904

Summary: [SVVP] job 'Check SMBIOS Table Specific Requirements' failed on win2022
Product: Red Hat Enterprise Linux 9 Reporter: dehanmeng <demeng>
Component: qemu-kvmAssignee: Julia Suvorova <jusual>
qemu-kvm sub component: Devices QA Contact: dehanmeng <demeng>
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: high CC: coli, fdeutsch, imammedo, jinzhao, jusual, juzhang, kbidarka, leidwang, mkedzier, mrezanin, nilal, pgm-rhel-tools, pvlasin, qizhu, virt-maint, xuwei, ycui, yiwei, ymankad
Version: 9.2Keywords: Regression, TestBlocker, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Windows   
Whiteboard:
Fixed In Version: qemu-kvm-7.2.0-11.el9_2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2170556 (view as bug list) Environment:
Last Closed: 2023-05-09 07:23:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2168046    
Bug Blocks: 2170556    

Description dehanmeng 2023-02-15 03:34:09 UTC
Description of problem:
open a same-name bug based on https://bugzilla.redhat.com/show_bug.cgi?id=2168046#c15.

Comment 7 dehanmeng 2023-02-17 04:04:53 UTC
Hi @Igor Mammedov could you please help to take a look at this bug?

Comment 8 Igor Mammedov 2023-02-17 08:53:00 UTC
(In reply to dehanmeng from comment #7)
> Hi @Igor Mammedov could you please help to take a look at this bug?

can you put here specific svvp error message that this bug is about?

Comment 9 Igor Mammedov 2023-02-17 09:24:58 UTC
(In reply to Igor Mammedov from comment #8)
> (In reply to dehanmeng from comment #7)
> > Hi @Igor Mammedov could you please help to take a look at this bug?
> 
> can you put here specific svvp error message that this bug is about?

and a QEMU command line to reproduce the issue.

Comment 10 dehanmeng 2023-02-17 09:31:37 UTC
(In reply to Igor Mammedov from comment #8)
> (In reply to dehanmeng from comment #7)
> > Hi @Igor Mammedov could you please help to take a look at this bug?
> 
> can you put here specific svvp error message that this bug is about?
sure, you can see the attachments of this bug and I'll contact you via google-chat to let you access the svvp-server/client to dig more.

Comment 15 Igor Mammedov 2023-02-17 15:56:33 UTC
Bug description:

Start QEMU with following CLI:

   -m 4G -cpu host -enable-kvm -M q35 /dev/slow/rhel90 -nodefaults -serial stdio

then within guest run:
------
# dmidecode -t 4 

# dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

Handle 0x0400, DMI type 4, 42 bytes
Processor Information
	Socket Designation: .
	Type: Central Processor
	Family: Other
	Manufacturer: .
	ID: F2 06 03 00 FF FB 8B 0F
	Version: .
	Voltage: Unknown
	External Clock: Unknown
	Max Speed: 2000 MHz
	Current Speed: 2000 MHz
	Status: Populated, Enabled
	Upgrade: Other
	L1 Cache Handle: Not Provided
	L2 Cache Handle: Not Provided
	L3 Cache Handle: Not Provided
	Serial Number: Not Specified
	Asset Tag: Not Specified
	Part Number: Not Specified
	Core Count: 1
	Core Enabled: 1
	Thread Count: 1
	Characteristics: None
------
where string fields doesn't look correct, run:
------
# dmidecode -t 4 -u

# dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

Handle 0x0400, DMI type 4, 42 bytes
	Header and Data:
		04 2A 00 04 01 03 01 02 F2 06 03 00 FF FB 8B 0F
		03 00 00 00 D0 07 D0 07 41 01 FF FF FF FF FF FF
		00 00 00 01 01 01 02 00 01 00
	Strings:
		01 00
		.
		01 00
		.
		01 00
		.
		51 45 4D 55 00
		QEMU
		70 63 2D 71 33 35 2D 38 2E 30 00
		pc-q35-8.0
------
As one can see strings contain not expected values (the 1st 3 strings).
However if one starts QEMU with extra option '-machine smbios-entry-point-type=64'
table 4 becomes correct:
------
# dmidecode -t 4 -u

# dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.

Handle 0x0400, DMI type 4, 48 bytes
	Header and Data:
		04 30 00 04 01 03 01 02 F2 06 03 00 FF FB 8B 0F
		03 00 00 00 D0 07 D0 07 41 01 FF FF FF FF FF FF
		00 00 00 01 01 01 02 00 01 00 01 00 01 00 01 00
	Strings:
		43 50 55 20 30 00
		CPU 0
		51 45 4D 55 00
		QEMU
		70 63 2D 71 33 35 2D 38 2E 30 00
		pc-q35-8.
------
i.e. with default 2.x SMBIOS tables strings in table 4 are misplaced or corrupted somewhere.
Likely by:
    t->core_count2 = t->core_enabled2 = cpu_to_le16(ms->smp.cores);              
...      
    t->thread_count2 = cpu_to_le16(ms->smp.threads);                             
...
unconditionally 'patching' earlier copied strings.

Comment 18 Julia Suvorova 2023-02-22 21:03:53 UTC
Fix posted upstream:
    [PATCH] hw/smbios: fix field corruption in type 4 table

Comment 19 John Ferlan 2023-02-28 19:06:22 UTC
Julia - I see you have an ACK on the v2 (https://lists.nongnu.org/archive/html/qemu-devel/2023-02/msg06751.html).

Can you please request the maintainer to do a pull request for the patch so that we can get it backported and tested downstream?  The ITM of 28 means we need this merged, tested, & validated downstream in by 13-Mar. We can always push that out a bit, but the sooner the better obviously since this is a blocker for the release.

Thanks!

Comment 24 dehanmeng 2023-03-08 07:26:38 UTC
Hi all,

Just tried the fixed version of qemu-kvm, and the issue has gone and this case could be passed. 
thanks all for your effort and time.

Thanks
Dehan Meng

Comment 25 Yanan Fu 2023-03-09 01:51:05 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.

Comment 26 Qianqian Zhu 2023-03-09 02:45:11 UTC
Hi Xueqiang,

Would you please help run an acceptance test against edk2 and seabios to verify this bz? Thanks.

Comment 29 Xueqiang Wei 2023-03-12 08:55:36 UTC
(In reply to Qianqian Zhu from comment #26)
> Hi Xueqiang,
> 
> Would you please help run an acceptance test against edk2 and seabios to
> verify this bz? Thanks.

Tested seabios test loop, no new bug was found.

Versions:
Host:
kernel-5.14.0-284.el9.x86_64
qemu-kvm-7.2.0-11.el9_2
seabios-bin-1.16.1-1.el9.noarch

Guest:
RHEL-9.2.0, Win2019

Job link: http://virtqetools.lab.eng.pek2.redhat.com/kvm_autotest_job_log/?jobid=7613375



Test edk2 test loop, no new bug was found.

Versions:
Host:
kernel-5.14.0-284.el9.x86_64
qemu-kvm-7.2.0-11.el9_2
edk2-ovmf-20221207gitfff6d81270b5-8.el9_2.noarch

Guest:
RHEL-9.2.0, Win11

Job link: http://virtqetools.lab.eng.pek2.redhat.com/kvm_autotest_job_log/?jobid=7615585

Comment 30 dehanmeng 2023-03-13 03:56:32 UTC
based on comment24 & comment 29,  move this bug to verified. thanks.

Comment 31 Qianqian Zhu 2023-03-13 05:18:14 UTC
*** Bug 2170556 has been marked as a duplicate of this bug. ***

Comment 33 errata-xmlrpc 2023-05-09 07:23:46 UTC
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 (Moderate: qemu-kvm security, bug fix, and enhancement update), 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://access.redhat.com/errata/RHSA-2023:2162

Comment 34 Yiqian Wei 2023-06-28 05:30:00 UTC
*** Bug 2174351 has been marked as a duplicate of this bug. ***