<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/clocksource/hyperv_timer.c, branch v6.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-04-17T19:19:05Z</updated>
<entry>
<title>clocksource: hyper-v: make sure Invariant-TSC is used if it is available</title>
<updated>2023-04-17T19:19:05Z</updated>
<author>
<name>Dexuan Cui</name>
<email>decui@microsoft.com</email>
</author>
<published>2023-04-08T21:03:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c0e96acf884a1ce91c9bdd692c6a425b83c90285'/>
<id>urn:sha1:c0e96acf884a1ce91c9bdd692c6a425b83c90285</id>
<content type='text'>
If Hyper-V TSC page is unavailable and Invariant-TSC is available,
currently hyperv_cs_msr (rather than Invariant-TSC) is used by default.

Use Invariant-TSC by default by downgrading hyperv_cs_msr.rating in
hv_init_tsc_clocksource(), if Invariant-TSC is available.

Signed-off-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Reviewed-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Link: https://lore.kernel.org/r/20230408210339.15085-1-decui@microsoft.com
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/clocksource/hyper-v: non ACPI support in hyperv clock</title>
<updated>2023-04-17T19:16:22Z</updated>
<author>
<name>Saurabh Sengar</name>
<email>ssengar@linux.microsoft.com</email>
</author>
<published>2023-03-20T07:47:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a4fea9b78ebea6df9a61f34cfc2f7ed0bbc8a9fc'/>
<id>urn:sha1:a4fea9b78ebea6df9a61f34cfc2f7ed0bbc8a9fc</id>
<content type='text'>
Add a placeholder function for the hv_setup_stimer0_irq API to accommodate
systems without ACPI support. Since this function is not utilized on
x86/x64 systems and non-ACPI support is only intended for x86/x64 systems,
a placeholder function is sufficient for now and can be improved upon if
necessary in the future.

Signed-off-by: Saurabh Sengar &lt;ssengar@linux.microsoft.com&gt;
Reviewed-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Link: https://lore.kernel.org/r/1679298460-11855-2-git-send-email-ssengar@linux.microsoft.com
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
</content>
</entry>
<entry>
<title>clocksource: hyper-v: Add TSC page support for root partition</title>
<updated>2022-11-28T16:48:20Z</updated>
<author>
<name>Stanislav Kinsburskiy</name>
<email>stanislav.kinsburskiy@gmail.com</email>
</author>
<published>2022-11-04T20:40:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0408f16b43e578e70ad12a857159a0a771cfaa7c'/>
<id>urn:sha1:0408f16b43e578e70ad12a857159a0a771cfaa7c</id>
<content type='text'>
Microsoft Hypervisor root partition has to map the TSC page specified
by the hypervisor, instead of providing the page to the hypervisor like
it's done in the guest partitions.

However, it's too early to map the page when the clock is initialized, so, the
actual mapping is happening later.

Signed-off-by: Stanislav Kinsburskiy &lt;stanislav.kinsburskiy@gmail.com&gt;
CC: "K. Y. Srinivasan" &lt;kys@microsoft.com&gt;
CC: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
CC: Wei Liu &lt;wei.liu@kernel.org&gt;
CC: Dexuan Cui &lt;decui@microsoft.com&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Ingo Molnar &lt;mingo@redhat.com&gt;
CC: Borislav Petkov &lt;bp@alien8.de&gt;
CC: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
CC: x86@kernel.org
CC: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
CC: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
CC: linux-hyperv@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Reviewed-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Reviewed-by: Anirudh Rayabharam &lt;anrayabh@linux.microsoft.com&gt;
Link: https://lore.kernel.org/r/166759443644.385891.15921594265843430260.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
</content>
</entry>
<entry>
<title>clocksource: hyper-v: Use TSC PFN getter to map vvar page</title>
<updated>2022-11-28T16:48:20Z</updated>
<author>
<name>Stanislav Kinsburskiy</name>
<email>stanislav.kinsburskiy@gmail.com</email>
</author>
<published>2022-11-03T17:58:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=364adc45e9aff8cc08d7b87b6e61f6f272f70308'/>
<id>urn:sha1:364adc45e9aff8cc08d7b87b6e61f6f272f70308</id>
<content type='text'>
Instead of converting the virtual address to physical directly.

