From patchwork Fri Mar 2 08:16:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 10253603 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3789B6037D for ; Fri, 2 Mar 2018 08:17:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2059528895 for ; Fri, 2 Mar 2018 08:17:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14BA9288C6; Fri, 2 Mar 2018 08:17:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1CF5D28895 for ; Fri, 2 Mar 2018 08:17:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=bhUrGRXwVBSmwx4zVy772k1UXEuP324WU4JxpzCmo30=; b=D0N gx9Br+jevKw90es23wkzfPqdyaO6J+RUhtcPBTzodOQ+VNWyT1OoncMDkgbHkVjQtZjiJ64V61CRG Sja8bUrrlpigKzp5FpiI8U+ptjgOWJ2tIjtse3XimZTISNGBZttx9Jy6NJPJXDJnrZM062wij44hX NhpGwxBR7qnjR0WNsJgeNoQQnApMrB09p26kOjGWtFYhZT4cX14CI/zIr7Y8YlqIXFkCMnowgdUgS YbsWiwf7I0CToFL+tsxLxVX5KiO0PeJ+EUQUtBVbgTz8alBwxu/u2xAKOWMJm++FB99mTYePWcomC X3c5U8T4g8yJSJ4/fIa3WI1bcWZpe3A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1erfsA-0006z8-Cx; Fri, 02 Mar 2018 08:16:58 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1erfs6-0006ra-Ly for linux-arm-kernel@lists.infradead.org; Fri, 02 Mar 2018 08:16:56 +0000 Received: by mail-wm0-x242.google.com with SMTP id w128so1516715wmw.0 for ; Fri, 02 Mar 2018 00:16:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=5OMOKpLADK1zIkAJ4OwPjEhAZLAiHjvqJwJq2JEk7RM=; b=dEzfSCNoeLmY0kREE1OdSXTAHofL5hMPjKNzg/AFXZMQtCwwegFeZXubi3JApTE2t5 pBFTrsEtw84vTvGHViSHnRtLHaG9lZLYYfGKZ8UslL4eT01USQmIo3TGVUkBnEgwy95B ZBTJJ22xjXNE+8qGZhFPaASrb8h83y05JLHN4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5OMOKpLADK1zIkAJ4OwPjEhAZLAiHjvqJwJq2JEk7RM=; b=mBoE5ZCBC5wlxtlsKVL31RIBfOdF+2KgLhaQN7pddBFSMlpVGpVkr4lzp/WT7Arm40 GjgoH0hFaafWSpiD6FkRRYyOOqdAHUOm2NSsNWCTlOa6isRSmxZPnN9glYsoac5AGiGA m6WM9sFqqmrwv7gtjwGeu1IEdiBqmVM9X8q2CR0Hr6Lma2BYKMrOFGTKHg5sMlQCdAHG Rr1AZW+9LX/vv1xEKc9JK4u2wGv7cTRUe+dkGtR+3YHmWGKMhbWyEuUflnAEN3OEAny4 vSDagDIOi4jq/E1xMFnkvoa/q6GXdFq96+EOONNKWOgTlXLIVt96RwYjMpTQ4EodYUj8 0QUQ== X-Gm-Message-State: AElRT7EUV1dAUC3SDoEYK3xW+nPwMNY53khVVGI5PKpbTH1pZprGERaI Cm7zzPvJZs/fNPFQmYts8FeLAaYhcEE= X-Google-Smtp-Source: AG47ELtjix/D3fsZFbEtsBZILpmaSCr1GeWYbokp3n8zzkn5p1En3YVGZkPrUYSOLw0iG3wIH3vApg== X-Received: by 10.28.84.19 with SMTP id i19mr740213wmb.7.1519978602262; Fri, 02 Mar 2018 00:16:42 -0800 (PST) Received: from localhost.localdomain ([196.71.216.221]) by smtp.gmail.com with ESMTPSA id r98sm14368271wrb.70.2018.03.02.00.16.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Mar 2018 00:16:41 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] KVM: arm/arm64: reduce verbosity of KVM init log Date: Fri, 2 Mar 2018 08:16:30 +0000 Message-Id: <20180302081630.6385-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180302_001654_862764_B16BD6C4 X-CRM114-Status: GOOD ( 12.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marc.zyngier@arm.com, cdall@kernel.org, Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Acked-by: Christoffer Dall --- virt/kvm/arm/arch_timer.c | 2 +- virt/kvm/arm/mmu.c | 6 +++--- virt/kvm/arm/vgic/vgic-init.c | 2 +- virt/kvm/arm/vgic/vgic-v2.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c index 70268c0bec79..0bf76ab1ec0b 100644 --- a/virt/kvm/arm/arch_timer.c +++ b/virt/kvm/arm/arch_timer.c @@ -755,7 +755,7 @@ int kvm_timer_hyp_init(bool has_gic) } } - kvm_info("virtual timer IRQ%d\n", host_vtimer_irq); + kvm_debug("virtual timer IRQ%d\n", host_vtimer_irq); cpuhp_setup_state(CPUHP_AP_KVM_ARM_TIMER_STARTING, "kvm/arm/timer:starting", kvm_timer_starting_cpu, diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c index ec62d1cccab7..b960acdd0c05 100644 --- a/virt/kvm/arm/mmu.c +++ b/virt/kvm/arm/mmu.c @@ -1810,9 +1810,9 @@ int kvm_mmu_init(void) */ BUG_ON((hyp_idmap_start ^ (hyp_idmap_end - 1)) & PAGE_MASK); - kvm_info("IDMAP page: %lx\n", hyp_idmap_start); - kvm_info("HYP VA range: %lx:%lx\n", - kern_hyp_va(PAGE_OFFSET), kern_hyp_va(~0UL)); + kvm_debug("IDMAP page: %lx\n", hyp_idmap_start); + kvm_debug("HYP VA range: %lx:%lx\n", + kern_hyp_va(PAGE_OFFSET), kern_hyp_va(~0UL)); if (hyp_idmap_start >= kern_hyp_va(PAGE_OFFSET) && hyp_idmap_start < kern_hyp_va(~0UL) && diff --git a/virt/kvm/arm/vgic/vgic-init.c b/virt/kvm/arm/vgic/vgic-init.c index 743ca5cb05ef..f99ff0f33ef0 100644 --- a/virt/kvm/arm/vgic/vgic-init.c +++ b/virt/kvm/arm/vgic/vgic-init.c @@ -520,7 +520,7 @@ int kvm_vgic_hyp_init(void) goto out_free_irq; } - kvm_info("vgic interrupt IRQ%d\n", kvm_vgic_global_state.maint_irq); + kvm_debug("vgic interrupt IRQ%d\n", kvm_vgic_global_state.maint_irq); return 0; out_free_irq: diff --git a/virt/kvm/arm/vgic/vgic-v2.c b/virt/kvm/arm/vgic/vgic-v2.c index c32d7b93ffd1..e9d840a75e7b 100644 --- a/virt/kvm/arm/vgic/vgic-v2.c +++ b/virt/kvm/arm/vgic/vgic-v2.c @@ -410,7 +410,7 @@ int vgic_v2_probe(const struct gic_kvm_info *info) kvm_vgic_global_state.type = VGIC_V2; kvm_vgic_global_state.max_gic_vcpus = VGIC_V2_MAX_CPUS; - kvm_info("vgic-v2@%llx\n", info->vctrl.start); + kvm_debug("vgic-v2@%llx\n", info->vctrl.start); return 0; out: