target/arm/kvm64: Ensure sve vls map is completely clear
authorAndrew Jones <drjones@redhat.com>
Mon, 23 Aug 2021 16:06:45 +0000 (18:06 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 26 Aug 2021 16:01:59 +0000 (17:01 +0100)
bitmap_clear() only clears the given range. While the given
range should be sufficient in this case we might as well be
100% sure all bits are zeroed by using bitmap_zero().

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210823160647.34028-3-drjones@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/kvm64.c

index 59982d470d37f19116a69ab76535bf6088554fc0..e790d6c9a5732a58a060760154f8514252f4b38c 100644 (file)
@@ -740,7 +740,7 @@ void kvm_arm_sve_get_vls(CPUState *cs, unsigned long *map)
     uint32_t vq = 0;
     int i, j;
 
-    bitmap_clear(map, 0, ARM_MAX_VQ);
+    bitmap_zero(map, ARM_MAX_VQ);
 
     /*
      * KVM ensures all host CPUs support the same set of vector lengths.