Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54D07C433B4 for ; Tue, 20 Apr 2021 13:11:03 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E4CCF61073 for ; Tue, 20 Apr 2021 13:11:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E4CCF61073 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc: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=5Q22IWlI+4hxbjiud8tfOV27w6vsNNkbicSLa6IK1P4=; b=fgEeMhztPCjpt7+U0mMaaxhQqM Jw86CfWfbbCNEDK8ZsB4ox/PgM1YUJm4aRG38zwrVAdkTDTVhTMH31WaWkIB+ZfMe2i/eenZK0U2V BgttW1KBdW6KKAgSRn8epGPSGxgC6CysenXdHhbQIftfcP71jCZQ/v7tw8N5QvQkWF99Gw7ZUmY+K x4IGzFttfteM03lnUkAn7SGB1rO44tgG9mSCo/POC5XSZnhXl2Om8w7mpNB3Lxvn5+y5qdvf+4lBM dpUmXlkno2M1bfnGIatKxrVGXTz3TbQB2RCRGvU2KXBwyucqbZIqZrRJZrzukQQR4FwgRnbDveFkc wITBI7ig==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYq7V-00CA5v-0y; Tue, 20 Apr 2021 13:08:49 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYq7S-00CA5R-Ic for linux-arm-kernel@desiato.infradead.org; Tue, 20 Apr 2021 13:08:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=5ywCZ+Cw7SnhcxbMJooadiQ0atxpHBhtET5EYxAa2M8=; b=TwMguoT99coBlu49sxh/iNPhwK U153ovwacYXRoKxkfpYjLtobfJLmcQ4XiXDY0ys2gYvOkfeP5PpsAxBsOu7FrUy9/dJdAWk7ZXsVm qTsoZ8/T+Ca+QqMoMker4wbfZvkOkam5FwkJQ0aaqLeupy+GHK4VbojNY+SqsgtQzsjFDYgES3UP1 TM7H7sSuyj3mB6i51acoYg4GWfausSoTpc9YiJtItNSvIBgxbe4Cve61TM64892ZR+BloMbcgmB7C jGydCDblBa26RkxSoCVBkD2Q7bn8iAs/iBTiIB/7FPUYSc5IikT0GwPqx64ETPWmHkL8d7GCcjG9o a2xLYCHA==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYq7P-00C7sp-GF for linux-arm-kernel@lists.infradead.org; Tue, 20 Apr 2021 13:08:45 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A794B1478; Tue, 20 Apr 2021 06:08:40 -0700 (PDT) Received: from yoan-MS-7758.Home (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4CEFA3F792; Tue, 20 Apr 2021 06:08:39 -0700 (PDT) From: Yoan Picchi To: maz@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: catalin.marinas@arm.com, will@kernel.org, Yoan Picchi Subject: [PATCH v2 0/3] KVM: arm64: add more event counters for kvm_stat Date: Tue, 20 Apr 2021 14:08:22 +0100 Message-Id: <20210420130825.15585-1-yoan.picchi@arm.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210420_060843_623554_780E8840 X-CRM114-Status: UNSURE ( 8.72 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi all, Considering the feedback on my first version https://lore.kernel.org/linux-arm-kernel/20210319161711.24972-1-yoan.picchi@arm.com/ I started from scratch and focussed only on stage 2 page fault. For the context, as mentioned in the KVM forum talk from 2019 (https://kvmforum2019.sched.com/event/Tmwf/kvmstat-and-beyond-past-present-and-future-of-performance-monitoring-christian-borntrager-ibm page 10), there are few event counters for kvm_stat in the arm64 version of kvm when you compare it to something like the x86 version. Those counters are used in kvm_stat by kernel/driver developers to have a rough idea of the impact of their patches on the general performance. In this patchset I introduce 3 counters to use in kvm stat. They aim to help a kernel/driver dev troubleshot performance issues by letting them know how much exits comes from stage 2 table faults, and thus, see if their changes added a lot. Between the existing mmio_user_exit and the added page_mapped, the main reasons for a stage 2 page fault should be covered and thus give some finer granularity when looking for the source of exits. Yoan Picchi (3): KVM: arm64: Add a stage2 page fault counter for kvm_stat KVM: arm64: Add two page mapping counters for kvm_stat KVM: arm64: Add irq_exit counter for kvm_stat arch/arm64/include/asm/kvm_host.h | 4 ++++ arch/arm64/kvm/guest.c | 4 ++++ arch/arm64/kvm/handle_exit.c | 1 + arch/arm64/kvm/hyp/pgtable.c | 5 +++++ arch/arm64/kvm/mmu.c | 2 ++ 5 files changed, 16 insertions(+) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel