From: Naman Jain <namjain@linux.microsoft.com>
To: Michael Kelley <mhklinux@outlook.com>,
"K . Y . Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>
Cc: "linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: RE: [PATCH] clocksource: hyper-v: Fix hv tsc page based sched_clock for hibernation
Date: Tue, 10 Sep 2024 12:07:53 +0530 [thread overview]
Message-ID: <f982f176-c171-44db-b86c-f91b7d926949@linux.microsoft.com> (raw)
In-Reply-To: <SN6PR02MB4157141DD58FD6EAE96C7CABD4992@SN6PR02MB4157.namprd02.prod.outlook.com>
On 9/9/2024 9:16 PM, Michael Kelley wrote:
> From: Naman Jain <namjain@linux.microsoft.com> Sent: Sunday, September 8, 2024 10:39 PM
>>
>> read_hv_sched_clock_tsc() assumes that the Hyper-V clock counter is
>> bigger than the variable hv_sched_clock_offset, which is cached during
>> early boot, but depending on the timing this assumption may be false
..
>> + old_save_sched_clock_state = x86_platform.save_sched_clock_state;
>> + x86_platform.save_sched_clock_state = hv_save_sched_clock_state;
>> + old_restore_sched_clock_state = x86_platform.restore_sched_clock_state;
>> + x86_platform.restore_sched_clock_state = hv_restore_sched_clock_state;
>
> This Hyper-V clocksource/timer driver has intentionally been kept
> instruction set architecture independent. See the comment at the top
> of the source code file. We've also avoided any "#ifdef x86" or similar, though
> it's OK to have #ifdef's on specific clock-related functionality like
> GENERIC_SCHED_CLOCK.
>
> The reference to "x86_platform" violates the intended independence. The
> code to save-on-suspend and update-on-resume can probably stay in this
> module in generic form, but hooking the functions into the x86_platform
> function call mechanism should move to x86-specific code.
>
> Michael
>
Thanks for the review and guidance Michael. I'll take care of it in v2.
Regards,
Naman
>> +
>> /*
>> * TSC page mapping works differently in root compared to guest.
>> * - In guest partition the guest PFN has to be passed to the
>>
>> base-commit: da3ea35007d0af457a0afc87e84fddaebc4e0b63
>> --
>> 2.25.1
>
prev parent reply other threads:[~2024-09-10 6:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 5:39 [PATCH] clocksource: hyper-v: Fix hv tsc page based sched_clock for hibernation Naman Jain
2024-09-09 15:46 ` Michael Kelley
2024-09-10 6:37 ` Naman Jain [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f982f176-c171-44db-b86c-f91b7d926949@linux.microsoft.com \
--to=namjain@linux.microsoft.com \
--cc=daniel.lezcano@linaro.org \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhklinux@outlook.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).