qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v5 0/2] add new options to set smbios type 4 fields


From: Ying Fang
Subject: [PATCH v5 0/2] add new options to set smbios type 4 fields
Date: Thu, 6 Aug 2020 11:56:32 +0800

From: fangying <fangying1@huawei.com>

Hi, this patchset was previously posted by my teamate Heyi Guo several
months ago, however we missed the merge window. It is reposted here to
make it an end. Thanks.

Patch description:
 
Common VM users sometimes care about CPU speed, so we add two new
options to allow VM vendors to present CPU speed to their users.
Normally these information can be fetched from host smbios.

Strictly speaking, the "max speed" and "current speed" in type 4
are not really for the max speed and current speed of processor, for
"max speed" identifies a capability of the system, and "current speed"
identifies the processor's speed at boot (see smbios spec), but some
applications do not tell the differences.

Changelog:

v4 -> v5:
- Rebase patch for lastest upstream

v3 -> v4:
- Fix the default value when not specifying "-smbios type=4" option;
it would be 0 instead of 2000 in previous versions
- Use uint64_t type to check value overflow
- Add test case to check smbios type 4 CPU speed
- v4 https://patchwork.kernel.org/cover/11444635/

v2 -> v3:
- Refine comments per Igor's suggestion.

v1 -> v2:
- change "_" in option names to "-"
- check if option value is too large to fit in SMBIOS type 4 speed
fields.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>

Ying Fang (2):
  hw/smbios: add options for type 4 max-speed and current-speed
  tests/bios-tables-test: add smbios cpu speed test

 hw/smbios/smbios.c       | 36 ++++++++++++++++++++++++++++++----
 qemu-options.hx          |  2 +-
 tests/bios-tables-test.c | 42 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 75 insertions(+), 5 deletions(-)

-- 
2.23.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]