From patchwork Wed Nov 2 22:07:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kinsburskii X-Patchwork-Id: 1056 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp167846wru; Wed, 2 Nov 2022 15:08:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM56X119Ah/wsDq8BYRxfnG18pKc3U0gE4Sj9GHqPHc3aV7GndSW8aanXvFI9FPGN7dTJa03 X-Received: by 2002:aa7:d9d1:0:b0:461:9556:23e6 with SMTP id v17-20020aa7d9d1000000b00461955623e6mr27992384eds.25.1667426917063; Wed, 02 Nov 2022 15:08:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667426917; cv=none; d=google.com; s=arc-20160816; b=EfbK3U05caJzo1DiGQsQs4wbILiJ+tSg/l2/8TCJ5KDGibtYY5IX+2sIgvlpOVV8xR Z6Fv523HgKjxKUzw9nYhWkKm5Z/wRzdIrRzxpjKATB8tm3KEw3aymPJ7ubjZN7+92j3B OUPEk7/2jHvJVSvCLsY+3/uhzMH4/tBzXrfr8M/q3InHjxu6rB8Q2ZXNp9VsPFOt2ECY 020ZDBTWc26bo22olmA3yo7ts71T8CofTjc63pITmwLCMsYfeScmoEpU0jyJOQ6pwy+t Fxix4fMb8uDqZG5k+F9kQ8h4BCSDVCK2CjCsnvgKUz52PkZSUWhN66eVNy8ZH/Ru6GzS 6mcg== 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=JUG42jeyjvgFHGNMvsR/hCvKSrT4pTWK7OPsWykBFGw=; b=WuwasYsMWv9ac44gxJOU9yUTAR0HQuvgKyXiyelbJaITaMAoSMJk9J2dMbRJI7bh9E FKc8nDQSDZH+Tf+ma0OU+QD63dB/IWM6gd9S6MVuQuZK/w84Dw356qJDccjA5zVnvQLW cwz3aaiNCB3AseTUeUnPAvUVSe5SJe3PWEGTkXJwlE9uQ//K8WV0SIT6N6v3I8GQZqdP WQPyVzWskej+KYWS27c7YtDDvQEIz/xnOMwC5LaB5ZNB6YArEI1o/zIgagrqfQ+F0dLV x5o8oqamHoOhMYipBod0Ridd9nc4YZRJ4JKzEy4h+cFe5y2QaxLLDOS0KFkSyBnZzL5U ANfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=jCklmZzc; 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 ec42-20020a0564020d6a00b00462df2b0639si13974794edb.335.2022.11.02.15.07.40; Wed, 02 Nov 2022 15:08:37 -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=jCklmZzc; 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 S230509AbiKBWHX (ORCPT + 99 others); Wed, 2 Nov 2022 18:07:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230478AbiKBWHU (ORCPT ); Wed, 2 Nov 2022 18:07:20 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5B8E8E089; Wed, 2 Nov 2022 15:07:19 -0700 (PDT) Received: from skinsburskii-cloud-desktop.internal.cloudapp.net (unknown [20.120.152.163]) by linux.microsoft.com (Postfix) with ESMTPSA id 14C5C20C28B1; Wed, 2 Nov 2022 15:07:19 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 14C5C20C28B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1667426839; bh=JUG42jeyjvgFHGNMvsR/hCvKSrT4pTWK7OPsWykBFGw=; h=Subject:From:Cc:Date:From; b=jCklmZzcyhMvq5FiY2of143rpnpgqxIIpQkdYGqyO4afU72B6wJmkh9UqlXX9tLTe /CL46x3PNGGs4a+eJeF1d8W6ALFzYEmuNsO+heYkO/a3GN7Cbhb0x8gEwlr1uZcaOY idcxVx3Ld4+dvJS4BwZVrVmiQ/UVyrwq2L0YOX04= Subject: [PATCH v2 0/4] hyper-v: Introduce TSC page for root partition From: Stanislav Kinsburskii Cc: x86@kernel.org, Thomas Gleixner , Andy Lutomirski , Ingo Molnar , Stanislav Kinsburskiy , Daniel Lezcano , Dexuan Cui , Haiyang Zhang , Dave Hansen , Borislav Petkov , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, "K. Y. Srinivasan" , Wei Liu , "H. Peter Anvin" Date: Wed, 02 Nov 2022 22:07:18 +0000 Message-ID: <166742670556.205987.18227942188746093700.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?1748423846778380304?= X-GMAIL-MSGID: =?utf-8?q?1748423846778380304?= 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). 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... --- 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 | 54 +++++++++++++++++++++++++++--------- include/clocksource/hyperv_timer.h | 7 +++++ 4 files changed, 52 insertions(+), 18 deletions(-)