CPU mode feature policy settings

Bug #1907146 reported by Adam Dyess
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Nova Compute Charm
New
Undecided
Unassigned

Bug Description

with the cpu-model-extra-flags argument you can set nova.conf -- cpu_model_extra_flags. However nova will only set features. the default policy for a feature is 'required'

for instance)
   juju config nova-compute cpu-model-extra-flags="feature-1 feature-2"

creates nova.conf
   cpu_model_extra_flags = feature-1, feature-2

in libvirt xml

<cpu>
  <feature name="feature-1/>
  <feature name="feature-2/>
</cpu>

the default policy attribute above is 'require'
<cpu>
  <feature policy="require" name="feature-1/>
  <feature policy="require" name="feature-2/>
</cpu>

I have a circumstance where i'd like to control the policy flag in this XML

https://www.berrange.com/posts/2010/02/15/guest-cpu-model-configuration-in-libvirt-with-qemukvm/
The next enhancement is that the <feature> elements can each have an extra “policy” attribute with possible values

    policy=”force” – expose the feature to the guest even if the host does not have it. This is kind of crazy, except in the case of software emulation.
    policy=”require” – expose the feature to the guest and fail if the host does not have it. This is the sensible default.
    policy=”optional” – expose the feature to the guest if it happens to support it.
    policy=”disable” – if the host has this feature, then hide it from the guest
    policy=”forbid” – if the host has this feature, then fail and refuse to start the guest

Could you push upstream to add this feature?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.