diff --git a/nova/objects/fields.py b/nova/objects/fields.py index 1bc20b4a57..314fbc2d92 100644 --- a/nova/objects/fields.py +++ b/nova/objects/fields.py @@ -347,14 +347,23 @@ class CPUModel(BaseNovaEnum): "Conroe", "Penryn", "Nehalem", + "Nehalem-IBRS", "Westmere", + "Westmere-IBRS", "SandyBridge", + "SandyBridge-IBRS", "IvyBridge", + "IvyBridge-IBRS", "Haswell", + "Haswell-IBRS", "Broadwell-noTSX", + "Broadwell-noTSX-IBRS", "Broadwell", + "Broadwell-IBRS", "Skylake-Client", - "Skylake-Server") + "Skylake-Client-IBRS", + "Skylake-Server", + "Skylake-Server-IBRS") class CPUMatch(BaseNovaEnum): diff --git a/nova/scheduler/filters/vcpu_model_filter.py b/nova/scheduler/filters/vcpu_model_filter.py index c98b46d05e..43a7bbf803 100644 --- a/nova/scheduler/filters/vcpu_model_filter.py +++ b/nova/scheduler/filters/vcpu_model_filter.py @@ -49,6 +49,12 @@ def _is_compatible(self, host, guest): # The guest CPU model is not in our list. We can't tell whether # we can support it or not. return False + + # if guest request IBRS cpu, but host does not support 'IBRS', then + # return false directly + if('IBRS' in guest and 'IBRS' not in host): + return False + return bool(guest_index <= host_index) def _passthrough_host_passes(self, host_state, spec_obj):