This is a precursor patch for the upcoming support for TSC page mapping into
Microsoft Hypervisor root partition, where TSC PFN will be defined by the
hypervisor and thus can't be obtained by linear translation of the physical
address.

Signed-off-by: Stanislav Kinsburskiy &lt;stanislav.kinsburskiy@gmail.com&gt;
CC: Andy Lutomirski &lt;luto@kernel.org&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Ingo Molnar &lt;mingo@redhat.com&gt;
CC: Borislav Petkov &lt;bp@alien8.de&gt;
CC: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
CC: x86@kernel.org
CC: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
CC: "K. Y. Srinivasan" &lt;kys@microsoft.com&gt;
CC: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
CC: Wei Liu &lt;wei.liu@kernel.org&gt;
CC: Dexuan Cui &lt;decui@microsoft.com&gt;
CC: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
CC: linux-kernel@vger.kernel.org
CC: linux-hyperv@vger.kernel.org
Reviewed-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Reviewed-by: Anirudh Rayabharam &lt;anrayabh@linux.microsoft.com&gt;
Link: https://lore.kernel.org/r/166749833939.218190.14095015146003109462.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
</content>
</entry>
<entry>
<title>clocksource: hyper-v: Introduce TSC PFN getter</title>
<updated>2022-11-28T16:48:20Z</updated>
<author>
<name>Stanislav Kinsburskiy</name>
<email>stanislav.kinsburskiy@gmail.com</email>
</author>
<published>2022-11-03T17:58:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e1f5c66db85fb3e0a17b803fc2e868e9c59c193a'/>
<id>urn:sha1:e1f5c66db85fb3e0a17b803fc2e868e9c59c193a</id>
<content type='text'>
And rework the code to use it instead of the physical address, which isn't
required by itself.

This is a cleanup and precursor patch for upcoming support for TSC page
mapping into Microsoft Hypervisor root partition, where TSC PFN will be
defined by the hypervisor and not by the kernel.

Signed-off-by: Stanislav Kinsburskiy &lt;stanislav.kinsburskiy@gmail.com&gt;
CC: "K. Y. Srinivasan" &lt;kys@microsoft.com&gt;
CC: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
CC: Wei Liu &lt;wei.liu@kernel.org&gt;
CC: Dexuan Cui &lt;decui@microsoft.com&gt;
CC: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: linux-hyperv@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Reviewed-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Reviewed-by: Anirudh Rayabharam &lt;anrayabh@linux.microsoft.com&gt;
Link: https://lore.kernel.org/r/166749833420.218190.2102763345349472395.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
</content>
</entry>
<entry>
<title>clocksource: hyper-v: Introduce a pointer to TSC page</title>
<updated>2022-11-28T16:48:20Z</updated>
<author>
<name>Stanislav Kinsburskiy</name>
<email>stanislav.kinsburskiy@gmail.com</email>
</author>
<published>2022-11-03T17:58:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=76be6331a81607359cb41ca20ec5388c68c855e3'/>
<id>urn:sha1:76be6331a81607359cb41ca20ec5388c68c855e3</id>
<content type='text'>
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 &lt;stanislav.kinsburskiy@gmail.com&gt;
CC: "K. Y. Srinivasan" &lt;kys@microsoft.com&gt;
CC: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
CC: Wei Liu &lt;wei.liu@kernel.org&gt;
CC: Dexuan Cui &lt;decui@microsoft.com&gt;
CC: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: linux-hyperv@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Reviewed-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Reviewed-by: Anirudh Rayabharam &lt;anrayabh@linux.microsoft.com&gt;
Link: https://lore.kernel.org/r/166749832893.218190.16503272948154953294.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/hyperv: add data structure for reference TSC MSR</title>
<updated>2022-11-03T15:50:28Z</updated>
<author>
<name>Anirudh Rayabharam</name>
<email>anrayabh@linux.microsoft.com</email>
</author>
<published>2022-10-27T09:57:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4ad1aa571214e8d6468a1806794d987b374b5a08'/>
<id>urn:sha1:4ad1aa571214e8d6468a1806794d987b374b5a08</id>
<content type='text'>
Add a data structure to represent the reference TSC MSR similar to
other MSRs. This simplifies the code for updating the MSR.

