Skip to content

Commit 7660042

Browse files
Ard BiesheuvelMarc Zyngier
authored andcommitted
KVM: arm/arm64: Reduce verbosity of KVM init log
On my GICv3 system, the following is printed to the kernel log at boot: kvm [1]: 8-bit VMID kvm [1]: IDMAP page: d20e35000 kvm [1]: HYP VA range: 800000000000:ffffffffffff kvm [1]: vgic-v2@2c020000 kvm [1]: GIC system register CPU interface enabled kvm [1]: vgic interrupt IRQ1 kvm [1]: virtual timer IRQ4 kvm [1]: Hyp mode initialized successfully The KVM IDMAP is a mapping of a statically allocated kernel structure, and so printing its physical address leaks the physical placement of the kernel when physical KASLR in effect. So change the kvm_info() to kvm_debug() to remove it from the log output. While at it, trim the output a bit more: IRQ numbers can be found in /proc/interrupts, and the HYP VA and vgic-v2 lines are not highly informational either. Cc: <[email protected]> Acked-by: Will Deacon <[email protected]> Acked-by: Christoffer Dall <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Marc Zyngier <[email protected]>
1 parent 413aa80 commit 7660042

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

virt/kvm/arm/arch_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ int kvm_timer_hyp_init(bool has_gic)
771771
static_branch_enable(&has_gic_active_state);
772772
}
773773

774-
kvm_info("virtual timer IRQ%d\n", host_vtimer_irq);
774+
kvm_debug("virtual timer IRQ%d\n", host_vtimer_irq);
775775

776776
cpuhp_setup_state(CPUHP_AP_KVM_ARM_TIMER_STARTING,
777777
"kvm/arm/timer:starting", kvm_timer_starting_cpu,

virt/kvm/arm/mmu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,9 +1810,9 @@ int kvm_mmu_init(void)
18101810
*/
18111811
BUG_ON((hyp_idmap_start ^ (hyp_idmap_end - 1)) & PAGE_MASK);
18121812

1813-
kvm_info("IDMAP page: %lx\n", hyp_idmap_start);
1814-
kvm_info("HYP VA range: %lx:%lx\n",
1815-
kern_hyp_va(PAGE_OFFSET), kern_hyp_va(~0UL));
1813+
kvm_debug("IDMAP page: %lx\n", hyp_idmap_start);
1814+
kvm_debug("HYP VA range: %lx:%lx\n",
1815+
kern_hyp_va(PAGE_OFFSET), kern_hyp_va(~0UL));
18161816

18171817
if (hyp_idmap_start >= kern_hyp_va(PAGE_OFFSET) &&
18181818
hyp_idmap_start < kern_hyp_va(~0UL) &&

virt/kvm/arm/vgic/vgic-v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ int vgic_v2_probe(const struct gic_kvm_info *info)
410410
kvm_vgic_global_state.type = VGIC_V2;
411411
kvm_vgic_global_state.max_gic_vcpus = VGIC_V2_MAX_CPUS;
412412

413-
kvm_info("vgic-v2@%llx\n", info->vctrl.start);
413+
kvm_debug("vgic-v2@%llx\n", info->vctrl.start);
414414

415415
return 0;
416416
out:

0 commit comments

Comments
 (0)