From patchwork Wed Oct 6 10:58:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Orzel X-Patchwork-Id: 12539089 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59A2DC4332F for ; Wed, 6 Oct 2021 10:59:05 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 1EFD961248 for ; Wed, 6 Oct 2021 10:59:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1EFD961248 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.202753.357756 (Exim 4.92) (envelope-from ) id 1mY4dJ-0003L7-Kl; Wed, 06 Oct 2021 10:58:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 202753.357756; Wed, 06 Oct 2021 10:58:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mY4dJ-0003L0-Hj; Wed, 06 Oct 2021 10:58:45 +0000 Received: by outflank-mailman (input) for mailman id 202753; Wed, 06 Oct 2021 10:58:44 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mY4dI-0003Ku-Bx for xen-devel@lists.xenproject.org; Wed, 06 Oct 2021 10:58:44 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 3f3c6a55-0ed7-44e9-921c-64f920a0d4f1; Wed, 06 Oct 2021 10:58:42 +0000 (UTC) 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 7F4161FB; Wed, 6 Oct 2021 03:58:42 -0700 (PDT) Received: from e123311-lin.arm.com (unknown [10.57.19.94]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F16243F70D; Wed, 6 Oct 2021 03:58:38 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3f3c6a55-0ed7-44e9-921c-64f920a0d4f1 From: Michal Orzel To: xen-devel@lists.xenproject.org Cc: George Dunlap , Nick Rosbrook , Ian Jackson , Wei Liu , Andrew Cooper , Jan Beulich , Julien Grall , Stefano Stabellini , Anthony PERARD , Juergen Gross , Christian Lindig , David Scott , Volodymyr Babchuk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , bertrand.marquis@arm.com Subject: [PATCH v2 0/3] Expose PMU to the guests Date: Wed, 6 Oct 2021 12:58:24 +0200 Message-Id: <20211006105827.15217-1-michal.orzel@arm.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 This patch series is a rework of an already pushed patch exposing PMU to the guests. In the second version the vpmu parameter is common and prework in the form of reporting availability of vPMU on the hardware is added. The current status is that the PMU registers are not virtualized and the physical registers are directly accessible when "vpmu" parameter is enabled in the guest config file. There is no interrupt support and Xen will not save/restore the register values on context switches. This is to be done in the future. Michal Orzel (3): xen+tools: Introduce XEN_SYSCTL_PHYSCAP_vpmu xen/arm: Check for PMU platform support xen: Expose the PMU to the guests docs/man/xl.cfg.5.pod.in | 17 ++++++++++ tools/golang/xenlight/helpers.gen.go | 8 +++++ tools/golang/xenlight/types.gen.go | 2 ++ tools/include/libxl.h | 12 +++++++ tools/libs/light/libxl.c | 1 + tools/libs/light/libxl_create.c | 4 +++ tools/libs/light/libxl_types.idl | 3 ++ tools/ocaml/libs/xc/xenctrl.ml | 2 ++ tools/ocaml/libs/xc/xenctrl.mli | 2 ++ tools/xl/xl_info.c | 5 +-- tools/xl/xl_parse.c | 2 ++ xen/arch/arm/domain.c | 10 ++++-- xen/arch/arm/setup.c | 1 + xen/arch/x86/domain.c | 6 ++++ xen/common/domain.c | 11 ++++++- xen/common/sysctl.c | 3 ++ xen/include/asm-arm/cpufeature.h | 49 ++++++++++++++++++++++++++-- xen/include/asm-arm/domain.h | 1 + xen/include/public/domctl.h | 5 ++- xen/include/public/sysctl.h | 8 +++-- xen/include/xen/domain.h | 2 ++ 21 files changed, 144 insertions(+), 10 deletions(-)