Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3618991pxb; Mon, 1 Nov 2021 17:27:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRqq8WjrbmKcKHBG0heCEVqsnZrRF4g8JC7lj4wLUele30DC0bSgm/CFvKYhC4zZona7jM X-Received: by 2002:a50:ab44:: with SMTP id t4mr36570825edc.105.1635812832695; Mon, 01 Nov 2021 17:27:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635812832; cv=none; d=google.com; s=arc-20160816; b=OCfiyVoqiMMVh0QB5ozXEdGrkEpnDb9enQpjo8g5RyWzPRft/44VNTZNHwtqIpfcuo c9ADfmXLuFHusu4UE494iZmnKM7em7hFbvwj+uexXEOzPNnnvYu+URt1n+pSpAwCP+tj fQmn2cemsmhmYKSYNvi0FjvPMNYEFSmGeVuCn3Cc2SOowl/e8Zo4d1CB4LNG1yu3E47+ z0pHYXcL75Z8iyZIyoGgp2zgu94U24Ja0f2f4BAU7sU3Wf2M6c+AHiiFxhOURTt/+rem 65LJuTiYOGGVn/HdHpzyp8tEg+M7y1x6NO+1PYRRBpn6WIFj/y+whthPFjs6UkN7lk18 zHVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=q8+WFsVbgm29AAf/AGwas77W0K8xwgbmPl1Tstb7QWc=; b=gBzaAprt8aRPsTpW1Q9Cf46FK30sMyC71ICAwCbDKSB/nUirjGBJAort4GBbV9NgIp 9/sqHOhFcI8PnAI4rliCNMjysyEwXQTrboTPIjHZ5AQMzxhVqXF2tJEaSHKOIsFP2ZkP lVyyb8fv7GhUZqVVzzNG9xHo8lGVX/Hnz/jOeCx0gqGGyQK5R0kCmfi57KKZpOtbVt32 2jTQdUPbRCONQcwcmxR3meK17nf0esG2AJ+qxYW7otuQWKrTfDgb6466PGgn37diOIqp VTqVmO3ke0FxMCh7gy94NRpF4om1mjEBzMy0YOjvrCRRIg6bKIj+pk6nDyJr5+I5FF/G KSjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=b7OJ80GP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x13si21537223edi.550.2021.11.01.17.26.48; Mon, 01 Nov 2021 17:27:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=b7OJ80GP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232549AbhKBAZf (ORCPT + 99 others); Mon, 1 Nov 2021 20:25:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232167AbhKBAZS (ORCPT ); Mon, 1 Nov 2021 20:25:18 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43D42C061766 for ; Mon, 1 Nov 2021 17:22:37 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id v18-20020a170902e8d200b00141df2da949so1899183plg.10 for ; Mon, 01 Nov 2021 17:22:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=q8+WFsVbgm29AAf/AGwas77W0K8xwgbmPl1Tstb7QWc=; b=b7OJ80GPH2oQgQ9tb2V+6/eW0GWKJVLr1PWxB8v4wFAwbzrU4pUgP2cI0Riz7azO5G Z+6rcFj7+griGUkir/2Gug4bGdUYN2p9f39RS0Ie9f5uSe6HaSA/mFLmkPgf2GQpbG0d 5Uj2XEj05Mj2qzm0yYL9Dk4pz0EAn5W63XS6fNeOr6NTWCR/dHkpIRmXhIJtQkan6y6X /fqFwxj9iuYkiqbKxdWhd3ZvXyHvUTgQJa4OqwCSyt0QI4PWOnfljN5xnAgMSEk27aTJ kZ/8kU5lGgkp1PHOP2Rmza2Vvq/QL7beU+QmLk/l2Gi6o3hXyrVojRzFmnd0YUwtPd1I W03Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=q8+WFsVbgm29AAf/AGwas77W0K8xwgbmPl1Tstb7QWc=; b=vMaKwQec23eLR6/2S8gXcQ5CS91Hg4rkVEhlqWJKkefv14uFBaBVWxFmIvZBix4ziu noIKkQK8q6gTHbPIQElnU7qFVqgDTq1rGyCFgbzs6BPFlEOqnnuxn30WNs8XQxo23APC y2ObRJMpJbqE2lqzAKmKbgOZWCuhgtPgdokniNy8OKybx3zs4cvkMVU9b4qzRYJNrLkw bIk6aL9T2+cGVx+WF2E5dTZQZ//DCfRB8C+Hdo54vx+MEr74k/YpS1YqeZTG85qrEwPK xO3RvJwYMZeT0bcIrUrqX3BIseVoxsYY+Yscb7zvBtcbGP7qbFF3HeuBGq9tlv9Mt9uh R8SQ== X-Gm-Message-State: AOAM53236+KDVS/qjoDUCtGtMc++O4DaWlrnMu0FBtH0mBB+Sj3MITuR gqouSt4+pMhYK4+RpELMWiA0hQQz5V30 X-Received: from rananta-virt.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:1bcc]) (user=rananta job=sendgmr) by 2002:a17:90a:4a82:: with SMTP id f2mr2615207pjh.236.1635812556766; Mon, 01 Nov 2021 17:22:36 -0700 (PDT) Date: Tue, 2 Nov 2021 00:22:01 +0000 In-Reply-To: <20211102002203.1046069-1-rananta@google.com> Message-Id: <20211102002203.1046069-7-rananta@google.com> Mime-Version: 1.0 References: <20211102002203.1046069-1-rananta@google.com> X-Mailer: git-send-email 2.33.1.1089.g2158813163f-goog Subject: [RFC PATCH 6/8] tools: Import the firmware registers From: Raghavendra Rao Ananta To: Marc Zyngier , Andrew Jones , James Morse , Alexandru Elisei , Suzuki K Poulose Cc: Catalin Marinas , Will Deacon , Peter Shier , Ricardo Koller , Oliver Upton , Reiji Watanabe , Jing Zhang , Raghavendra Rao Anata , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Import the firmware definitions for the firmware registers, KVM_REG_ARM_STD, KVM_REG_ARM_STD_HYP, and KVM_REG_ARM_VENDOR_HYP. Signed-off-by: Raghavendra Rao Ananta --- tools/arch/arm64/include/uapi/asm/kvm.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/arch/arm64/include/uapi/asm/kvm.h b/tools/arch/arm64/include/uapi/asm/kvm.h index b3edde68bc3e..a1d0e8e69eed 100644 --- a/tools/arch/arm64/include/uapi/asm/kvm.h +++ b/tools/arch/arm64/include/uapi/asm/kvm.h @@ -281,6 +281,24 @@ struct kvm_arm_copy_mte_tags { #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_REQUIRED 3 #define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_ENABLED (1U << 4) +#define KVM_REG_ARM_STD KVM_REG_ARM_FW_REG(3) +enum kvm_reg_arm_std_bmap { + KVM_REG_ARM_STD_TRNG_V1_0, + KVM_REG_ARM_STD_BMAP_MAX, +}; + +#define KVM_REG_ARM_STD_HYP KVM_REG_ARM_FW_REG(4) +enum kvm_reg_arm_std_hyp_bmap { + KVM_REG_ARM_STD_HYP_PV_TIME_ST, + KVM_REG_ARM_STD_HYP_BMAP_MAX, +}; + +#define KVM_REG_ARM_VENDOR_HYP KVM_REG_ARM_FW_REG(5) +enum kvm_reg_arm_vendor_hyp_bmap { + KVM_REG_ARM_VENDOR_HYP_PTP, + KVM_REG_ARM_VENDOR_HYP_BMAP_MAX, +}; + /* SVE registers */ #define KVM_REG_ARM64_SVE (0x15 << KVM_REG_ARM_COPROC_SHIFT) -- 2.33.1.1089.g2158813163f-goog