Bug 2203709
Summary: | Fail to set HMAT cache none associativity or none policy | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | liang cong <lcong> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
libvirt sub component: | General | QA Contact: | liang cong <lcong> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | medium | ||
Priority: | unspecified | CC: | jdenemar, lmen, pkrempa, virt-maint, ymankad |
Version: | 9.3 | Keywords: | AutomationTriaged, Triaged |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-9.4.0-1.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-11-07 08:31:17 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: | 9.4.0 |
Embargoed: |
Description
liang cong
2023-05-15 05:11:22 UTC
There's a mistake in the formatter code which ignores the 'none' value when formatting. The bug triggers because the parser requires it. At starting we copy the definition via formatting and parsing. Fixed upstream: commit af621caa6bd479ca7666bcc6254e0043466b7b00 Author: Peter Krempa <pkrempa> Date: Tue May 16 10:22:39 2023 +0200 conf: numa: Allow formatting 'none' values for 'associativity' and 'policy' of cache The parser makes the values mandatory and also the qemu code implements actions for those values. The formatter skips them though. Since format+parse is used to copy the XML at startup a definition with those values can't be started. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2203709 Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Michal Privoznik <mprivozn> commit 0d5fc7219ae605959e14d877865793f48c729f5e Author: Peter Krempa <pkrempa> Date: Tue May 16 10:19:42 2023 +0200 virDomainNumaDefNodeCacheParseXML: Refactor parsing of cache XML Use virXMLProp* helpers to simplify the code. Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Michal Privoznik <mprivozn> v9.3.0-78-gaf621caa6b Preverified on upstream libvirt v9.3.0-110-g3b6d69237f Test steps: 1 Define a guest vm with below vcpu setting: <numa> <cell id="0" cpus="0" memory="1048576" unit="KiB"> <cache level="1" associativity='none' policy="none"> <size value="10" unit="KiB"/> <line value="8" unit="B"/> </cache> </cell> <cell id="1" cpus="1" memory="1048576" unit="KiB"/> <interconnects> <latency initiator="0" target="0" cache="1" type="read" value="5"/> <bandwidth initiator="0" target="0" cache="1" type="access" value="204800" unit="KiB"/> </interconnects> </numa> 2 Start the guest # virsh start vm1 Domain 'vm1' started 3 Check the config xml by virsh dumpxml # virsh dumpxml vm1 --xpath '//numa' <numa> <cell id="0" cpus="0" memory="1048576" unit="KiB"> <cache level="1" associativity="none" policy="none"> <size value="10" unit="KiB"/> <line value="8" unit="B"/> </cache> </cell> <cell id="1" cpus="1" memory="1048576" unit="KiB"/> <interconnects> <latency initiator="0" target="0" cache="1" type="read" value="5"/> <bandwidth initiator="0" target="0" cache="1" type="access" value="204800" unit="KiB"/> </interconnects> </numa> 4 Check the hmat info by dmesg cmd # dmesg | grep hmat [ 0.783293] acpi/hmat: Memory Flags:0001 Processor Domain:0 Memory Domain:0 [ 0.784178] acpi/hmat: Memory Flags:0001 Processor Domain:1 Memory Domain:1 [ 0.785175] acpi/hmat: Locality: Flags:01 Type:Read Latency Initiator Domains:2 Target Domains:2 Base:1000 [ 0.786309] acpi/hmat: Initiator-Target[0-0]:5 nsec [ 0.787137] acpi/hmat: Initiator-Target[0-1]:0 nsec [ 0.787933] acpi/hmat: Initiator-Target[1-0]:0 nsec [ 0.788722] acpi/hmat: Initiator-Target[1-1]:0 nsec [ 0.790134] acpi/hmat: Locality: Flags:01 Type:Access Bandwidth Initiator Domains:2 Target Domains:2 Base:8 [ 0.791268] acpi/hmat: Initiator-Target[0-0]:200 MB/s [ 0.792131] acpi/hmat: Initiator-Target[0-1]:0 MB/s [ 0.792933] acpi/hmat: Initiator-Target[1-0]:0 MB/s [ 0.793705] acpi/hmat: Initiator-Target[1-1]:0 MB/s [ 0.794129] acpi/hmat: Cache: Domain:0 Size:10240 Attrs:00080011 SMBIOS Handles:0 Verified on build: # rpm -q libvirt qemu-kvm libvirt-9.5.0-3.el9.x86_64 qemu-kvm-8.0.0-9.el9.x86_64 Test steps: 1 Define a guest vm with below vcpu setting: <numa> <cell id="0" cpus="0" memory="1048576" unit="KiB"> <cache level="1" associativity='none' policy="none"> <size value="10" unit="KiB"/> <line value="8" unit="B"/> </cache> </cell> <cell id="1" cpus="1" memory="1048576" unit="KiB"/> <interconnects> <latency initiator="0" target="0" cache="1" type="read" value="5"/> <bandwidth initiator="0" target="0" cache="1" type="access" value="204800" unit="KiB"/> </interconnects> </numa> 2 Start the guest # virsh start vm1 Domain 'vm1' started 3 Check the config xml by virsh dumpxml # virsh dumpxml vm1 | xmllint -xpath '//numa' - <numa> <cell id="0" cpus="0" memory="1048576" unit="KiB"> <cache level="1" associativity="none" policy="none"> <size value="10" unit="KiB"/> <line value="8" unit="B"/> </cache> </cell> <cell id="1" cpus="1" memory="1048576" unit="KiB"/> <interconnects> <latency initiator="0" target="0" cache="1" type="read" value="5"/> <bandwidth initiator="0" target="0" cache="1" type="access" value="204800" unit="KiB"/> </interconnects> </numa> 4 Check the hmat info by dmesg cmd in guest # dmesg | grep hmat [ 0.873137] acpi/hmat: Memory Flags:0001 Processor Domain:0 Memory Domain:0 [ 0.873139] acpi/hmat: Memory Flags:0001 Processor Domain:1 Memory Domain:1 [ 0.873140] acpi/hmat: Locality: Flags:01 Type:Read Latency Initiator Domains:2 Target Domains:2 Base:1000 [ 0.873141] acpi/hmat: Initiator-Target[0-0]:5 nsec [ 0.873142] acpi/hmat: Initiator-Target[0-1]:0 nsec [ 0.873142] acpi/hmat: Initiator-Target[1-0]:0 nsec [ 0.873143] acpi/hmat: Initiator-Target[1-1]:0 nsec [ 0.873143] acpi/hmat: Locality: Flags:01 Type:Access Bandwidth Initiator Domains:2 Target Domains:2 Base:8 [ 0.873145] acpi/hmat: Initiator-Target[0-0]:200 MB/s [ 0.873145] acpi/hmat: Initiator-Target[0-1]:0 MB/s [ 0.873146] acpi/hmat: Initiator-Target[1-0]:0 MB/s [ 0.873146] acpi/hmat: Initiator-Target[1-1]:0 MB/s [ 0.873147] acpi/hmat: Cache: Domain:0 Size:10240 Attrs:00080011 SMBIOS Handles:0 5. in guest check numa hmat related info by virsh capabilities # virsh capabilities | xmllint --xpath '//cells' - ... <cache level="1" associativity="none" policy="none"> <size value="10" unit="KiB"/> <line value="8" unit="B"/> </cache> ... 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: libvirt 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:6409 |