Uplift Armband to Fuel Newton
[armband.git] / patches / fuel-library / arm64-bug-fixes / 0004-AArch64-nova-libvirt-Use-host-model-cpu.patch
1 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2 Date: Thu, 19 Jan 2017 19:19:28 +0100
3 Subject: [PATCH] AArch64: nova: libvirt: Use host-model cpu
4
5 Closes-bug: https://jira.opnfv.org/browse/ARMBAND-193
6
7 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
8 ---
9  deployment/puppet/openstack_tasks/manifests/roles/compute.pp | 11 ++++++++++-
10  1 file changed, 10 insertions(+), 1 deletion(-)
11
12 diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
13 index a6f4729..f6e6698 100644
14 --- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
15 +++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
16 @@ -319,9 +319,18 @@ class openstack_tasks::roles::compute {
17    # guest OS by using a combination of CPU features and other parameters (such
18    # as CPUID level) that don't work. Until these issues are fixed, it's a good
19    # idea to avoid using host-model
20 +  # NOTE(armband): AArch64: Use host-model cpu
21    # http://libvirt.org/formatdomain.html#elementsCPU
22    # https://bugs.launchpad.net/mos/+bug/1618473
23 -  $libvirt_cpu_mode = 'none'
24 +  # https://jira.opnfv.org/browse/ARMBAND-193
25 +  if str2bool($::is_virtual) {
26 +    $libvirt_cpu_mode = 'none'
27 +  } else {
28 +    $libvirt_cpu_mode = $::architecture ? {
29 +      /(arm64|aarch64)/ => 'host-model',
30 +      default           => 'none',
31 +    }
32 +  }
33
34    # Install / configure nova-compute
35