Signed-off-by: Anirudh Rayabharam &lt;anrayabh@linux.microsoft.com&gt;
Reviewed-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Link: https://lore.kernel.org/r/20221027095729.1676394-2-anrayabh@linux.microsoft.com
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
</content>
</entry>
<entry>
<title>clocksource: hyper-v: unexport __init-annotated hv_init_clocksource()</title>
<updated>2022-06-08T12:27:08Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2022-06-06T05:02:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=245b993d8f6c4e25f19191edfbd8080b645e12b1'/>
<id>urn:sha1:245b993d8f6c4e25f19191edfbd8080b645e12b1</id>
<content type='text'>
EXPORT_SYMBOL and __init is a bad combination because the .init.text
section is freed up after the initialization. Hence, modules cannot
use symbols annotated __init. The access to a freed symbol may end up
with kernel panic.

modpost used to detect it, but it has been broken for a decade.

Recently, I fixed modpost so it started to warn it again, then this
showed up in linux-next builds.

There are two ways to fix it:

  - Remove __init
  - Remove EXPORT_SYMBOL

I chose the latter for this case because the only in-tree call-site,
arch/x86/kernel/cpu/mshyperv.c is never compiled as modular.
(CONFIG_HYPERVISOR_GUEST is boolean)

Fixes: dd2cb348613b ("clocksource/drivers: Continue making Hyper-V clocksource ISA agnostic")
Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Reviewed-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Reviewed-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Link: https://lore.kernel.org/r/20220606050238.4162200-1-masahiroy@kernel.org
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers: hv: Decouple Hyper-V clock/timer code from VMbus drivers</title>
<updated>2021-07-19T09:24:28Z</updated>
<author>
<name>Michael Kelley</name>
<email>mikelley@microsoft.com</email>
</author>
<published>2021-07-14T00:01:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=31e5e64694cf9879e63b2802007fa934f4131126'/>
<id>urn:sha1:31e5e64694cf9879e63b2802007fa934f4131126</id>
<content type='text'>
Hyper-V clock/timer code in hyperv_timer.c is mostly independent from
other VMbus drivers, but building for ARM64 without hyperv_timer.c
shows some remaining entanglements.  A default implementation of
hv_read_reference_counter can just read a Hyper-V synthetic register
and be independent of hyperv_timer.c, so move this code out and into
hv_common.c. Then it can be used by the timesync driver even if
hyperv_timer.c isn't built on a particular architecture.  If
hyperv_timer.c *is* built, it can override with a faster implementation.

Also provide stubs for stimer functions called by the VMbus driver when
hyperv_timer.c isn't built.

No functional changes.

Signed-off-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Link: https://lore.kernel.org/r/1626220906-22629-1-git-send-email-mikelley@microsoft.com
Signed-off-by: Wei Liu &lt;wei.liu@kernel.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/hyper-v: Re-enable VDSO_CLOCKMODE_HVCLOCK on X86</title>
<updated>2021-05-14T12:55:13Z</updated>
<author>
<name>Vitaly Kuznetsov</name>
<email>vkuznets@redhat.com</email>
</author>
<published>2021-05-13T07:32:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3486d2c9be652a31033363bdd50391b0c8a8fe21'/>
<id>urn:sha1:3486d2c9be652a31033363bdd50391b0c8a8fe21</id>
<content type='text'>
Mohammed reports (https://bugzilla.kernel.org/show_bug.cgi?id=213029)
the commit e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO
differences inline") broke vDSO on x86. The problem appears to be that
VDSO_CLOCKMODE_HVCLOCK is an enum value in 'enum vdso_clock_mode' and
'#ifdef VDSO_CLOCKMODE_HVCLOCK' branch evaluates to false (it is not
a define).

Use a dedicated HAVE_VDSO_CLOCKMODE_HVCLOCK define instead.

Fixes: e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline")
Reported-by: Mohammed Gamal &lt;mgamal@redhat.com&gt;
Suggested-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Michael Kelley &lt;mikelley@microsoft.com&gt;
Link: https://lore.kernel.org/r/20210513073246.1715070-1-vkuznets@redhat.com

</content>
</entry>
</feed>
