[PATCH] vbox: Make host CPU cache init non-fatal

Charlie Sharpsteen source at sharpsteen.net
Thu Apr 8 18:15:28 UTC 2021


This commit updates the vbox driver to log a warning if the
virCapabilitiesInitCaches function fails instead of treating failure
as a fatal error. CPU cache initialization requires the sysfs filesystem
in order to complete successfully and thus fails on platforms such as macOS.

This commit is similar to ace6528ae19, which made the same change to the
VMware driver.

Signed-off-by: Charlie Sharpsteen <source at sharpsteen.net>
---
 src/vbox/vbox_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 5a5de85eab..933851346b 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -98,7 +98,7 @@ vboxCapsInit(void)
         return NULL;
 
     if (virCapabilitiesInitCaches(caps) < 0)
-        return NULL;
+        VIR_WARN("Failed to get host CPU cache info");
 
     if ((guest = virCapabilitiesAddGuest(caps,
                                          VIR_DOMAIN_OSTYPE_HVM,
-- 
2.31.1




More information about the libvir-list mailing list