Bug 1879200

Summary: libvirt should invalidate QEMU capabilities cache when kvm module parameters change
Product: Red Hat Enterprise Linux 9 Reporter: Jiri Denemark <jdenemar>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
libvirt sub component: General QA Contact: Luyao Huang <lhuang>
Status: NEW --- Docs Contact:
Severity: medium    
Priority: medium CC: dyuan, fjin, jdenemar, jsuchane, lhuang, lmen, virt-maint, xuzhang, yafu, yalzhang
Version: 9.0Keywords: Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Denemark 2020-09-15 16:20:11 UTC
Description of problem:

Removing kvm_intel model and inserting it back with different parameters can
influence QEMU capabilities, such as CPU features available on the host. For
example, changing nested or pt_mode parameters may change availability of vmx
or intel-pt features respectively. The nested parameter is already checked by
libvirt in virQEMUCapsKVMSupportsNesting and capabilities cache is properly
invalidated when the value of nested parameter changes. Changing pt_mode does
not invalidate the cache, though.

Version-Release number of selected component (if applicable):

libvirt-6.6.0-5

How reproducible:

always

Steps to Reproduce:
1. prepare an Icelake-Server host
2. virsh domcapabilities
3. modprobe -r kvm_intel
4. modprobe kvm_intel pt_mode=1
5. virsh domcapabilities

Actual results:

In step 2. the <mode name='host-model' supported='yes'> element will contain
Icelake-Server CPU model and intel-pt with policy='disable'.

In step 5. the output will be exactly the same as in step 2.

Expected results:

The intel-pt feature with policy='disable' should disappear from the <mode
name='host-model' supported='yes'> element. This means intel-pt can be
enabled, because libvirt consideres it a part of Icelake-Server CPU model.

Comment 2 John Ferlan 2021-09-08 13:31:40 UTC
Bulk update: Move RHEL-AV bugs to RHEL9. If necessary to resolve in RHEL8, then clone to the current RHEL8 release.