From patchwork Tue Nov 1 17:31:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kinsburskii X-Patchwork-Id: 13818 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3107857wru; Tue, 1 Nov 2022 10:36:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4R4st+XF2uwPQ4UASyyJcjc71C2hT4jyLXPzn/yzj6MGPlVW5M3ny5NygqhttY59JsVUD0 X-Received: by 2002:a17:902:a502:b0:186:aed2:f69d with SMTP id s2-20020a170902a50200b00186aed2f69dmr20811126plq.46.1667324187215; Tue, 01 Nov 2022 10:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667324187; cv=none; d=google.com; s=arc-20160816; b=wl2dfmzkaIxFQDF6lKYQUqpHKP27HJn46MlzOyAMybg7KkIlLioZuBSvPCggrY28Em lBaTtACP9DE/WN2Z4wi81mxQOpA+k0CLEHsc38puCp/MmAoa0XHbn8hcrWnkfvbzZycL wI2idKaLlXi+UdC6crbj8OpxnvhKiLA8xSMN38bNFGlX63bXmXpYqwFb/fXFJuljqRyh MAaRcZmcx1CvR6I8KGPAxghGIxjlEIsotEmRYLfM0aW4uzu28Fn++u3fxjGLns02EMmL VIaTaYQ3kQp95zFePX5W/nPVobLnGymW2jauR+z9P6SLgwR1FNHCrF6jjIcwbuvxv1UU QPbw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y7-20020a17090322c700b0016dc27fb9fbsi15230243plg.117.2022.11.01.10.36.12; Tue, 01 Nov 2022 10:36:27 -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 + 99 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 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?1748316127108871044?= X-GMAIL-MSGID: =?utf-8?q?1748316127108871044?= 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 */