Bug 1974560

Summary: RFE: add support for 'xsaves'/'vmx-saves' on Skylake+ CPU models
Product: Red Hat Enterprise Linux 9 Reporter: yafu <yafu>
Component: libvirtAssignee: Tim Wiederhake <twiederh>
libvirt sub component: General QA Contact: Luyao Huang <lhuang>
Status: CLOSED WONTFIX Docs Contact:
Severity: unspecified    
Priority: unspecified CC: dyuan, jdenemar, jsuchane, juzhou, lmen, virt-maint, vkuznets, xuzhang, yalzhang, ymankad
Version: unspecifiedKeywords: FutureFeature, TestOnly, 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: 2023-03-15 18:21:02 UTC Type: Feature Request
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: 1727122, 1856522, 1942914    
Bug Blocks:    

Description yafu 2021-06-22 04:06:01 UTC
Description of problem:
Hyper-V 2016 fails to boot on Skylake+ CPU models because they lack 'xsaves'/'vmx-xsaves' features.

qemu-kvm added support in:
https://bugzilla.redhat.com/show_bug.cgi?id=1942914.

Libvirt also needs to add support for for 'xsaves'/'vmx-saves' on Skylake+ CPU models.

Comment 1 Tim Wiederhake 2021-06-29 14:53:43 UTC
libvirt CPU models are immutable and may differ from their qemu counterparts.

Please try to enable the missing features explicitly in your domain XML as a work around like this:

  <cpu>
    <model>Skylake</model>
    <feature policy='require' name='xsaves'/>
    <feature policy='require' name='vmx-xsaves'/>
  </cpu>

Comment 2 Jiri Denemark 2021-06-29 18:29:39 UTC
>   <cpu>
>     <model>Skylake</model>
>     <feature policy='require' name='xsaves'/>
>     <feature policy='require' name='vmx-xsaves'/>
>   </cpu>

Two things:

- vmx-xsaves is unknown to libvirt so you can't ask for it via XML
- you don't need to add any of these features to the XML unless you need
  libvirt to check the host supports xsaves

In other words, using just Skylake should enable these features as long as
QEMU selects the newest version of Skylake for a chosen machine type. If it
doesn't do so, this BZ remains TestOnly, but it would depend on bug 1856522
and bug 1727122.

Comment 3 Luyao Huang 2021-07-05 07:34:18 UTC
I have tested on libvirt-daemon-7.5.0-1.module+el8.5.0+11664+59f87560.x86_64, libvirt not support vmx-xsaves feature.

# grep -rin "xsaves" /usr/share/libvirt/cpu_map/
/usr/share/libvirt/cpu_map/x86_EPYC-Milan.xml:90:    <feature name='xsaves'/>
/usr/share/libvirt/cpu_map/x86_features.xml:383:  <feature name='xsaves' migratable='no'>

# grep -rin "vmx-xsaves" /usr/share/libvirt/cpu_map/

If you try to start a guest which enable vmx-xsaves feature, you will get an error like this:

# virsh start vm1
error: Failed to start domain 'vm1'
error: unsupported configuration: unknown CPU feature: vmx-xsaves

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

Comment 6 John Ferlan 2021-09-09 15:33:59 UTC
Return to RHEL8 and will add RHV as a Dependent Product.

If a resolution / testing is require in RHEL9, then a clone will need to be created.

Comment 7 John Ferlan 2022-10-17 21:36:46 UTC
Move back to RHEL9 since dependent bugs will be fixed there

Comment 9 Yash Mankad 2023-03-15 18:21:02 UTC
This bug was initially requested as a feature for Red Hat Virtualization (RHV)
RHV is in Maintenance phase and will be End of Life in 2024.

We are unlikely to fix this BZ, so CLOSING this bug as WONTFIX.