Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1635587imm; Wed, 26 Sep 2018 23:27:01 -0700 (PDT) X-Google-Smtp-Source: ACcGV63SjjleoBggo7yQDGSwo8ej3dWHC2uP7TL8eaIdl1pBYea9Q4d0EnkN8P73oJXsXsXkXdN3 X-Received: by 2002:a63:ab0c:: with SMTP id p12-v6mr8776517pgf.190.1538029621541; Wed, 26 Sep 2018 23:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538029621; cv=none; d=google.com; s=arc-20160816; b=EWNwwB3Tl0xiHHwcPEesFPsrMAEL1PsE4LWHdGjlcr8e5qz8rNi4r3ONS1OMFwdOw+ Mhu8oI8KsNGXYnrprkzKAq9rEs+/wRnLHA5BP25kumX7kZeEocO+ZffChoLZRyRjjVPT Uaaae3VaeK2ZrvMbUUZ1NoKuahhcHaOCVSbWUw+3mHHfG6vjHPypiMkoyO99qIIerL0X jDOF/gAtNYLWf0v1PzqSeVdZxdYyTSBINibu2raQSZb7s4OIduulch9mSVcUiWzlNXpX q6YvWgEcLs38+H3CPEN7zdiHHnrDpgmKn2hYf/uGmr/r+YANIXdwTKiOpJjfBnCsFZG5 jeew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=CME7rfyqEReFzXgye3pVUvhaRPMSCXac16RqtaTnchs=; b=Nwcs30//sOrzkBthh3jgjF3KIdi8Pyh7XqMVp//VVXpizyo3WSIbbJQp8Njf0iZ9Cu Br5iZigTUmILEx8CUTRkZh+ZdNCOPPOZIpzxrhlYqza36A6H2aMwtkAjYjlVpY2iodjN 4t7C7GE9+hUDG8OitkQdczb1HmUdb9hgNbNg0ZHMAj4i93FsxkrR2SuwzEFbjBhRg9Zl xKWoRkt4kXOErTszm4xN8n0wqAH3BhXdtSJ3jGxJkAxupk+JqgvZD5GwTgMD44AtLWbN 9YPWhP+6ZjEoiko3yCA1+MBmAkqqiLoIsxeh4K6ajDqxdqKgvVtDgZ/pes3prq5uxvyA bmqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si1217559plf.0.2018.09.26.23.26.44; Wed, 26 Sep 2018 23:27:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727032AbeI0MnM (ORCPT + 99 others); Thu, 27 Sep 2018 08:43:12 -0400 Received: from mga02.intel.com ([134.134.136.20]:18432 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726687AbeI0MnL (ORCPT ); Thu, 27 Sep 2018 08:43:11 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 23:26:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,309,1534834800"; d="scan'208";a="74048253" Received: from svm-s2600wft.bj.intel.com ([10.240.193.45]) by fmsmga008.fm.intel.com with ESMTP; 26 Sep 2018 23:26:31 -0700 From: Yi Sun To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, tglx@linutronix.de, chao.p.peng@intel.com, chao.gao@intel.com, isaku.yamahata@intel.com, michael.h.kelley@microsoft.com, tianyu.lan@microsoft.com, Yi Sun , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger Subject: [PATCH v3 1/2] X86/Hyper-V: Add Guest IDLE MSR support Date: Thu, 27 Sep 2018 14:01:43 +0800 Message-Id: <1538028104-114050-2-git-send-email-yi.y.sun@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1538028104-114050-1-git-send-email-yi.y.sun@linux.intel.com> References: <1538028104-114050-1-git-send-email-yi.y.sun@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hyper-V may expose a HV_X64_MSR_GUEST_IDLE MSR. We can read HYPERV_CPUID_FEATURES eax to check it. Read this MSR can trigger the guest's transition to the idle power state which can be exited by an IPI even if IF flag is disabled. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Reviewed-by: Michael Kelley Signed-off-by: Yi Sun --- arch/x86/include/asm/hyperv-tlfs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h index 00e01d2..4139f76 100644 --- a/arch/x86/include/asm/hyperv-tlfs.h +++ b/arch/x86/include/asm/hyperv-tlfs.h @@ -38,6 +38,8 @@ #define HV_MSR_TIME_REF_COUNT_AVAILABLE (1 << 1) /* Partition reference TSC MSR is available */ #define HV_MSR_REFERENCE_TSC_AVAILABLE (1 << 9) +/* Partition Guest IDLE MSR is available */ +#define HV_X64_MSR_GUEST_IDLE_AVAILABLE (1 << 10) /* A partition's reference time stamp counter (TSC) page */ #define HV_X64_MSR_REFERENCE_TSC 0x40000021 @@ -246,6 +248,9 @@ #define HV_X64_MSR_STIMER3_CONFIG 0x400000B6 #define HV_X64_MSR_STIMER3_COUNT 0x400000B7 +/* Hyper-V guest idle MSR */ +#define HV_X64_MSR_GUEST_IDLE 0x400000F0 + /* Hyper-V guest crash notification MSR's */ #define HV_X64_MSR_CRASH_P0 0x40000100 #define HV_X64_MSR_CRASH_P1 0x40000101 -- 1.9.1