From patchwork Wed Dec 18 14:42:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11300885 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B4486C1 for ; Wed, 18 Dec 2019 14:43:30 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 277CE2176D for ; Wed, 18 Dec 2019 14:43:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jsT6xTFn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 277CE2176D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ihaX8-0004Nm-KR; Wed, 18 Dec 2019 14:42:38 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ihaX7-0004Ng-Pt for xen-devel@lists.xenproject.org; Wed, 18 Dec 2019 14:42:37 +0000 X-Inumbo-ID: a23c0862-21a4-11ea-a914-bc764e2007e4 Received: from mail-wm1-x343.google.com (unknown [2a00:1450:4864:20::343]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a23c0862-21a4-11ea-a914-bc764e2007e4; Wed, 18 Dec 2019 14:42:37 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id p9so2106337wmc.2 for ; Wed, 18 Dec 2019 06:42:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+N7tWGaF5ILnM83JwOZQCbkB3hDbIn5eAo1LQt3tYvc=; b=jsT6xTFnBnYvIPGCOfvmlBiPcTdPJDQSBBkdfM+a/nyfvsiom8Zt8Y5lQp59pfENf8 NVgrBYJIwZnoAzxZX6KmGSP7DRuUBcEdQaxX2mGBTzTEl91VVKu+8vNCYfDpHowYw4sM ztvXjbs/lVP4D50ECZlOgar/TLG+qOMOHuDOBrg0YfzNgEagE86a94s/6x8qJUqJ5k8n P5yHBOsoC+UWs++gohiOL1Aoy4otpFCLLh/Q27iwuJ2PzG5NzXYCYXg/ZUDBudwvNvOo J5XGpzAm2TBZP+kq83vsmU2SPvWjmhpJyTpbcFQ8wY0qKxsnvyoa0MH8XkDuEhYW0WvF 9LiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=+N7tWGaF5ILnM83JwOZQCbkB3hDbIn5eAo1LQt3tYvc=; b=BAKzg10m41fwfEAJ+OHQ1DSsKV2rncH7lhNPr91FC3zqDk8JndS82ROOHMV4kNOXoL JwM8fRDnNOguGjyjt6KnNIYEPpIvo3OQP0h/i9v+RzRTEhB6SKWnIHJ0XvFTw74I9G8s 1fDZcX79OdcMsMnlLsANJSurjsyxLrUq7Smu1mKqT5l+xP7xOouwgOmZ+pJIMV2Xyugm hgbyQDIQqJHUEQkoH6LFawh7xXIKCq6uLqAeYlWGO0ah7PW9KZVMmTN2594AFYkVKAQk mdElpBiGay3U7CPduK6NwDkAvcghYZrSBcFDkJsemNNBi0E7g1nrl3NXloyQDj+x87io zbEQ== X-Gm-Message-State: APjAAAXlWY7361yE6ZWTCwNVERC/yj57fnX7Xd2KAi0egdejTTGyHorC 8ILvDyEN6tIlQREeZANvEo1ZQdRb X-Google-Smtp-Source: APXvYqzVgJ7D02N2HXmBBRmn4DQgVCdjCeLoggWeBVHS+AOdSGEeUUh2TzRMA0vPdp47wn7XXgMfAQ== X-Received: by 2002:a7b:c190:: with SMTP id y16mr3781940wmi.107.1576680156376; Wed, 18 Dec 2019 06:42:36 -0800 (PST) Received: from debian.mshome.net (38.163.200.146.dyn.plus.net. [146.200.163.38]) by smtp.gmail.com with ESMTPSA id p17sm2724894wmk.30.2019.12.18.06.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 06:42:35 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Wed, 18 Dec 2019 14:42:27 +0000 Message-Id: <20191218144233.15372-1-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 0/6] Implement Hyper-V reference TSC based clock source X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Andrew Cooper , Paul Durrant , Michael Kelley , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Hi all This series adds a clock source based on Hyper-V's reference TSC. The meat is in the last patch. I also put in some clean up patches to Xen's viridian code per Paul's request. With this series, Xen on Hyper-V no longer runs on emulated PIT. (XEN) Platform timer is 2294.686MHz HYPER-V REFERENCE TSC Wei. Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: Roger Pau Monné Cc: Paul Durrant Wei Liu (6): x86: import hyperv-tlfs.h from Linux x86/viridian: drop duplicate defines from private.h and viridian.c x86/viridian: drop private copy of definitions from synic.c x86/viridian: drop private copy of HV_REFERENCE_TSC_PAGE in time.c x86/hyperv: extract more information from Hyper-V x86: implement Hyper-V clock source xen/arch/x86/guest/hyperv/hyperv.c | 17 + xen/arch/x86/hvm/viridian/private.h | 66 -- xen/arch/x86/hvm/viridian/synic.c | 68 +- xen/arch/x86/hvm/viridian/time.c | 30 +- xen/arch/x86/hvm/viridian/viridian.c | 23 +- xen/arch/x86/time.c | 101 +++ xen/include/asm-x86/guest/hyperv-tlfs.h | 907 ++++++++++++++++++++++++ xen/include/asm-x86/guest/hyperv.h | 12 + 8 files changed, 1070 insertions(+), 154 deletions(-) create mode 100644 xen/include/asm-x86/guest/hyperv-tlfs.h --- 2.20.1