[libvirt PATCH] conf: skip resource cache init if sysfs files are missing

Alex Bennée alex.bennee at linaro.org
Tue Oct 11 06:30:10 UTC 2022


Daniel P. Berrangé <berrange at redhat.com> writes:

> On aarch64 the 'id' file is not present for CPU cache information in
> sysfs. This causes the local stateful hypervisor drivers to fail to
> initialize capabilities:
>
> virStateInitialize:657 : Initialisation of cloud-hypervisor state driver failed: no error
>
> The 'no error' is because the 'virFileReadValueNNN' methods return
> ret==-2, with no error raised, when the requeted file does not exist.
> None of the callers were checking for this scenario when populating
> capabilities. The most graceful way to handle this is to skip the
> cache bank in question.  This fixes failure to launch libvirt drivers
> on certain aarch64 hardware.
>
> Fixes: https://gitlab.com/libvirt/libvirt/-/issues/389
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>

Tested-by: Alex Bennée <alex.bennee at linaro.org>

-- 
Alex Bennée



More information about the libvir-list mailing list