RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2091166 - Q35: dmidecode doesn't display number of cpus (>255) correctly
Summary: Q35: dmidecode doesn't display number of cpus (>255) correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Julia Suvorova
QA Contact: Yiqian Wei
URL:
Whiteboard:
Depends On: 2135806
Blocks: 1788991 1906077
TreeView+ depends on / blocked
 
Reported: 2022-05-27 17:21 UTC by Julia Suvorova
Modified: 2023-05-09 07:43 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-7.2.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:19:33 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-123584 0 None None None 2022-05-27 17:30:00 UTC
Red Hat Product Errata RHSA-2023:2162 0 None None None 2023-05-09 07:20:28 UTC

Description Julia Suvorova 2022-05-27 17:21:17 UTC
Description of problem:
SMBIOS 3.0 structure 4 doesn't pass number of cpus correctly, so dmidecode shows incorrect number in the guest.

How reproducible:
100%

Steps to Reproduce:
1. run qemu with cpu count over 255 (with SMBIOS 3.0):
  $ qemu-kvm -smp 280 -machine q35,smbios-entry-point-type=64 ...
2. run dmidecode in the guest
  # dmidecode -t 4

Actual results:

Handle 0x0400, DMI type 4, 42 bytes
Processor Information
...
	Core Count: 24
	Core Enabled: 24
	Thread Count: 1

Expected results:

Handle 0x0400, DMI type 4, 42 bytes
Processor Information
...
	Core Count: 280
	Core Enabled: 280
	Thread Count: 1

Comment 1 Julia Suvorova 2022-05-27 17:28:42 UTC
Posted patches to upstream QEMU:

[PATCH 0/5] hw/smbios: add core_count2 to smbios table type 4
    [PATCH 1/5] hw/smbios: add core_count2 to smbios table type 4
    [PATCH 2/5] bios-tables-test: teach test to use smbios 3.0 tables
    [PATCH 3/5] tests/acpi: allow changes for core_count2 test
    [PATCH 4/5] bios-tables-test: add test for number of cores > 255
    [PATCH 5/5] tests/acpi: update tables for new core count test

Comment 2 Julia Suvorova 2022-05-27 17:31:50 UTC
@nilal Which release do you think it should go to?

Comment 3 Nitesh Narayan Lal 2022-05-27 17:39:43 UTC
(In reply to Julia Suvorova from comment #2)
> @nilal Which release do you think it should go to?

I would say 9.1, however, it will mainly depend on how quickly this gets picked upstream.

Comment 4 Yiqian Wei 2022-06-01 06:20:55 UTC
Hit this bug with smbios 2.8

host version:
kernel-5.14.0-100.el9.x86_64
qemu-kvm-7.0.0-4.el9.x86_64
seabios-1.16.0-3.el9.x86_64
guest: rhel9.1.0

1.boot a guest with 280 vcpus
/usr/libexec/qemu-kvm \
    -name 'avocado-vt-vm1'  \
    -sandbox on  \
    -machine q35,memory-backend=mem-machine_mem,kernel-irqchip=split \
    -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
    -device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0  \
    -nodefaults \
    -device VGA,bus=pcie.0,addr=0x2 \
    -m 16G \
    -object memory-backend-ram,size=16G,id=mem-machine_mem  \
    -smp 280  \
    -cpu 'SandyBridge',enforce \
    -chardev socket,server=on,wait=off,path=/tmp/monitor-qmpmonitor1-20220520-212200-9Qt88GNK,id=qmp_id_qmpmonitor1  \
    -mon chardev=qmp_id_qmpmonitor1,mode=control \
    -chardev socket,server=on,wait=off,path=/tmp/monitor-catch_monitor-20220520-212200-9Qt88GNK,id=qmp_id_catch_monitor  \
    -mon chardev=qmp_id_catch_monitor,mode=control \
    -device pvpanic,ioport=0x505,id=idr2aDG3 \
    -chardev socket,server=on,wait=off,path=/tmp/serial-serial0-20220520-212200-9Qt88GNK,id=chardev_serial0 \
    -device isa-serial,id=serial0,chardev=chardev_serial0  \
    -chardev socket,id=seabioslog_id_20220520-212200-9Qt88GNK,path=/tmp/seabios-20220520-212200-9Qt88GNK,server=on,wait=off \
    -device isa-debugcon,chardev=seabioslog_id_20220520-212200-9Qt88GNK,iobase=0x402 \
    -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
    -device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie-root-port-2,addr=0x0 \
    -blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/rhel910-64-virtio-scsi.qcow2,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \
    -device scsi-hd,id=image1,drive=drive_image1,write-cache=on \
    -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \
    -device virtio-net-pci,mac=9a:5d:b0:f5:04:0f,id=idlokhzs,netdev=id4YbMcO,bus=pcie-root-port-3,addr=0x0  \
    -netdev tap,id=id4YbMcO,vhost=on   \
    -vnc :1  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot menu=off,order=cdn,once=c,strict=off \
    -enable-kvm \
    -monitor stdio \
    -qmp tcp:0:4444,server=on,wait=off \

2.run dmidecode in the guest
  # dmidecode -t 4

Test results:
# 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: CPU 0
	Type: Central Processor
	Family: Other
	Manufacturer: Red Hat
	ID: A1 06 02 00 FF FB 8B 07
	Version: RHEL-9.0.0 PC (Q35 + ICH9, 2009)
	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: 24
	Core Enabled: 24
	Thread Count: 1
	Characteristics: None

Comment 5 John Ferlan 2022-10-16 12:38:02 UTC
v3 posted and mostly ack'd upstream: https://lists.nongnu.org/archive/html/qemu-devel/2022-10/msg01640.html

Updating ITR=9.2 - let's try to get this into qemu-7.2 for RHEL 9.2 via rebase.

Comment 6 Julia Suvorova 2022-11-28 22:06:39 UTC
Merged upstream:
  b22fbc5bcb tests/acpi: update tables for new core count test
  2d80b33843 bios-tables-test: add test for number of cores > 255
  159a0da5b0 tests/acpi: allow changes for core_count2 test
  33bff4a85a  bios-tables-test: teach test to use smbios 3.0 tables
  05e27d74c7 hw/smbios: add core_count2 to smbios table type 4

Comment 10 Yanan Fu 2022-12-20 09:18:20 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.

Comment 17 errata-xmlrpc 2023-05-09 07:19:33 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


Note You need to log in before you can comment on or make changes to this bug.