Lift the restriction on choices for `cpu_model_extra_flags` config attribute

Bug #1766208 reported by Kashyap Chamarthy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Kashyap Chamarthy

Bug Description

In the patch[*] that introduced the Nova configuration attribute
`[libvirt]/cpu_model_extra_flags`, we have restricted the choices to be
only 'PCID' -- to alleviate the immediate guest performance degradation
as a result of applying the "Meltdown" CVE fixes.

Now remove that restriction to allow adding and removing multiple CPU
flags, making way for other use cases.

Use cases:

  - Ability to use 1GB huge pages with Haswell model as one use case for
    extra flags:

        cpu_model=Haswell-noTSX-IBRS
        cpu_model_extra_flags="pdpe1gb"

  - Nested Virtualization -- an operator can specify the Intel 'vmx' or
    AMD 'svm' flags in the level-1 Nova guest.

[*] http://git.openstack.org/cgit/openstack/nova/commit/?h=master&
    id=6b601b7 -- libvirt: Allow to specify granular CPU feature flags

A potential example of specifying multiple CPU feature flags
------------------------------------------------------------

If you specify:

    [libvirt]
    cpu_mode=custom
    cpu_model=IvyBridge
    cpu_model_extra_flags="+pcid,-mtrr,pdpe1gb"

Then, Nova should generate the below XML:

    <cpu match='exact'>
      <model fallback='forbid'>IvyBridge</model>
      <vendor>Intel</vendor>
      <feature policy='require' name='pcid'/>
      <feature policy='require' name='pdpe1gb'/>
    </cpu>

The +/- for individual flags in nova.conf will be optional. If nothing
is specified, assume '+'.

You might ask: "Why would you want to remove a CPU flag though?" One
scenario for that is: An Operator wants to generate a baseline CPU
config. And a certain CPU flag is causing performance issue or other
nuisance, and if the Operator isolated the problem to _that_ specific
CPU flag, then she may want to remove the flag.

Tags: libvirt
Changed in nova:
assignee: nobody → Kashyap Chamarthy (kashyapc)
tags: added: libvirt
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/563926

Changed in nova:
status: New → In Progress
Revision history for this message
Matt Riedemann (mriedem) wrote :

This isn't a bug, it's already tracked with a blueprint so just use that:

https://blueprints.launchpad.net/nova/+spec/libvirt-cpu-model-extra-flags

Changed in nova:
status: In Progress → Invalid
Revision history for this message
Kashyap Chamarthy (kashyapc) wrote :

Okay. I wasn't tracking it as a "bug" per se, but mostly as a tracking item / remaining portion of the Blueprint / RFE. Thought reading the text makes it obvious.

Revision history for this message
Kashyap Chamarthy (kashyapc) wrote :

Not to belabor this: FWIW, as you know, we intentionally restricted the original feature. So now we're just fixing that "bad" implementation. So personally, I'd prefer to track this item in this bug too. But if you really insist, I can let it go.

Changed in nova:
status: Invalid → In Progress
Revision history for this message
Matt Riedemann (mriedem) wrote :

I insist.

Changed in nova:
status: In Progress → Invalid
Changed in nova:
status: Invalid → In Progress
Changed in nova:
status: In Progress → Invalid
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.