Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / arch / arm64 / include / asm / hyperv-tlfs.h
blobbc30aadedfe9d223fea7675f32f410f7ba7b1c2e
1 /* SPDX-License-Identifier: GPL-2.0 */
3 /*
4 * This file contains definitions from the Hyper-V Hypervisor Top-Level
5 * Functional Specification (TLFS):
6 * https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs
8 * Copyright (C) 2021, Microsoft, Inc.
10 * Author : Michael Kelley <mikelley@microsoft.com>
13 #ifndef _ASM_HYPERV_TLFS_H
14 #define _ASM_HYPERV_TLFS_H
16 #include <linux/types.h>
19 * All data structures defined in the TLFS that are shared between Hyper-V
20 * and a guest VM use Little Endian byte ordering. This matches the default
21 * byte ordering of Linux running on ARM64, so no special handling is required.
25 * Group C Features. See the asm-generic version of hyperv-tlfs.h
26 * for a description of Feature Groups.
29 /* Crash MSRs available */
30 #define HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE BIT(8)
32 /* STIMER direct mode is available */
33 #define HV_STIMER_DIRECT_MODE_AVAILABLE BIT(13)
36 * To support arch-generic code calling hv_set/get_register:
37 * - On x86, HV_MSR_ indicates an MSR accessed via rdmsrl/wrmsrl
38 * - On ARM, HV_MSR_ indicates a VP register accessed via hypercall
40 #define HV_MSR_CRASH_P0 (HV_REGISTER_GUEST_CRASH_P0)
41 #define HV_MSR_CRASH_P1 (HV_REGISTER_GUEST_CRASH_P1)
42 #define HV_MSR_CRASH_P2 (HV_REGISTER_GUEST_CRASH_P2)
43 #define HV_MSR_CRASH_P3 (HV_REGISTER_GUEST_CRASH_P3)
44 #define HV_MSR_CRASH_P4 (HV_REGISTER_GUEST_CRASH_P4)
45 #define HV_MSR_CRASH_CTL (HV_REGISTER_GUEST_CRASH_CTL)
47 #define HV_MSR_VP_INDEX (HV_REGISTER_VP_INDEX)
48 #define HV_MSR_TIME_REF_COUNT (HV_REGISTER_TIME_REF_COUNT)
49 #define HV_MSR_REFERENCE_TSC (HV_REGISTER_REFERENCE_TSC)
51 #define HV_MSR_SINT0 (HV_REGISTER_SINT0)
52 #define HV_MSR_SCONTROL (HV_REGISTER_SCONTROL)
53 #define HV_MSR_SIEFP (HV_REGISTER_SIEFP)
54 #define HV_MSR_SIMP (HV_REGISTER_SIMP)
55 #define HV_MSR_EOM (HV_REGISTER_EOM)
57 #define HV_MSR_STIMER0_CONFIG (HV_REGISTER_STIMER0_CONFIG)
58 #define HV_MSR_STIMER0_COUNT (HV_REGISTER_STIMER0_COUNT)
60 union hv_msi_entry {
61 u64 as_uint64[2];
62 struct {
63 u64 address;
64 u32 data;
65 u32 reserved;
66 } __packed;
69 #include <asm-generic/hyperv-tlfs.h>
71 #endif