[libvirt] [PATCH] vz: allow to start vz driver without host cache info

Peter Krempa pkrempa at redhat.com
Tue Jul 11 08:29:35 UTC 2017


On Tue, Jul 11, 2017 at 10:41:15 +0300, Mikhail Feoktistov wrote:
> Error occurs in src/conf/capabilities.c line 1736
> 
> int virCapabilitiesInitCaches(virCapsPtr caps)
> ...
>    if (virFileReadValueUint(&bank->id,
> "%s/cpu/cpu%zd/cache/%s/id",
>                                              SYSFS_SYSTEM_PATH, pos,
> ent->d_name) < 0)
>           goto cleanup;
> ...
> 
> file "id" doesn't exist
> 
> ls -al /sys/devices/system/cpu/cpu0/cache/index0/
> total 0
> drwxr-xr-x 2 root root    0 Jun 30 06:03 .
> drwxr-xr-x 6 root root    0 Jun 29 04:42 ..
> -r--r--r-- 1 root root 4096 Jul 10 06:44 coherency_line_size
> -r--r--r-- 1 root root 4096 Jul  5 11:33 level
> -r--r--r-- 1 root root 4096 Jul 10 06:44 number_of_sets
> -r--r--r-- 1 root root 4096 Jul 10 06:44 physical_line_partition
> -r--r--r-- 1 root root 4096 Jul 10 06:44 shared_cpu_list
> -r--r--r-- 1 root root 4096 Jul 10 06:44 shared_cpu_map
> -r--r--r-- 1 root root 4096 Jul 10 06:44 size
> -r--r--r-- 1 root root 4096 Jul 10 06:44 type
> -r--r--r-- 1 root root 4096 Jul 10 06:44 ways_of_associativity

So your system (cpu/kernel) does not support reporting the cache data
required to populate the capabilities.

So the fix is correct, since other callers of virCapabilitiesInitCaches
ignore the error as well.

Please put the justification into the commit message as it's usually
done in commits to libvirt.

> On 10.07.2017 15:48, Peter Krempa wrote:
> > On Mon, Jul 10, 2017 at 07:54:03 -0400, Mikhail Feoktistov wrote:
> > 
> > Any justification or explanation when this happens?
> > 
> > > ---
> > >   src/vz/vz_driver.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170711/121fd831/attachment-0001.sig>


More information about the libvir-list mailing list