Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2025216rwi; Thu, 3 Nov 2022 11:44:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5toJRCWGRxyJHQ8djq/B3zM4GZ4aeCf9p9FynAyrKLRPsFDWzvQXLj+Dc8oLL5KKNxPF0g X-Received: by 2002:a63:ed58:0:b0:439:b3a:4f01 with SMTP id m24-20020a63ed58000000b004390b3a4f01mr27259447pgk.327.1667501055845; Thu, 03 Nov 2022 11:44:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667501055; cv=none; d=google.com; s=arc-20160816; b=TRrTZ1oWiOVZogmSO9pU78kvXa1QgfR0Bi0UuDxvi3XZoOoqOetu6IMl1LQsIkwJoL dSfgHeGY+YoR8b5aHgxOWZRHXhW0NxJI5tr6KmbcUzk0qXoxaVgV7/7HeXzyvpERi0oU b8k1EUB3cVK5KIsR8qOF2p6qDK2swRHfECoZCjyhh4BDfL2nnMKLHtZZJCE2Qv+7a2T/ ghca3N6nzMKDUS93s2kyPbbev+1NpiJob1pcR3mKJPBNf1JlTK5pqVYGdTmY9TJM6YHJ qhI6UCHk4F7ZHPFD4Xv/+jzw4cvKgWz4InaHn13CrgIrVx6FpHik+bNUsok+YAxe06I0 1vFw== 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=d2r8ZXf09V8uzug4END6ry4gGh3rPYlU3pv6NwpfdRE=; b=hiBH20NbX33+nQtHlhllQtcJQR6Ngyj6ZRPJh4qpPPaCIQwQCm60ODiqSaXZtvPHGp olZjCSIlyPhlhVtrijI07T0OMy1R7wm/hf2O1Pl19+7j53TSrXov0rCG5FXBDjmM77wL YMcYMXjRi1L2ZfF3cVHfN6BNGrF4oOPk7fOXf+Y6o1TRIxD20NUPFpDsC/4v7CAP6miM auqfYXDOpO4TJ/PQJhSISRvEVFUHlnAjOPuqkcYS0xtJZ4aEiRk+xJN1XGGb8ui4hGlf PUedx9Tu/wRim0D5wWQwKEpoO2M+yrAVigzYtL9Hkh9V8m8jw6JWRamfLhq5s+0X2NBL 4mcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=BuTRr6tn; 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 s7-20020a639247000000b0044b817adee1si1915089pgn.78.2022.11.03.11.44.02; Thu, 03 Nov 2022 11:44:15 -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=BuTRr6tn; 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 S231687AbiKCR6w (ORCPT + 97 others); Thu, 3 Nov 2022 13:58:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231565AbiKCR6u (ORCPT ); Thu, 3 Nov 2022 13:58:50 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4CB9EE34; Thu, 3 Nov 2022 10:58:49 -0700 (PDT) Received: from skinsburskii-cloud-desktop.internal.cloudapp.net (unknown [20.120.152.163]) by linux.microsoft.com (Postfix) with ESMTPSA id 1AE5E20C28B1; Thu, 3 Nov 2022 10:58:49 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1AE5E20C28B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1667498329; bh=d2r8ZXf09V8uzug4END6ry4gGh3rPYlU3pv6NwpfdRE=; h=Subject:From:Cc:Date:In-Reply-To:References:From; b=BuTRr6tnaRl5ZUlXSNO6XGsV/dMn2Ht5Ei4eV3Ct2G3/TEDHXdYfDZzHZk4N9MVL8 fLU9cJOgE5JPuOl2n0VwK0sQhvsk/iVV+lFU8jwsUrTz0+SE+aVZLbc02Vbo9kIex9 VGcrWx8VBPiU1TyTzZajJR5S/gWSoRh+cu7+OhIg= Subject: [PATCH v3 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, mikelley@microsoft.com Date: Thu, 03 Nov 2022 17:58:48 +0000 Message-ID: <166749832893.218190.16503272948154953294.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net> In-Reply-To: <166749827889.218190.12775118554387271641.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net> References: <166749827889.218190.12775118554387271641.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 18de1f439ffd..b0b5df576e17 100644 --- a/drivers/clocksource/hyperv_timer.c +++ b/drivers/clocksource/hyperv_timer.c @@ -367,9 +367,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); @@ -407,7 +409,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 */