libvirt/src/cpu
Daniel Henrique Barboza 2ba0b7497c virhostcpu.c: skip non x86 hosts in virHostCPUGetMicrocodeVersion()
Non-x86 archs does not have a 'microcode' version like x86. This is
covered already inside the function - just return 0 if no microcode
is found. Regardless of that, a read of /proc/cpuinfo is always made.
Each read will invoke the kernel to fill in the CPU details every time.

Now let's consider a non-x86 host, like a Power 9 server with 128 CPUs.
Each /proc/cpuinfo read will need to fetch data for each CPU and it
won't even matter because we know beforehand that PowerPC chips don't
have microcode information.

We can do better for non-x86 hosts by skipping this process entirely.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-08-25 19:44:39 +02:00
..
cpu_arm_data.h cpu: Introduce virCPUarmData and related struts 2020-05-15 12:04:24 +02:00
cpu_arm.c Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
cpu_arm.h src/cpu: use #pragma once in headers 2019-06-13 17:05:09 +02:00
cpu_map.c VIR_XPATH_NODE_AUTORESTORE: remove semicolon from users 2020-08-25 19:03:12 +02:00
cpu_map.h src/cpu: use #pragma once in headers 2019-06-13 17:05:09 +02:00
cpu_ppc64_data.h src/cpu: use #pragma once in headers 2019-06-13 17:05:09 +02:00
cpu_ppc64.c Use g_strfeev instead of virStringFreeList 2020-08-03 15:37:36 +02:00
cpu_ppc64.h src/cpu: use #pragma once in headers 2019-06-13 17:05:09 +02:00
cpu_s390.c cpu_s390.c: modernize virCPUs390Update 2020-05-25 12:31:14 +02:00
cpu_s390.h src/cpu: use #pragma once in headers 2019-06-13 17:05:09 +02:00
cpu_x86_data.h conf: add support for Direct Mode for Hyper-V Synthetic timers 2019-08-19 11:38:28 +02:00
cpu_x86.c virhostcpu.c: skip non x86 hosts in virHostCPUGetMicrocodeVersion() 2020-08-25 19:44:39 +02:00
cpu_x86.h cpu_conf: Pass policy to CPU feature filtering callbacks 2019-11-12 20:14:15 +01:00
cpu.c cpu: Use g_autoptr and g_autofree in cpu.c 2020-04-07 12:58:07 +02:00
cpu.h cpu: Introduce virCPUarmData and related struts 2020-05-15 12:04:24 +02:00
meson.build meson: src: build libvirt.so library 2020-08-03 09:27:04 +02:00