Signed-off-by: Wei Liu <[email protected]>
---
drivers/clocksource/hyperv_timer.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyperv_timer.c
index ba04cb381cd3..269a691bd2c4 100644
--- a/drivers/clocksource/hyperv_timer.c
+++ b/drivers/clocksource/hyperv_timer.c
@@ -426,6 +426,9 @@ static bool __init hv_init_tsc_clocksource(void)
if (!(ms_hyperv.features & HV_MSR_REFERENCE_TSC_AVAILABLE))
return false;
+ if (hv_root_partition)
+ return false;
+
hv_read_reference_counter = read_hv_clock_tsc;
phys_addr = virt_to_phys(hv_get_tsc_page());
--
2.20.1
On 05/11/2020 17:58, Wei Liu wrote:
> Signed-off-by: Wei Liu <[email protected]>
> ---
I would like to apply this patch but the changelog is too short (one line).
Please add a small paragraph (no need to resend just answer here, I will
amend the log myself.
> drivers/clocksource/hyperv_timer.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyperv_timer.c
> index ba04cb381cd3..269a691bd2c4 100644
> --- a/drivers/clocksource/hyperv_timer.c
> +++ b/drivers/clocksource/hyperv_timer.c
> @@ -426,6 +426,9 @@ static bool __init hv_init_tsc_clocksource(void)
> if (!(ms_hyperv.features & HV_MSR_REFERENCE_TSC_AVAILABLE))
> return false;
>
> + if (hv_root_partition)
> + return false;
> +
> hv_read_reference_counter = read_hv_clock_tsc;
> phys_addr = virt_to_phys(hv_get_tsc_page());
>
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
On Thu, Nov 12, 2020 at 10:56:17AM +0100, Daniel Lezcano wrote:
> On 05/11/2020 17:58, Wei Liu wrote:
> > Signed-off-by: Wei Liu <[email protected]>
> > ---
>
> I would like to apply this patch but the changelog is too short (one line).
>
> Please add a small paragraph (no need to resend just answer here, I will
> amend the log myself.
Please don't apply this to your tree. It is dependent on a previous
patch. I expect this series to go through the hyperv tree.
I will add in this small paragraph in a later version:
When Linux runs as the root partition, the setup required for TSC page
is different. Luckily Linux also has access to the MSR based
clocksource. We can just disable the TSC page clocksource if Linux is
the root partition.
If you're happy with the description, I would love to have an ack from
you. I will funnel the patch via the hyperv tree.
Wei.
On 12/11/2020 12:24, Wei Liu wrote:
> On Thu, Nov 12, 2020 at 10:56:17AM +0100, Daniel Lezcano wrote:
>> On 05/11/2020 17:58, Wei Liu wrote:
>>> Signed-off-by: Wei Liu <[email protected]>
Acked-by: Daniel Lezcano <[email protected]>
>>> ---
>>
>> I would like to apply this patch but the changelog is too short (one line).
>>
>> Please add a small paragraph (no need to resend just answer here, I will
>> amend the log myself.
>
> Please don't apply this to your tree. It is dependent on a previous
> patch. I expect this series to go through the hyperv tree.
>
> I will add in this small paragraph in a later version:
>
> When Linux runs as the root partition, the setup required for TSC page
> is different. Luckily Linux also has access to the MSR based
> clocksource. We can just disable the TSC page clocksource if Linux is
> the root partition.
>
> If you're happy with the description, I would love to have an ack from
> you. I will funnel the patch via the hyperv tree.
>
> Wei.
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
On Thu, Nov 12, 2020 at 12:40:53PM +0100, Daniel Lezcano wrote:
> On 12/11/2020 12:24, Wei Liu wrote:
> > On Thu, Nov 12, 2020 at 10:56:17AM +0100, Daniel Lezcano wrote:
> >> On 05/11/2020 17:58, Wei Liu wrote:
> >>> Signed-off-by: Wei Liu <[email protected]>
>
> Acked-by: Daniel Lezcano <[email protected]>
Thanks Daniel.
Wei.
Wei Liu <[email protected]> writes:
> Signed-off-by: Wei Liu <[email protected]>
In the missing commit message I'd like to see why we don't use 'TSC
page' clocksource for the root partition. My guess would be that it's
not available and actually we're supposed to use raw TSC value (because
root partitions never migrate) but please spell it out.
> ---
> drivers/clocksource/hyperv_timer.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyperv_timer.c
> index ba04cb381cd3..269a691bd2c4 100644
> --- a/drivers/clocksource/hyperv_timer.c
> +++ b/drivers/clocksource/hyperv_timer.c
> @@ -426,6 +426,9 @@ static bool __init hv_init_tsc_clocksource(void)
> if (!(ms_hyperv.features & HV_MSR_REFERENCE_TSC_AVAILABLE))
> return false;
>
> + if (hv_root_partition)
> + return false;
> +
> hv_read_reference_counter = read_hv_clock_tsc;
> phys_addr = virt_to_phys(hv_get_tsc_page());
--
Vitaly
On Thu, Nov 12, 2020 at 04:30:57PM +0100, Vitaly Kuznetsov wrote:
> Wei Liu <[email protected]> writes:
>
> > Signed-off-by: Wei Liu <[email protected]>
>
> In the missing commit message I'd like to see why we don't use 'TSC
> page' clocksource for the root partition. My guess would be that it's
> not available and actually we're supposed to use raw TSC value (because
> root partitions never migrate) but please spell it out.
See my exchange with Daniel.
Wei.