From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 4F0D7C282E1 for ; Thu, 23 May 2019 10:35:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0440F217D4 for ; Thu, 23 May 2019 10:35:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iPf+CBbe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0440F217D4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=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=5ptdHbo43XTTUj5n/juLGcz4ujI+/E5eWxfEwcAOUJ0=; b=iPf +CBbec5HJPPpWAHVdGoM0lkd2BaUeAAAud5IZUG7LaCQmE3Hu673/fF4r2WVY18Ezb2rRdE1tzf2j rV8ksjfZvuZxOiXJow2iD22zj7rN625FwYPhq39MPpFYX9a3L6M87RL58JaxPHFJ+3s0n4RL5CUyw MCNinUK2LWuFRfNg7Jc8cLInxcmhN3hOrz9ROFPaJTabkIR+chgSbyPtewuXs10DhFUV4yfllQDc6 zhX/AjEaQBTfC4n8IUwbfrvf2D/hd6FBAu4hD5itLZV394seE+T3rZALoORqr/7Uoo8hPtFGH/2wH MerdOa20fhNcJ4iQa5Lvv4rmkegamVQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTl4G-0000OR-4s; Thu, 23 May 2019 10:35:24 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTl4D-0000Nm-8l for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2019 10:35:22 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E3737341; Thu, 23 May 2019 03:35:20 -0700 (PDT) Received: from usa.arm.com (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CECA73F718; Thu, 23 May 2019 03:35:18 -0700 (PDT) From: Sudeep Holla To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH 00/15] arm64: KVM: add SPE profiling support for guest Date: Thu, 23 May 2019 11:34:47 +0100 Message-Id: <20190523103502.25925-1-sudeep.holla@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-20190523_033521_311136_8F6D9FB2 X-CRM114-Status: GOOD ( 12.35 ) 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: kvm@vger.kernel.org, Suzuki K Pouloze , Marc Zyngier , Catalin Marinas , Julien Thierry , Will Deacon , Christoffer Dall , linux-kernel@vger.kernel.org, James Morse , Sudeep Holla 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+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, This series implements support for allowing KVM guests to use the Arm Statistical Profiling Extension (SPE). The patches are also available on a branch[1]. The last two extra patches are for the kvmtool if someone wants to play with it. Regards, Sudeep v1->v2: - Rebased on v5.2-rc1 - Adjusted sysreg_elx_s macros with merged clang build support [1] git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git kvm_spe Sudeep Holla (15): KVM: arm64: add {read,write}_sysreg_elx_s versions for new registers dt-bindings: ARM SPE: highlight the need for PPI partitions on heterogeneous systems arm64: KVM: reset E2PB correctly in MDCR_EL2 when exiting the guest(VHE) arm64: KVM: define SPE data structure for each vcpu arm64: KVM: add access handler for SPE system registers arm64: KVM/VHE: enable the use PMSCR_EL12 on VHE systems arm64: KVM: split debug save restore across vm/traps activation arm64: KVM/debug: drop pmscr_el1 and use sys_regs[PMSCR_EL1] in kvm_cpu_context arm64: KVM: add support to save/restore SPE profiling buffer controls arm64: KVM: enable conditional save/restore full SPE profiling buffer controls arm64: KVM/debug: trap all accesses to SPE controls at EL1 KVM: arm64: add a new vcpu device control group for SPEv1 KVM: arm64: enable SPE support KVMTOOL: update_headers: Sync kvm UAPI headers with linux v5.2-rc1 KVMTOOL: kvm: add a vcpu feature for SPEv1 support .../devicetree/bindings/arm/spe-pmu.txt | 5 +- Documentation/virtual/kvm/devices/vcpu.txt | 28 +++ arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts | 185 +++++++++++------- arch/arm64/configs/defconfig | 6 + arch/arm64/include/asm/kvm_host.h | 19 +- arch/arm64/include/asm/kvm_hyp.h | 26 ++- arch/arm64/include/uapi/asm/kvm.h | 4 + arch/arm64/kvm/Kconfig | 7 + arch/arm64/kvm/Makefile | 1 + arch/arm64/kvm/guest.c | 9 + arch/arm64/kvm/hyp/debug-sr.c | 98 +++++++--- arch/arm64/kvm/hyp/switch.c | 18 +- arch/arm64/kvm/reset.c | 3 + arch/arm64/kvm/sys_regs.c | 35 ++++ include/kvm/arm_spe.h | 71 +++++++ include/uapi/linux/kvm.h | 1 + virt/kvm/arm/arm.c | 5 + virt/kvm/arm/spe.c | 163 +++++++++++++++ 18 files changed, 570 insertions(+), 114 deletions(-) create mode 100644 include/kvm/arm_spe.h create mode 100644 virt/kvm/arm/spe.c -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel