nailgun: Add NIC vendorid and device id for Cavium NIC
[armband.git] / patches / fuel-library / upstream-backports / 0001-nova-AArch64-enable-hugepage-support.patch
1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2017 Enea AB and others.
3 :
4 : All rights reserved. This program and the accompanying materials
5 : are made available under the terms of the Apache License, Version 2.0
6 : which accompanies this distribution, and is available at
7 : http://www.apache.org/licenses/LICENSE-2.0
8 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
9 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
10 Date: Fri, 16 Sep 2016 21:31:56 +0200
11 Subject: [PATCH] nova: AArch64: enable hugepage support
12
13 This patch adds AArch64 to the hardcoded lists of valid
14 architectures for hugepage support.
15
16 Backported upstream patch from [1].
17
18 [1] https://review.openstack.org/#/c/372304/
19
20 Closes-bug: ARMBAND-90
21
22 Signed-off-by: Veena Lingadahalli <vlingadahalli@mvista.com>
23 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
24 ---
25  ...gepage-and-NUMA-support-check-for-aarch64.patch | 41 ++++++++++++++++++++++
26  .../openstack_tasks/manifests/roles/compute.pp     | 12 +++++++
27  2 files changed, 53 insertions(+)
28  create mode 100644 deployment/puppet/openstack/files/nova-Adding-hugepage-and-NUMA-support-check-for-aarch64.patch
29
30 diff --git a/deployment/puppet/openstack/files/nova-Adding-hugepage-and-NUMA-support-check-for-aarch64.patch b/deployment/puppet/openstack/files/nova-Adding-hugepage-and-NUMA-support-check-for-aarch64.patch
31 new file mode 100644
32 index 0000000..ba91357
33 --- /dev/null
34 +++ b/deployment/puppet/openstack/files/nova-Adding-hugepage-and-NUMA-support-check-for-aarch64.patch
35 @@ -0,0 +1,41 @@
36 +From: VeenaSL <mveenasl@gmail.com>
37 +Date: Mon, 19 Sep 2016 13:36:53 +0530
38 +Subject: [PATCH] Adding hugepage and NUMA support check for aarch64
39 +
40 +Nova ignores aarch64 while verifying for hugepage and NUMA support.
41 +AARCH64 also supports hugepage and NUMA on the same libvirt versions as of x86.
42 +Hence adding this chek for aarch64 also.
43 +
44 +Change-Id: I7b5ae1dbdca4fdd0aee2eefd4099c4c4953b609a
45 +Closes-bug: #1623871
46 +
47 +Signed-off-by: Veena Lingadahalli <vlingadahalli@mvista.com>
48 +Acked-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
49 +
50 +---
51 + virt/libvirt/driver.py                                         | 6 ++++--
52 +
53 +diff --git a/virt/libvirt/driver.py b/virt/libvirt/driver.py
54 +index 5668f57..b0857f3 100644
55 +--- a/virt/libvirt/driver.py
56 ++++ b/virt/libvirt/driver.py
57 +@@ -5108,7 +5108,8 @@ class LibvirtDriver(driver.ComputeDriver):
58 +                     self._bad_libvirt_numa_version_warn = True
59 +                 return False
60 +
61 +-        support_matrix = {(arch.I686, arch.X86_64): MIN_LIBVIRT_NUMA_VERSION,
62 ++        support_matrix = {(arch.I686, arch.X86_64,
63 ++                           arch.AARCH64): MIN_LIBVIRT_NUMA_VERSION,
64 +                           (arch.PPC64,
65 +                            arch.PPC64LE): MIN_LIBVIRT_NUMA_VERSION_PPC}
66 +         caps = self._host.get_capabilities()
67 +@@ -5124,7 +5125,8 @@ class LibvirtDriver(driver.ComputeDriver):
68 +     def _has_hugepage_support(self):
69 +         # This means that the host can support multiple values for the size
70 +         # field in LibvirtConfigGuestMemoryBackingPage
71 +-        supported_archs = [arch.I686, arch.X86_64, arch.PPC64LE, arch.PPC64]
72 ++        supported_archs = [arch.I686, arch.X86_64, arch.PPC64LE, arch.PPC64,
73 ++                           arch.AARCH64]
74 +         caps = self._host.get_capabilities()
75 +         return ((caps.host.cpu.arch in supported_archs) and
76 +                 self._host.has_min_version(MIN_LIBVIRT_HUGEPAGE_VERSION,
77 diff --git a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
78 index 8207261..b5cefdf 100644
79 --- a/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
80 +++ b/deployment/puppet/openstack_tasks/manifests/roles/compute.pp
81 @@ -313,5 +313,17 @@ class openstack_tasks::roles::compute {
82      cwd     => $nova_path,
83      require => [Package['patch']],
84 +  } ->
85 +  # FIXME(armband): Add AArch64 to arch list for nova hugepage support
86 +  file { "${nova_path}/nova-Adding-hugepage-and-NUMA-support-check-for-aarch64.patch":
87 +    ensure => "file",
88 +    source => "puppet:///modules/openstack/nova-Adding-hugepage-and-NUMA-support-check-for-aarch64.patch",
89 +  } ->
90 +  exec { 'nova AArch64 enable hugepage support':
91 +    path    => ['/usr/bin'],
92 +    command => "patch -p1 < ${nova_path}/nova-Adding-hugepage-and-NUMA-support-check-for-aarch64.patch",
93 +    unless  => "patch -p1 -R -N --dry-run < ${nova_path}/nova-Adding-hugepage-and-NUMA-support-check-for-aarch64.patch",
94 +    cwd     => $nova_path,
95 +    require => [Package['patch']],
96    }
97
98    class { '::nova::cache':