Bug 1426162 - virsh sysinfo can not show correct system information
Summary: virsh sysinfo can not show correct system information
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.1
Hardware: aarch64
OS: Linux
medium
medium
Target Milestone: rc
: 8.1
Assignee: Michal Privoznik
QA Contact: weizhang
URL:
Whiteboard:
Depends On:
Blocks: 1543699 1677408 1683831
TreeView+ depends on / blocked
 
Reported: 2017-02-23 10:39 UTC by weizhang
Modified: 2020-11-14 06:40 UTC (History)
14 users (show)

Fixed In Version: libvirt-5.5.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-06 07:10:39 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3723 0 None None None 2019-11-06 07:11:24 UTC

Description weizhang 2017-02-23 10:39:39 UTC
Description of problem:
virsh sysinfo can not show correct system information

Version-Release number of selected component (if applicable):
libvirt-3.0.0-1.el7


How reproducible:
100%

Steps to Reproduce:
1.virsh sysinfo
2.
3.

Actual results:
<sysinfo type='smbios'/>

Expected results:
have bios, system, processor and memory_device informations

Additional info:

Comment 2 Peter Krempa 2017-02-28 09:10:47 UTC
Could you please provide more data? Libvirtd debug log would be helpful. On my machine it works as expected so I suspect it's a hardware specific issue.

Comment 3 Peter Krempa 2017-03-06 15:36:54 UTC
So I found a box where this reproduces. /proc/cpuinfo of that box looks like:

processor	: 0
BogoMIPS	: 100.00
Features	: fp asimd evtstrm
CPU implementer	: 0x50
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x000
CPU revision	: 1

processor	: 1
BogoMIPS	: 100.00
Features	: fp asimd evtstrm
CPU implementer	: 0x50
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0x000
CPU revision	: 1

[...]

In such case there is no CPU name or other data to report thus libvirt does not report anything. I don't think there's anything useful to report here in this case.

If your machine contains useful data in /proc/cpuinfo please reopen this BZ.

Comment 4 Andrew Jones 2017-03-09 09:48:43 UTC
/proc/cpuinfo looks different on AArch64 machines vs. x86 machines, but they do have SMBIOS. What information is libvirt expecting? It may be missing, or it may just be in a different place. Is libvirt even attempting to extract the SMBIOS tables? There's plenty of info in them on my mustang, shown with dmidecode. I'd prefer we reopen this bug and attempt to get sysinfo to output more useful info on these machines.

Comment 5 Daniel Berrangé 2017-03-09 10:04:51 UTC
The current code in libvirt for ARM ignores SMBIOS since historically arm7 / early aarch64 didn't have that available. We need to fix that to make it use SMBIOS if available.

Comment 6 Andrew Jones 2017-03-16 21:35:06 UTC
This may not be possible for 7.4 due to AArch64 servers still not having much info in /proc/cpuinfo and also not having complete SMBIOS tables. See bug 1430987 for a similar bug, which is also blocked on the host needing to provide the information libvirt needs.

Comment 8 Jon Masters 2017-08-31 20:03:54 UTC
We need to get /proc/cpuinfo to say useful things too. I'm stirring up.

Comment 9 Daniel Berrangé 2017-09-01 09:11:53 UTC
BTW, we would really rather have information provided in a sane format in sysfs, with the one attribute per file model.  The /proc/cpuinfo file is an horrible thing to deal with due to having to hand write parsers for it, and its content being different on every architecture.

Comment 10 Al Stone 2017-09-05 23:45:41 UTC
(In reply to Daniel Berrange from comment #9)
> BTW, we would really rather have information provided in a sane format in
> sysfs, with the one attribute per file model.  The /proc/cpuinfo file is an
> horrible thing to deal with due to having to hand write parsers for it, and
> its content being different on every architecture.

If an aarch64 system has implemented CPPC, the cpufreq directory is populated, so you can get things like max frequency:

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 
3200000

Or you can get cpuinfo_max_frequency, instead (usually identical).

There are a couple of older platforms that do not implement CPPC, but would also not likely be used as host machines in a production environment.

Is this sufficient?  Others have asked for this to be in /proc/cpuinfo, also, so that probably needs to be added regardless.

Comment 12 Michal Privoznik 2019-05-10 07:53:08 UTC
Patches posted upstream:

https://www.redhat.com/archives/libvir-list/2019-May/msg00221.html

Comment 20 Andrea Bolognani 2019-05-30 09:55:22 UTC
Test data (prerequisite for merging) posted upstream.

  https://www.redhat.com/archives/libvir-list/2019-May/msg00869.html

Comment 21 Michal Privoznik 2019-06-03 16:04:11 UTC
Pushed upstream:

ec6ce6363a virSysinfoReadARM: Try reading DMI table
ac61c9cfc3 virsysinfo: Rename virSysinfoReadX86 to virSysinfoReadDMI
667a373526 tests: Add aarch64-gigabyte sysinfo test case
43bc35ac1a tests: Tweak x86 sysinfo test case

v5.4.0-32-gec6ce6363a

Comment 29 errata-xmlrpc 2019-11-06 07:10:39 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, 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/RHBA-2019:3723


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