Bug 1851244

Summary: RFE: enable more Hyper-V enlightenments by default
Product: [Community] Virtualization Tools Reporter: Kevin Locke <kevin>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED DEFERRED QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, crobinso, gscrivan, mhicks, paelzer
Target Milestone: ---   
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: 2020-09-15 21:12:18 UTC 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 Kevin Locke 2020-06-25 21:40:26 UTC
Description of problem:

virt-install currently enables hv-time,hv-relaxed,hv-vapic,hv-spinlocks=0x1fff for guests which support Hyper-V.  There are several additional Hyper-V enlightenments supported by QEMU and libvirt (see https://github.com/qemu/qemu/blob/master/docs/hyperv.txt and https://libvirt.org/formatdomain.html#elementsFeatures) which could be useful to enable.  In particular, hv_stimer significantly reduces CPU usage when supporting VMs are paused (see https://lore.kernel.org/kvm/20200625201046.GA179502@kevinolos/).

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

How reproducible: 100%

Steps to Reproduce:
1. virt-install --os-variant win10 --print-xml

Actual results:
<hyperv>
  <relaxed state="on"/>
  <vapic state="on"/>
  <spinlocks state="on" retries="8191"/>
</hyperv>

Expected results:
Something more like:
<hyperv>
  <relaxed state='on'/>
  <vapic state='on'/>
  <spinlocks state="on" retries="8191"/>
  <vpindex state='on'/>
  <runtime state='on'/>
  <synic state='on'/>
  <stimer state='on'/>
  <frequencies state='on'/>
  <tlbflush state='on'/>
  <ipi state='on'/>
</hyperv>


Additional info:
I'm not advocating for any specific Hyper-V enlightenments to be enabled, but I suspect the current defaults are sub-optimal and I would be willing to help improve them.  Is there a process for evaluating which to enable, or is it simply a matter of adding defaults for features which weren't available previously?

Thanks,
Kevin

Comment 1 Cole Robinson 2020-09-15 21:12:18 UTC
Thanks for the report. This will take a discussion with qemu developers to understand what it will take to safely enable more options, if there's tradeoffs, etc.

We are moving to using github issues for upstream virt-manager, so I moved this issue there: https://github.com/virt-manager/virt-manager/issues/154