Bug 2034942

Summary: <hint-dedicated> should not require <cpu mode='host-passthrough'> [rhel-8.4.0.z]
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: RHEL Program Management Team <pgm-rhel-tools>
Component: libvirtAssignee: Tim Wiederhake <twiederh>
Status: CLOSED ERRATA QA Contact: Luyao Huang <lhuang>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.4CC: dyuan, jdenemar, jsuchane, jtomko, lhuang, lmen, mprivozn, mst, pbonzini, virt-maint, xuzhang, yalzhang, ymankad
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: 8.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-7.0.0-14.6.el8 Doc Type: Bug Fix
Doc Text:
Cause: When a guest is defined its XML is validated against some hard coded rules. Part of that was a check whether hint-dedicated feature is set if and only if guest cpu model is 'host-passthrough'. But as it turned out, this check is wrong, because all the hint-dedicated feature is available for all cpu models. Consequence: Libvirt denied defining or starting such guest. Fix: The fix consists of removing the problematic check. Result: Our validation is one bad check lighter and users can start their hint-dedicated guests happily.
Story Points: ---
Clone Of: 1857671 Environment:
Last Closed: 2022-01-31 15:18:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1857671    
Bug Blocks: 2029343    

Comment 6 Luyao Huang 2022-01-13 02:03:19 UTC
Verify this bug with libvirt-daemon-7.0.0-14.6.module+el8.4.0+13801+378af433.x86_64:

1. prepare a guest which enable hint-dedicated and use host-model cpu mode

# virsh edit q35.xml
...
  <features>
    <acpi/>
    <apic/>
    <pae/>
    <kvm>
      <hint-dedicated state='on'/>
    </kvm>
  </features>
  <cpu mode='host-model' check='partial'/>

Domain 'vm1' XML configuration edited

2. start guest
# virsh start vm1
Domain 'vm1' started

3. check qemu command line:
# ps aux|grep qemu
...kvm-hint-dedicated=on...

And test enable hint-dedicated with custom,host-passthrough cpu mode, got the same result

Comment 8 errata-xmlrpc 2022-01-31 15:18:50 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 (Low: virt:av and virt-devel:av security and bug fix 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-2022:0325