KVM: arm64: vgic: Demote userspace-triggered console prints to kvm_debug()
authorMarc Zyngier <maz@kernel.org>
Thu, 16 Dec 2021 10:45:07 +0000 (10:45 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 16 Dec 2021 10:47:48 +0000 (10:47 +0000)
Running the KVM selftests results in these messages being dumped
in the kernel console:

[  188.051073] kvm [469]: VGIC redist and dist frames overlap
[  188.056820] kvm [469]: VGIC redist and dist frames overlap
[  188.076199] kvm [469]: VGIC redist and dist frames overlap

Being amle to trigger this from userspace is definitely not on,
so demote these warnings to kvm_debug().

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211216104507.1482017-1-maz@kernel.org
arch/arm64/kvm/vgic/vgic-v2.c
arch/arm64/kvm/vgic/vgic-v3.c

index 95a18cec14a35036ca4c6c2e3446f5a1cb646935..280a708631cdcafd71b2f5dca4193b2afd6834c5 100644 (file)
@@ -293,12 +293,12 @@ int vgic_v2_map_resources(struct kvm *kvm)
 
        if (IS_VGIC_ADDR_UNDEF(dist->vgic_dist_base) ||
            IS_VGIC_ADDR_UNDEF(dist->vgic_cpu_base)) {
-               kvm_err("Need to set vgic cpu and dist addresses first\n");
+               kvm_debug("Need to set vgic cpu and dist addresses first\n");
                return -ENXIO;
        }
 
        if (!vgic_v2_check_base(dist->vgic_dist_base, dist->vgic_cpu_base)) {
-               kvm_err("VGIC CPU and dist frames overlap\n");
+               kvm_debug("VGIC CPU and dist frames overlap\n");
                return -EINVAL;
        }
 
index 04f62c4b07fb5f590849261107c2b83aaed07767..97ab7c02e189a650a427ebaae1cfb1c1dc07c8bb 100644 (file)
@@ -554,12 +554,12 @@ int vgic_v3_map_resources(struct kvm *kvm)
        }
 
        if (IS_VGIC_ADDR_UNDEF(dist->vgic_dist_base)) {
-               kvm_err("Need to set vgic distributor addresses first\n");
+               kvm_debug("Need to set vgic distributor addresses first\n");
                return -ENXIO;
        }
 
        if (!vgic_v3_check_base(kvm)) {
-               kvm_err("VGIC redist and dist frames overlap\n");
+               kvm_debug("VGIC redist and dist frames overlap\n");
                return -EINVAL;
        }