Skip to content

Commit f726c46

Browse files
yisun-gitKAGA-KOKO
authored andcommitted
x86/hyperv: Add GUEST_IDLE_MSR support
Hyper-V may expose a HV_X64_MSR_GUEST_IDLE MSR via HYPERV_CPUID_FEATURES. Reading this MSR triggers the host to transition the guest vCPU into an idle state. This state can be exited via an IPI even if the read in the guest happened from an interrupt disabled section. Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Cc: chao.p.peng@intel.com Cc: chao.gao@intel.com Cc: isaku.yamahata@intel.com Cc: tianyu.lan@microsoft.com Cc: "K. Y. Srinivasan" <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Stephen Hemminger <sthemmin@microsoft.com> Link: https://lkml.kernel.org/r/1538028104-114050-2-git-send-email-yi.y.sun@linux.intel.com
1 parent 3637897 commit f726c46

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/x86/include/asm/hyperv-tlfs.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
#define HV_MSR_TIME_REF_COUNT_AVAILABLE (1 << 1)
3939
/* Partition reference TSC MSR is available */
4040
#define HV_MSR_REFERENCE_TSC_AVAILABLE (1 << 9)
41+
/* Partition Guest IDLE MSR is available */
42+
#define HV_X64_MSR_GUEST_IDLE_AVAILABLE (1 << 10)
4143

4244
/* A partition's reference time stamp counter (TSC) page */
4345
#define HV_X64_MSR_REFERENCE_TSC 0x40000021
@@ -246,6 +248,9 @@
246248
#define HV_X64_MSR_STIMER3_CONFIG 0x400000B6
247249
#define HV_X64_MSR_STIMER3_COUNT 0x400000B7
248250

251+
/* Hyper-V guest idle MSR */
252+
#define HV_X64_MSR_GUEST_IDLE 0x400000F0
253+
249254
/* Hyper-V guest crash notification MSR's */
250255
#define HV_X64_MSR_CRASH_P0 0x40000100
251256
#define HV_X64_MSR_CRASH_P1 0x40000101

0 commit comments

Comments
 (0)