Path: blob/main/hypervisor/src/whpx/whpx_sys/hyperv_tlfs.rs
5394 views
// Copyright 2022 The ChromiumOS Authors1// Use of this source code is governed by a BSD-style license that can be2// found in the LICENSE file.34/// Constants from Hyper-V Top Level Functional Specification.5/// This comes from the document published here:6/// <https://github.com/MicrosoftDocs/Virtualization-Documentation/raw/live/tlfs/Hypervisor%20Top%20Level%20Functional%20Specification%20v6.0b.pdf>78/// CPUID Leaf Range Register.9pub const HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS: u32 = 0x40000000;10/// Start of CPUID information for Hyper-V.11pub const HYPERV_CPUID_MIN: u32 = 0x40000005;12/// Hypervisor Feature Identification Register.13pub const HYPERV_CPUID_FEATURES: u32 = 0x40000003;1415/// Feature for Frequency MSR availability.16pub const HV_FEATURE_FREQUENCY_MSRS_AVAILABLE: u32 = 1 << 8;1718/// Group A features.1920/// Privilege bit for partition reference TSC register.21pub const HV_MSR_REFERENCE_TSC_AVAILABLE: u32 = 1 << 9;22/// Privilege bit showing Partition Local APIC and TSC frequency registers availability.23pub const HV_ACCESS_FREQUENCY_MSRS: u32 = 1 << 11;24/// Privilege bit for AccessTscInvariantControls.25pub const HV_ACCESS_TSC_INVARIANT: u32 = 1 << 15;2627/// MSR definitions.28pub const HV_X64_MSR_TSC_INVARIANT_CONTROL: u32 = 0x40000118;29pub const HV_X64_MSR_APIC_FREQUENCY: u32 = 0x40000023;30pub const HV_X64_MSR_TSC_FREQUENCY: u32 = 0x40000022;313233