RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1717611 - RFE: Interface for querying supported HyperV Enlightenments
Summary: RFE: Interface for querying supported HyperV Enlightenments
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Luyao Huang
URL:
Whiteboard:
Depends On: 1851247
Blocks: 1624786 1717616
TreeView+ depends on / blocked
 
Reported: 2019-06-05 19:45 UTC by Eduardo Habkost
Modified: 2023-05-09 08:06 UTC (History)
18 users (show)

Fixed In Version: libvirt-9.0.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:26:10 UTC
Type: Feature Request
Target Upstream Version: 9.0.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker LIBVIRTAT-14036 0 None None None 2023-03-14 07:12:48 UTC
Red Hat Product Errata RHBA-2023:2171 0 None None None 2023-05-09 07:26:53 UTC

Description Eduardo Habkost 2019-06-05 19:45:47 UTC
Management software needs to be able to query which HyperV Enlightenments are supported by the current host.  The availability of HyperV Enlightenments depends on capabilities available in the KVM kernel module, in QEMU, and in libvirt.

Comment 4 Michal Privoznik 2020-06-16 13:49:03 UTC
Eduardo/Vitaly,

what kind of information is needed exactly? And do you know where can libvirt get that from?

Comment 5 Eduardo Habkost 2020-06-25 21:46:08 UTC
(In reply to Michal Privoznik from comment #4)
> Eduardo/Vitaly,
> 
> what kind of information is needed exactly? And do you know where can
> libvirt get that from?

I expected hyperv feature flags to be reported through the same mechanism as other CPU features, using query-cpu-model-expansion, with the "max" and "host" CPU models.  "max" tells which features are supported by the host.  "host" tells which features are supported and can be safely enabled by default.

However, it looks like this is not implemented yet.  We need a qemu-kvm BZ for this.  I suggest clearing ITR on this bug by now, until we start working on the qemu-kvm side.

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

Comment 10 RHEL Program Management 2021-09-15 08:26:12 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 13 Vitaly Kuznetsov 2021-09-15 09:35:05 UTC
Note: QEMU part has landed in 6.1:
https://gitlab.com/qemu-project/qemu/-/commit/071ce4b03becf9e2df6b758fde9609be8ddf56f1
so libvirt can use it with e.g.

query-cpu-model-expansion type=full model={"name":"host","props":{"hv-passthrough":true}}

Comment 16 John Ferlan 2022-09-02 19:39:08 UTC
Adding to plan for 9.2.0. Looks like CNV is also interested in the feature. We need to decide in 9.2 timeframe whether or not to do this or just close.

Comment 17 RHEL Program Management 2022-09-14 07:27:49 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 22 Michal Privoznik 2022-12-22 13:02:43 UTC
Patches posted on the list:

https://listman.redhat.com/archives/libvir-list/2022-December/236464.html

Comment 28 Michal Privoznik 2023-01-05 11:46:24 UTC
Merged upstream as:

903ea9370d qemu_capabilities: Report Hyper-V Enlightenments in domcapabilities
10f4784864 qemu_capabilities: Query for Hyper-V Enlightenments
ff8731680b qemuMonitorJSONGetCPUModelExpansion: Introduce @hv_passthrough argument
7c12eb2397 qemuMonitorJSONMakeCPUModel: Introduce @hv_passthrough argument
7c1ecfd512 domain_capabilities: Expose Hyper-V Enlightenments
179e45d237 virDomainCapsEnumFormat: Retrun void
a7789d9324 virDomainCapsEnumFormat: Switch to virXMLFormatElement()

v8.10.0-172-g903ea9370d

Comment 29 Luyao Huang 2023-01-12 08:04:49 UTC
Pre-verify on upstream libvirt:

# ./builddir/run ./builddir/tools/virsh domcapabilities |grep -A17 '<hyperv'
    <hyperv supported='yes'>
      <enum name='features'>
        <value>relaxed</value>
        <value>vapic</value>
        <value>spinlocks</value>
        <value>vpindex</value>
        <value>runtime</value>
        <value>synic</value>
        <value>stimer</value>
        <value>reset</value>
        <value>vendor_id</value>
        <value>frequencies</value>
        <value>reenlightenment</value>
        <value>tlbflush</value>
        <value>ipi</value>
        <value>avic</value>
      </enum>
    </hyperv>

Comment 33 Luyao Huang 2023-02-07 09:24:11 UTC
Verify this bug with libvirt-9.0.0-3.el9.x86_64:

S1: Check hyperv feature support list in domcapabilities output

1.
# virsh domcapabilities |grep -A17 '<hyperv'
    <hyperv supported='yes'>
      <enum name='features'>
        <value>relaxed</value>
        <value>vapic</value>
        <value>spinlocks</value>
        <value>vpindex</value>
        <value>runtime</value>
        <value>synic</value>
        <value>stimer</value>
        <value>reset</value>
        <value>vendor_id</value>
        <value>frequencies</value>
        <value>reenlightenment</value>
        <value>tlbflush</value>
        <value>ipi</value>
        <value>avic</value>
      </enum>
    </hyperv>


2. start a guest use support hyperv features

# virsh edit vm1
...
  <features>
    <acpi/>
    <apic/>
    <hyperv mode='custom'>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='4096'/>
      <vpindex state='on'/>
      <runtime state='on'/>
      <synic state='on'/>
      <stimer state='on'>
        <direct state='on'/>
      </stimer>
      <reset state='on'/>
      <vendor_id state='on' value='KVM Hv'/>
      <frequencies state='on'/>
      <reenlightenment state='on'/>
      <tlbflush state='on'/>
      <ipi state='on'/>
      <avic state='on'/>
    </hyperv>
  </features>
...

# virsh start vm1
Domain 'vm1' started

3. add a not support feature and try to start guest

# virsh edit vm1

  <features>
    <acpi/>
    <apic/>
    <hyperv mode='custom'>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='4096'/>
      <vpindex state='on'/>
      <runtime state='on'/>
      <synic state='on'/>
      <stimer state='on'>
        <direct state='on'/>
      </stimer>
      <reset state='on'/>
      <vendor_id state='on' value='KVM Hv'/>
      <frequencies state='on'/>
      <reenlightenment state='on'/>
      <tlbflush state='on'/>
      <ipi state='on'/>
      <evmcs state='on'/>     <----- this feature not in support feature list
      <avic state='on'/>
    </hyperv>
  </features>


# virsh start vm1
error: Failed to start domain 'vm1'
error: internal error: qemu unexpectedly closed the monitor: 2023-02-07T09:10:54.933698Z qemu-kvm: Hyper-V enlightened VMCS (hv-evmcs) is not supported by kernel

Comment 35 errata-xmlrpc 2023-05-09 07:26:10 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 (libvirt 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-2023:2171


Note You need to log in before you can comment on or make changes to this bug.