From patchwork Thu Nov 3 17:58:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kinsburskii X-Patchwork-Id: 1117 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp682055wru; Thu, 3 Nov 2022 11:00:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6s5gGfQvkUcvKfZki+cn+rcJIvxEsGoX3JTh83TQkTokwGfusvdJMJin5VIbndwvJabh0w X-Received: by 2002:a17:90b:188:b0:214:3036:4e68 with SMTP id t8-20020a17090b018800b0021430364e68mr9452483pjs.234.1667498446503; Thu, 03 Nov 2022 11:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667498446; cv=none; d=google.com; s=arc-20160816; b=WqzxbP6xXiBFw2X0wErMQNEyLOECZicrEpzCr+t/7RwwGn4e3LbIli0TlXeV/b365J V1De5+Wdy7j0pF08xlWWdz3VhJzdiLMqbTo5Xinsm+9BicMNhOzojyeuGzl+GIgvU1iJ DxxgPPL1QZHZtQ2Jr0mXZvyres77ZnDw4LRKYQOPYtnxBMKTWatd+Er961bg4X8pMhuY HKfyKrPkTYPCfV3TiqedC2iUx+RNp4CpCRUlKjNC4Xpur5DNnif3rereYV+J5ZYhdEr7 aFbcXfJ8ASByxmpbjrHXHSP/8bZGzCp2sgaBFkCsjNeExvVGf1wM2QRmNjA4v+X3/mvq 9wJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:from:subject:dkim-signature :dkim-filter; bh=a+3ktXA7yE7QyKsHqFAAipbStNCt4UB+3YmFssrLg/w=; b=E1dMMofJ5pQ3Xrgb9lFzojKFL0zGsnmW0FFX9vd+RRqUUKIEjkDhE5vO3384mGsqbf P56p/awJ1KPd54TDql/YfpW60TnnrIsfAi9yScHQx4M5hFQmsj21Cv6QG1hZCi9b90di 2UQLcL9YayFa5xjnbE4x7AHNPZoWRIf9hSAb8WvTTAXlCPvrFWpS3MMqe/qwjqIhqUJh 5E0Lo1bZRgDY0wl075XPv3rrvKiW0xp7CZc6LfxA+YaUFhTsFcuTwxN7R2OADFln5zuI qAABQ7Dxjnlhtz6vXrKe4P6DQuTF4HzT2Y3a7sDcDpGLu1nBqGIlUtt1YN2htb4Iwr+O SMqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="El/gtoHn"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ng9-20020a17090b1a8900b0020d4dc7fa97si636994pjb.110.2022.11.03.11.00.33; Thu, 03 Nov 2022 11:00:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="El/gtoHn"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231596AbiKCR6s (ORCPT + 99 others); Thu, 3 Nov 2022 13:58:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230222AbiKCR6p (ORCPT ); Thu, 3 Nov 2022 13:58:45 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1CDD7DA9; Thu, 3 Nov 2022 10:58:44 -0700 (PDT) Received: from skinsburskii-cloud-desktop.internal.cloudapp.net (unknown [20.120.152.163]) by linux.microsoft.com (Postfix) with ESMTPSA id CBC82205DA3E; Thu, 3 Nov 2022 10:58:43 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CBC82205DA3E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1667498323; bh=a+3ktXA7yE7QyKsHqFAAipbStNCt4UB+3YmFssrLg/w=; h=Subject:From:Cc:Date:From; b=El/gtoHnphLcpSFXjo9ikL1J7DdKCxjFCzUjZ1eJZP1EfrXG681vy1F/yxr08LQ9o 4wrwM8spPsMxpae+npS5pHDdZcTls/mG/mswGU5LImeS/mULST3nY7OyFiFkMreYE3 BPPJLg9Kxwce7WEnjZ3nymfXwgMulTf5TVd/c5jA= Subject: [PATCH v3 0/4] hyper-v: Introduce TSC page for root partition From: Stanislav Kinsburskii Cc: Wei Liu , linux-hyperv@vger.kernel.org, "H. Peter Anvin" , "K. Y. Srinivasan" , Andy Lutomirski , Borislav Petkov , Daniel Lezcano , Dexuan Cui , Dave Hansen , Haiyang Zhang , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Stanislav Kinsburskiy , x86@kernel.org, mikelley@microsoft.com Date: Thu, 03 Nov 2022 17:58:43 +0000 Message-ID: <166749827889.218190.12775118554387271641.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Spam-Status: No, score=-18.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,MISSING_HEADERS, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748498851386080412?= X-GMAIL-MSGID: =?utf-8?q?1748498851386080412?= This series does some cleanup and precursor changes to the hyper-v clock source and introduces support for TSC page based clock in root partition. Hyper-V root partition requires kernel to map the page, specified by the hypervisor (instead of provide the PFN to the hypervisor like it's done in guest partition). v3: 1. Rebased on top of the fix to support arbitrary TSC page size by Anirudh 2. Fixed TSC physical page when remapping in root partition. v2: 1. Addressed all the comments to the commit messages. 2. TSC page in root partition is now remapped based on size of the tsc_pg variable. The following series implements... Acked-by: Daniel Lezcano --- Stanislav Kinsburskiy (4): drivers/clocksource/hyper-v: Introduce a pointer to TSC page drivers/clocksource/hyper-v: Introduce TSC PFN getter drivers/clocksource/hyper-v: Use TSC PFN getter to map vvar page drivers/clocksource/hyper-v: Add TSC page support for root partition arch/x86/entry/vdso/vma.c | 7 ++--- arch/x86/hyperv/hv_init.c | 2 + drivers/clocksource/hyperv_timer.c | 55 +++++++++++++++++++++++++++--------- include/clocksource/hyperv_timer.h | 7 +++++ 4 files changed, 53 insertions(+), 18 deletions(-)