[libvirt] [PATCH] virt-host-validate: warn if kvm_hv is not loaded for POWER hosts

Cole Robinson crobinso at redhat.com
Tue Dec 17 17:58:16 UTC 2019


On 12/12/19 4:11 PM, Daniel Henrique Barboza wrote:
> POWER hosts does not implement CPU virtualization extensions like
> x86 or s390x. Instead, all bare-metal POWER hosts are considered
> to be virtualization ready.
> 
> For POWER, the validation is done by checking the virtualization
> kernel modules, kvm_hv and kvm_pr, to see if they are either not
> installed or not loaded in the host. If the KVM modules aren't
> present, we should not just warn but fail to validate.
> 
> This patch implements this support. If kvm_hv is not installed,
> which can be determined by 'modinfo' returning not-zero return
> code, fail the verification. If kvm_hv is installed but not
> loaded, show a warning. The exception are POWER8 hosts, which can
> work with kvm_pr. In its case, ACK the use of kvm_pr if kvm_hv
> is not loaded/present.

For x86, we check for /dev/kvm being available and usable. This side
steps whether kvm is a module or not, in theory it could be compiled
into the kernel. Is there anything in /dev we can check for power8?

I don't follow the reasoning for for why the module is installed vs
loaded matters for FAIL vs WARN. Can you expand on that a bit more?

Rather than parsing /proc/modinfo, can we check for /sys/module/$modname
instead, or something under that directory?

- Cole




More information about the libvir-list mailing list