Description of problem: "cache=X" in <bandwidth> failed to do syntax validation Version-Release number of selected component (if applicable): libvirt-daemon-7.5.0-1.module+el8.5.0+11664+59f87560.x86_64 qemu-kvm-6.0.0-21.module+el8.5.0+11555+e0ab0d09.x86_64 How reproducible: Always Steps to Reproduce: 1. Below configuration can be saved in "virsh edit", <bandwidth initiator='0' target='0' cache='1' type='access' value='208896' unit='KiB'/> <bandwidth initiator='0' target='0' cache='1' type='read' value='209920' unit='KiB'/> <bandwidth initiator='0' target='0' cache='1' type='write' value='210944' unit='KiB'/> <bandwidth initiator='0' target='1' cache='1' type='access' value='105472' unit='KiB'/> <bandwidth initiator='0' target='1' cache='1' type='read' value='106496' unit='KiB'/> <bandwidth initiator='0' target='1' cache='1' type='write' value='107520' unit='KiB'/> error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng Extra element cpu in interleave Element domain failed to validate content Actual results: Failed to do syntax validation Expected results: passed Additional info:
Patch posted to the list: https://listman.redhat.com/archives/libvir-list/2021-July/msg00156.html
Merged upstream as: commit 12f96b06118e5d9061cf94724666eb254a150f65 Author: Michal Prívozník <mprivozn> AuthorDate: Wed Jul 7 16:00:49 2021 +0200 Commit: Michal Prívozník <mprivozn> CommitDate: Thu Jul 8 16:28:30 2021 +0200 schemas: Allow cache attribute for bandwidth element for HMAT Turns out, when introducing HMAT support in v6.6.0-rc1~249 I've forgot to allow "cache" attribute for <bandwidth/> element in RNG. It's parsed and formatted, but schema does not allow it. Fixes: a89bbbac86383a10be0cec5a93feb7ed820871eb Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1980162 Signed-off-by: Michal Privoznik <mprivozn> Reviewed-by: Pavel Hrdina <phrdina> v7.5.0-32-g12f96b0611
Tested with libvirt upstream version v7.6.0-rc1 & qemu-6.0.0-11.fc35.x86_64 S1. Edit vm with adding HMAT configuration - 1. Edit vm with adding below xml part - <cpu mode='custom' match='exact' check='none'> <model fallback='forbid'>qemu64</model> <numa> <cell id='0' cpus='0-1' memory='2097152' unit='KiB' discard='yes'> <cache level='1' associativity='direct' policy='writeback'> <size value='10' unit='KiB'/> <line value='8' unit='B'/> </cache> <cache level='2' associativity='full' policy='writethrough'> <size value='128' unit='KiB'/> <line value='16' unit='B'/> </cache> </cell> <cell id='1' memory='512000' unit='KiB'> <cache level='1' associativity='direct' policy='writeback'> <size value='10' unit='KiB'/> <line value='8' unit='B'/> </cache> </cell> <interconnects> <latency initiator='0' target='0' type='access' value='5'/> <latency initiator='0' target='0' type='read' value='6'/> <latency initiator='0' target='0' type='write' value='7'/> <latency initiator='0' target='1' type='access' value='10'/> <latency initiator='0' target='1' type='read' value='11'/> <latency initiator='0' target='1' type='write' value='12'/> <bandwidth initiator='0' target='0' type='access' value='204800' unit='KiB'/> <bandwidth initiator='0' target='0' type='read' value='205824' unit='KiB'/> <bandwidth initiator='0' target='0' type='write' value='206848' unit='KiB'/> <bandwidth initiator='0' target='1' type='access' value='102400' unit='KiB'/> <bandwidth initiator='0' target='1' type='read' value='103424' unit='KiB'/> <bandwidth initiator='0' target='1' type='write' value='104448' unit='KiB'/> <bandwidth initiator='0' target='0' cache='1' type='access' value='208896' unit='KiB'/> <bandwidth initiator='0' target='0' cache='1' type='read' value='209920' unit='KiB'/> <bandwidth initiator='0' target='0' cache='1' type='write' value='210944' unit='KiB'/> <bandwidth initiator='0' target='1' cache='1' type='access' value='105472' unit='KiB'/> <bandwidth initiator='0' target='1' cache='1' type='read' value='106496' unit='KiB'/> <bandwidth initiator='0' target='1' cache='1' type='write' value='107520' unit='KiB'/> </interconnects> </numa> </cpu> 2. Save and start the vm - # virsh start pc Domain 'pc' started
Verified with libvirt-7.6.0-1.module+el8.5.0+12097+2c77910b.x86_64 & qemu-kvm-6.0.0-21.module+el8.5.0+11555+e0ab0d09.x86_64 Steps are the same with comment 3.
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 (virt:av 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/RHBA-2021:4684