Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2762734rwi; Tue, 1 Nov 2022 11:23:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4rMCIS5I6WSGwCy+hPF/EGZgTrzL85EIvD2c/FYyxNGiHgZSq9JNk2hS5nGSI3DVgJsG3p X-Received: by 2002:a63:db58:0:b0:443:575e:d1ed with SMTP id x24-20020a63db58000000b00443575ed1edmr18006205pgi.468.1667327018189; Tue, 01 Nov 2022 11:23:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667327018; cv=none; d=google.com; s=arc-20160816; b=u66FZKFXFvDlsfPQeyRfuJf+TTyNGSAeLh1ydWs7PC5IYDu82AV5ksmOCsb2lIYO95 dGQ2Eu2fghXgQg7DoEOtJy3dofHzAm+Kw3myPtHr8H548GFr+KYIvs29suHqkp7TZaeH 7zTwrWBQhjCs/1g8MfMvqwnGALrE8JbSqY9drlsieIhYDE/Y/zNGx7nhu3NutHcn3+Ur dM9O4YCjpoJjHnU8WpZzGnUBdKTEi19yqlLkCmTlLR3qF07M4xxqpIdbrDgzjFUVZfTK zBY/4QlLUiXxBfE9Qd3H5arm39Y1CP7nfAq4Y/+GMB/PcpYtJaSqTa/7iDkZjVXRIf6f SDuA== 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=VzS0zv6W20Ej0nTKmhHcYF4peM529wVUYDvHRYTK7Zc=; b=S7DEzKDA4pgTX1+ORrgXeYEJNrrBMCZf8RULcmUhEvWI7d104CPdLdaHN2+EttYelp 6SK+A+J8aRpYCQlcIZ8E6bgPGL9KW/K+L5tanz2jYV8SocfqV5Zk2MTEmo46e3Z9nnOr WcVmRZ0MApza7mUgAN5N29a7qp9xKj/iS85JKiF6g+ft2lTxqRPOGfQPNufYMRp4nrS5 EmU2MZBQZVdYoNSb9FvjfdxiHBNSOMYTBjeYVOr8FvDvxWt98tNKXOHLoOSbporgd7PO MrPhRzZKreuGwWYXwBr1fSBprZs7lkYo3FdKiD3P6yt7m28/Ho7fHkZ4luRK6DCU69kI Ve7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=OyhwJotS; 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 b5-20020a170902e94500b0017829e27195si12817853pll.521.2022.11.01.11.23.24; Tue, 01 Nov 2022 11:23:38 -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=OyhwJotS; 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 S229517AbiKARbI (ORCPT + 96 others); Tue, 1 Nov 2022 13:31:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbiKARbF (ORCPT ); Tue, 1 Nov 2022 13:31:05 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F0C1B1C12E; Tue, 1 Nov 2022 10:31:04 -0700 (PDT) Received: from skinsburskii-cloud-desktop.internal.cloudapp.net (unknown [20.120.152.163]) by linux.microsoft.com (Postfix) with ESMTPSA id BA3F720B929F; Tue, 1 Nov 2022 10:31:04 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BA3F720B929F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1667323864; bh=VzS0zv6W20Ej0nTKmhHcYF4peM529wVUYDvHRYTK7Zc=; h=Subject:From:Cc:Date:In-Reply-To:References:From; b=OyhwJotSpjmdF+Oolz000h3Z0kXNjN6e/hid2wcKbrphgqXY6so+O9uyRXTZvDsHk bz4agA5yLzbTOoB5abTL+ykPmlkTgFOYZRIo+MNGwnatX9ygaMEXpsdltXiTK2IJO+ 7VnnAPds0Vrvx7hWsYI/94joKNq4piiP0uOjusvQ= Subject: [PATCH 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: Tue, 01 Nov 2022 17:31:04 +0000 Message-ID: <166732386464.9827.16622091938453285710.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net> In-Reply-To: <166732356767.9827.4925884794177179249.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net> References: <166732356767.9827.4925884794177179249.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. 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 */