aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAnirudh Rayabharam <anrayabh@linux.microsoft.com>2022-10-27 15:27:28 +0530
committerWei Liu <wei.liu@kernel.org>2022-11-03 15:50:28 +0000
commit4ad1aa571214e8d6468a1806794d987b374b5a08 (patch)
tree8a6fd76aca1877a23b8f9713f6b282862e380ac0 /include
parentDrivers: hv: fix repeated words in comments (diff)
downloadlinux-dev-4ad1aa571214e8d6468a1806794d987b374b5a08.tar.xz
linux-dev-4ad1aa571214e8d6468a1806794d987b374b5a08.zip
clocksource/drivers/hyperv: add data structure for reference TSC MSR
Add a data structure to represent the reference TSC MSR similar to other MSRs. This simplifies the code for updating the MSR. Signed-off-by: Anirudh Rayabharam <anrayabh@linux.microsoft.com> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/20221027095729.1676394-2-anrayabh@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/hyperv-tlfs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-generic/hyperv-tlfs.h b/include/asm-generic/hyperv-tlfs.h
index fdce7a4cfc6f..b17c6eeb9afa 100644
--- a/include/asm-generic/hyperv-tlfs.h
+++ b/include/asm-generic/hyperv-tlfs.h
@@ -102,6 +102,15 @@ struct ms_hyperv_tsc_page {
volatile s64 tsc_offset;
} __packed;
+union hv_reference_tsc_msr {
+ u64 as_uint64;
+ struct {
+ u64 enable:1;
+ u64 reserved:11;
+ u64 pfn:52;
+ } __packed;
+};
+
/*
* The guest OS needs to register the guest ID with the hypervisor.
* The guest ID is a 64 bit entity and the structure of this ID is