Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1195156imm; Tue, 2 Oct 2018 04:28:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV602cSvq8/953XKHiXMxUZVdKN5gXeA2qiQVli7zJlDrYNZSXYkMjeaFEhntfMeAJ81xZUOr X-Received: by 2002:a62:6643:: with SMTP id a64-v6mr15812912pfc.202.1538479736220; Tue, 02 Oct 2018 04:28:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538479736; cv=none; d=google.com; s=arc-20160816; b=mwQl+8gY6wtj1Fc4rg1UpuM3mzHuLbytQD/RjveRS3bi8e9OgZts+tUdh5vDu54oeX GWobbjby6fPTg27xthsUuYptkL0zxfyysXjRYhD2pimjmn4W/v2lZ0Vfhkg1MoObf0FG 5gQgdFI2OjXqlkKW+h/VZORIrijynDIV6yWOnAikiO7bsLJBIarNlR2FdS85IU9Zm6Ox PI1oVJwA4HyGLEJsUPz+nOPH3H3soql5mhoUsTBNG0C2/8/G0sQgfKwCT4Vp8eCP+IpR IhR72i8MI+fm8wzIZ0YratTT+fLGrwqO7y2nrcJLE/3NdkAwPsuOtwwmO+1XLEB1M7KN EFew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=8jtWSl5RL0oX5IHnbz9a6J4/NoQMAttBCoGmHotu8sI=; b=dnUGGPrI4+AOMaaBbxeRyVl6w8k7D3FJAqzIFlZQEMlDQfs6C6nDmpWSpa7Cw7wQC9 Zrbv7KJl0E15TzyDsLifIPbrBDYFQmFlBTJzSsPVPck54TDjbmmdV7p4PhYVmR0adTkg 0kQPKF+Ojgjg5yMgx50qBR4t5AHJgkmuiqXDfCRJSJ81QS/OAQFpjdLiUuhhZ7C4E4CA LV9kue5NBSObzk42X9UdEzwBF9DWnN7OMGETtqe0+DTlT4PASxBSiq+Y9HyXU0kostyK ahZoIxBLVpeRHnYLhZGG0xmGAdB84HbLFtQwxfWBui7rv1ZzV/K5/iUQ97TH45CsLRdA +kZg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p17-v6si12894162pgk.58.2018.10.02.04.28.40; Tue, 02 Oct 2018 04:28:56 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727579AbeJBSKs (ORCPT + 99 others); Tue, 2 Oct 2018 14:10:48 -0400 Received: from terminus.zytor.com ([198.137.202.136]:46667 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727345AbeJBSKs (ORCPT ); Tue, 2 Oct 2018 14:10:48 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w92BRqnq1937362 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 2 Oct 2018 04:27:52 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w92BRpKo1937359; Tue, 2 Oct 2018 04:27:51 -0700 Date: Tue, 2 Oct 2018 04:27:51 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Yi Sun Message-ID: Cc: hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org, sthemmin@microsoft.com, haiyangz@microsoft.com, mikelley@microsoft.com, yi.y.sun@linux.intel.com, kys@microsoft.com, tglx@linutronix.de Reply-To: hpa@zytor.com, linux-kernel@vger.kernel.org, sthemmin@microsoft.com, mingo@kernel.org, haiyangz@microsoft.com, mikelley@microsoft.com, kys@microsoft.com, tglx@linutronix.de, yi.y.sun@linux.intel.com In-Reply-To: <1538028104-114050-2-git-send-email-yi.y.sun@linux.intel.com> References: <1538028104-114050-2-git-send-email-yi.y.sun@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/hyperv] x86/hyperv: Add GUEST_IDLE_MSR support Git-Commit-ID: 10d02e13385ce1e90abb49ef1e9a366a5d968157 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 10d02e13385ce1e90abb49ef1e9a366a5d968157 Gitweb: https://git.kernel.org/tip/10d02e13385ce1e90abb49ef1e9a366a5d968157 Author: Yi Sun AuthorDate: Thu, 27 Sep 2018 14:01:43 +0800 Committer: Thomas Gleixner CommitDate: Tue, 2 Oct 2018 13:21:52 +0200 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 Signed-off-by: Thomas Gleixner Reviewed-by: Michael Kelley 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" Cc: Haiyang Zhang Cc: Stephen Hemminger Link: https://lkml.kernel.org/r/1538028104-114050-2-git-send-email-yi.y.sun@linux.intel.com --- 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 00e01d215f74..4139f7650fe5 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