[PATCH] virresctrl: Fix updating the mask for a cache resource

Jano Tomko jtomko at redhat.com
Wed Jul 7 13:16:35 UTC 2021


On a %A in %Y, Vinayak Kale wrote:
> In 'virResctrlAllocUpdateMask', mask is updated only if 'previous mask' is NULL.
> 
> By default, the bitmask for a cache resource for a VM is initialized with
> 'default-resctrl-group' bitmask. So the 'previous mask' would not be NULL and
> mask won't get updated if cachetune is configured for a VM. This causes libvirt
> to use same bitmask as 'default-resctrl-group' bitmask for a cache resource for
> a VM. This patch fixes the issue.
>> Fixes: d8a354954aba9cd45ab0317915a0a2be27c04767

Thanks for catching this, it seems to be the only such case in that commit.

> 
> Signed-off-by: Vinayak Kale <vkale at nvidia.com>
> ---
>  src/util/virresctrl.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 

Reviewed-by: Ján Tomko <jtomko at redhat.com>

I will push it after the pipeline passes:
https://gitlab.com/janotomko/libvirt/-/pipelines/333213773

Jano




More information about the libvir-list mailing list