From 50e0106d35ec1a3204c18f3912b0dc6cf6632305 Mon Sep 17 00:00:00 2001 From: VeenaSL Date: Mon, 19 Sep 2016 13:36:53 +0530 Subject: [PATCH] Adding hugepage and NUMA support check for aarch64 Nova ignores aarch64 while verifying for hugepage and NUMA support. AARCH64 also supports hugepage and NUMA on the same libvirt versions as of x86. Hence adding this chek for aarch64 also. Change-Id: I7b5ae1dbdca4fdd0aee2eefd4099c4c4953b609a Closes-bug: #1623871 --- nova/tests/unit/virt/libvirt/test_driver.py | 3 ++- nova/virt/libvirt/driver.py | 6 ++++-- ...-numa-hugepage-support-for-aarch64-14279c307e44b147.yaml | 4 ++++ 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/add-numa-hugepage-support-for-aarch64-14279c307e44b147.yaml diff --git a/nova/tests/unit/virt/libvirt/test_driver.py b/nova/tests/unit/virt/libvirt/test_driver.py index 9f0b56c21247..0205f64ab625 100644 --- a/nova/tests/unit/virt/libvirt/test_driver.py +++ b/nova/tests/unit/virt/libvirt/test_driver.py @@ -2910,7 +2910,8 @@ class LibvirtConnTestCase(test.NoDBTestCase): return_value=True) @mock.patch.object(host.Host, "get_capabilities") def test_does_want_hugepages(self, mock_caps, mock_hp, mock_numa): - for each_arch in [arch.I686, arch.X86_64, arch.PPC64LE, arch.PPC64]: + for each_arch in [arch.I686, arch.X86_64, arch.PPC64LE, arch.PPC64, + arch.AARCH64]: self._test_does_want_hugepages( mock_caps, mock_hp, mock_numa, each_arch) diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 5668f5740fb2..b0857f3db4f7 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -5108,7 +5108,8 @@ class LibvirtDriver(driver.ComputeDriver): self._bad_libvirt_numa_version_warn = True return False - support_matrix = {(arch.I686, arch.X86_64): MIN_LIBVIRT_NUMA_VERSION, + support_matrix = {(arch.I686, arch.X86_64, + arch.AARCH64): MIN_LIBVIRT_NUMA_VERSION, (arch.PPC64, arch.PPC64LE): MIN_LIBVIRT_NUMA_VERSION_PPC} caps = self._host.get_capabilities() @@ -5124,7 +5125,8 @@ class LibvirtDriver(driver.ComputeDriver): def _has_hugepage_support(self): # This means that the host can support multiple values for the size # field in LibvirtConfigGuestMemoryBackingPage - supported_archs = [arch.I686, arch.X86_64, arch.PPC64LE, arch.PPC64] + supported_archs = [arch.I686, arch.X86_64, arch.PPC64LE, arch.PPC64, + arch.AARCH64] caps = self._host.get_capabilities() return ((caps.host.cpu.arch in supported_archs) and self._host.has_min_version(MIN_LIBVIRT_HUGEPAGE_VERSION, diff --git a/releasenotes/notes/add-numa-hugepage-support-for-aarch64-14279c307e44b147.yaml b/releasenotes/notes/add-numa-hugepage-support-for-aarch64-14279c307e44b147.yaml new file mode 100644 index 000000000000..9e8e5c043582 --- /dev/null +++ b/releasenotes/notes/add-numa-hugepage-support-for-aarch64-14279c307e44b147.yaml @@ -0,0 +1,4 @@ +--- +features: + - Adding aarch64 to the list of supported architectures for NUMA and hugepage features. + This requires libvirt>=1.2.7 for NUMA, libvirt>=1.2.8 for hugepage and qemu v2.1.0 for both.