diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2017-05-31 13:04:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-05-31 13:04:31 +0000 |
commit | 862ef28b808aca4dd75cc44a83023362dcce1969 (patch) | |
tree | 7fc15bd8ce0a3c12605853c98e72a1eb37f367c6 /vnfs/qemu | |
parent | 8d528f2b4c66d94ea8760053f9bc75c595630056 (diff) | |
parent | a6a5c653357cf0fd82c489501b6bdbacb2aaf65b (diff) |
Merge "Qemu: Mechanism to pass extra qemu cpu features and pin vCPU threads"
Diffstat (limited to 'vnfs/qemu')
-rw-r--r-- | vnfs/qemu/qemu.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vnfs/qemu/qemu.py b/vnfs/qemu/qemu.py index a9ce176a..b48f7630 100644 --- a/vnfs/qemu/qemu.py +++ b/vnfs/qemu/qemu.py @@ -88,7 +88,7 @@ class IVnfQemu(IVnf): S.getValue('TOOLS')['qemu-system'], '-m', S.getValue('GUEST_MEMORY')[self._number], '-smp', str(S.getValue('GUEST_SMP')[self._number]), - '-cpu', 'host,migratable=off', + '-cpu', str(S.getValue('GUEST_CPU_OPTIONS')[self._number]), '-drive', 'if={},file='.format(S.getValue( 'GUEST_BOOT_DRIVE_TYPE')[self._number]) + S.getValue('GUEST_IMAGE')[self._number], @@ -233,12 +233,13 @@ class IVnfQemu(IVnf): for cpu in range(0, int(S.getValue('GUEST_SMP')[self._number])): match = None + guest_thread_binding = S.getValue('GUEST_THREAD_BINDING')[self._number] + if guest_thread_binding is None: + guest_thread_binding = S.getValue('GUEST_CORE_BINDING')[self._number] for line in output.decode(cur_locale).split('\n'): match = re.search(thread_id % cpu, line) if match: - self._affinitize_pid( - S.getValue('GUEST_CORE_BINDING')[self._number][cpu], - match.group(1)) + self._affinitize_pid(guest_thread_binding[cpu], match.group(1)) break if not match: |