Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp590391rwi; Wed, 2 Nov 2022 15:52:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM697udDRWET9OblmS6cy9sJ7oeUdvyLTe/A4OX/1R6Z0TPr4qtimScfd+IrkIy1n4OyjrX8 X-Received: by 2002:a65:6d86:0:b0:438:f775:b45d with SMTP id bc6-20020a656d86000000b00438f775b45dmr23600369pgb.291.1667429564746; Wed, 02 Nov 2022 15:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667429564; cv=none; d=google.com; s=arc-20160816; b=SbRwFbdAdyfDD3HYziTNRjlfhSguUww3RwN0tKi0MzkDr8OfM3U9L3LUmr+BSDO2Zv ipbJSp+fUey75Dbxlc4RKvmYoclCVag7OJZB1aNJMepnuAOkLdEPdVupca98hn14vzPQ B965ZLY1gj9cEOGzPJh2dJprdlRTAmWimqQkA5pol6u/DwF9odQLhehDZL85qHg816CD xTcTshY97B2tRWC1KZ6+/B7QN299gTjFjcaGPGf97TslmvcAITDktT0nRXJdPwFGVg4R ABGFYs+vIPYl2Su92Tgt7OIH+9W/vEMy20v8BoeMvfGal1SgKKT5bTxT1hZZk82E2xKh 4K+A== 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:references:in-reply-to:message-id:date:cc:from:subject :dkim-signature:dkim-filter; bh=EWM7ms7b0WbT7d6yAY+HL9LM12Gu9G0ck67VyffGqTc=; b=yKy/UK1pYTcz/MXRvdTXlifoKClA8SPx39Wi4x/PzHZRL2/szzW2X8aMBl0F0LQL1S iZ9le8yesKHNP/wDDKmg0MQyiUplcOj1h833FUP5I86n9uiGbnNJwzSEsCuahk3US+9/ ARv+143vVXuTc1lR8mmSM32EfADiQVhM98USCi5WRg5KUlb6yT2+AnG6kosY+T7zrNCQ pwkzN6AnxM65LYtWiqaJb1AedSfbNyLtJCdL0kneGfX8wDihRgFv+Q/wxJIg/28Zi2bo 9J/Z3CysW0aDew6FbvhNSM4zM/rzxDpeRphFvCAjgX/6wiiVT3I9Wit7xX/dP3cT97St srTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="Fn/1D1Ph"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q71-20020a17090a1b4d00b0021409ca96c2si3590694pjq.23.2022.11.02.15.52.31; Wed, 02 Nov 2022 15:52:44 -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="Fn/1D1Ph"; 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 S231339AbiKBWHg (ORCPT + 97 others); Wed, 2 Nov 2022 18:07:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230478AbiKBWHZ (ORCPT ); Wed, 2 Nov 2022 18:07:25 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 86746A446; Wed, 2 Nov 2022 15:07:24 -0700 (PDT) Received: from skinsburskii-cloud-desktop.internal.cloudapp.net (unknown [20.120.152.163]) by linux.microsoft.com (Postfix) with ESMTPSA id 5583520C3338; Wed, 2 Nov 2022 15:07:24 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5583520C3338 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1667426844; bh=EWM7ms7b0WbT7d6yAY+HL9LM12Gu9G0ck67VyffGqTc=; h=Subject:From:Cc:Date:In-Reply-To:References:From; b=Fn/1D1PhnRyR0LaZcGzkhZteZTh0pQ6zv5ioCtRFHVIaPWFAsR0R0IT6iB7fHX0vR fI1DLf9YDalZaQhuitm7svbHpHZ6yJfVGzTYbdJVL9xdDIuwLlJNyVGdZ4J3wizRf4 p/QyWcPJ57ZFfS4miEQx+ZeafovYZpk44aTm+Esw= Subject: [PATCH v2 1/4] drivers/clocksource/hyper-v: Introduce a pointer to TSC page From: Stanislav Kinsburskii Cc: Stanislav Kinsburskiy , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Daniel Lezcano , Thomas Gleixner , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 02 Nov 2022 22:07:24 +0000 Message-ID: <166742684418.205987.14378848205726386650.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net> In-Reply-To: <166742670556.205987.18227942188746093700.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net> References: <166742670556.205987.18227942188746093700.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net> User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 From: Stanislav Kinsburskiy Will be used later keep the address of the remapped page for the root partition as it will be Microsoft Hypervisor defined (and thus won't be a static address). Signed-off-by: Stanislav Kinsburskiy CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Wei Liu CC: Dexuan Cui CC: Daniel Lezcano CC: Thomas Gleixner CC: linux-hyperv@vger.kernel.org CC: linux-kernel@vger.kernel.org --- drivers/clocksource/hyperv_timer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyperv_timer.c index 11332c82d1af..c4dbf40a3d3e 100644 --- a/drivers/clocksource/hyperv_timer.c +++ b/drivers/clocksource/hyperv_timer.c @@ -366,9 +366,11 @@ static union { u8 reserved[PAGE_SIZE]; } tsc_pg __aligned(PAGE_SIZE); +static struct ms_hyperv_tsc_page *tsc_page = &tsc_pg.page; + struct ms_hyperv_tsc_page *hv_get_tsc_page(void) { - return &tsc_pg.page; + return tsc_page; } EXPORT_SYMBOL_GPL(hv_get_tsc_page); @@ -406,7 +408,7 @@ static void suspend_hv_clock_tsc(struct clocksource *arg) static void resume_hv_clock_tsc(struct clocksource *arg) { - phys_addr_t phys_addr = virt_to_phys(&tsc_pg); + phys_addr_t phys_addr = virt_to_phys(tsc_page); union hv_reference_tsc_msr tsc_msr; /* Re-enable the TSC page */