Displaying 20 results from an estimated 48 matches for "tsc_khz".
2016 Oct 27
0
[RESEND PATCH 1/3] x86/vmware: Use tsc_khz value for calibrate_cpu()
On Thu, 27 Oct 2016, Alexey Makhalov wrote:
> [RESEND PATCH 1/3] x86/vmware: Use tsc_khz value for calibrate_cpu()
Please don't do that. RESEND is a keyword, when the same patch (series) is
sent again without any modification vs. the first patch (series). A
possible reason to do so is when a patch (series) fell through the cracks
and the author wants to bring it to attention again...
2016 Oct 27
5
[RESEND PATCH 1/3] x86/vmware: Use tsc_khz value for calibrate_cpu()
After aa297292d708, there are separate native calibrations for cpu_khz and
tsc_khz. The code sets x86_platform.calibrate_cpu to native_calibrate_cpu()
which looks in cpuid leaf 0x16 or msrs for the cpu frequency. Since we keep
the tsc_khz constant (even after vmotion), the cpu_khz and tsc_khz may
start diverging.
tsc_init() now does
cpu_khz = x86_platform.calibrate_cpu();
tsc...
2016 Oct 27
5
[RESEND PATCH 1/3] x86/vmware: Use tsc_khz value for calibrate_cpu()
After aa297292d708, there are separate native calibrations for cpu_khz and
tsc_khz. The code sets x86_platform.calibrate_cpu to native_calibrate_cpu()
which looks in cpuid leaf 0x16 or msrs for the cpu frequency. Since we keep
the tsc_khz constant (even after vmotion), the cpu_khz and tsc_khz may
start diverging.
tsc_init() now does
cpu_khz = x86_platform.calibrate_cpu();
tsc...
2007 Jul 03
2
[PATCH 1/2] lguest: handle dodgy/non-existent TSC. Host code.
...====================
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -332,14 +332,6 @@ int run_guest(struct lguest *lg, unsigne
continue;
}
- /* If the Guest hasn't been told the clock multiplier to use or
- * it's changed, we update it here. */
- if (unlikely(lg->tsc_khz != tsc_khz) && lg->lguest_data) {
- lg->tsc_khz = tsc_khz;
- if (put_user(lg->tsc_khz, &lg->lguest_data->tsc_khz))
- return -EFAULT;
- }
-
local_irq_disable();
/* Even if *we* don't want FPU trap, guest might... */
=====================================...
2007 Jul 03
2
[PATCH 1/2] lguest: handle dodgy/non-existent TSC. Host code.
...====================
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -332,14 +332,6 @@ int run_guest(struct lguest *lg, unsigne
continue;
}
- /* If the Guest hasn't been told the clock multiplier to use or
- * it's changed, we update it here. */
- if (unlikely(lg->tsc_khz != tsc_khz) && lg->lguest_data) {
- lg->tsc_khz = tsc_khz;
- if (put_user(lg->tsc_khz, &lg->lguest_data->tsc_khz))
- return -EFAULT;
- }
-
local_irq_disable();
/* Even if *we* don't want FPU trap, guest might... */
=====================================...
2016 Oct 20
0
[PATCH] x86/vmware: Read tsc_khz only once - at boot time
...x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 5130985..46c7b9d 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -48,6 +48,8 @@
"2"(VMWARE_HYPERVISOR_PORT), "3"(UINT_MAX) : \
"memory");
+static unsigned long vmware_tsc_khz __ro_after_init;
+
static inline int __vmware_platform(void)
{
uint32_t eax, ebx, ecx, edx;
@@ -57,35 +59,32 @@ static inline int __vmware_platform(void)
static unsigned long vmware_get_tsc_khz(void)
{
- uint64_t tsc_hz, lpj;
- uint32_t eax, ebx, ecx, edx;
-
- VMWARE_PORT(GETHZ, eax, ebx, e...
2016 Oct 20
0
[PATCH] x86/vmware: Read tsc_khz only once - at boot time
...x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 5130985..46c7b9d 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -48,6 +48,8 @@
"2"(VMWARE_HYPERVISOR_PORT), "3"(UINT_MAX) : \
"memory");
+static unsigned long vmware_tsc_khz __ro_after_init;
+
static inline int __vmware_platform(void)
{
uint32_t eax, ebx, ecx, edx;
@@ -57,35 +59,32 @@ static inline int __vmware_platform(void)
static unsigned long vmware_get_tsc_khz(void)
{
- uint64_t tsc_hz, lpj;
- uint32_t eax, ebx, ecx, edx;
-
- VMWARE_PORT(GETHZ, eax, ebx, e...
2016 Oct 26
2
[PATCH 2/3] x86/vmware: Add basic paravirt ops support
...+++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
> index 480790f..e3fb320 100644
> --- a/arch/x86/kernel/cpu/vmware.c
> +++ b/arch/x86/kernel/cpu/vmware.c
> @@ -61,6 +61,16 @@ static unsigned long vmware_get_tsc_khz(void)
> return vmware_tsc_khz;
> }
>
> +#ifdef CONFIG_PARAVIRT
> +static void __init vmware_paravirt_ops_setup(void)
> +{
> + pv_info.name = "VMware";
> + pv_cpu_ops.io_delay = paravirt_nop;
> +}
> +#else
> +#define vmware_paravirt_ops_setup() do {} w...
2016 Oct 26
2
[PATCH 2/3] x86/vmware: Add basic paravirt ops support
...+++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
> index 480790f..e3fb320 100644
> --- a/arch/x86/kernel/cpu/vmware.c
> +++ b/arch/x86/kernel/cpu/vmware.c
> @@ -61,6 +61,16 @@ static unsigned long vmware_get_tsc_khz(void)
> return vmware_tsc_khz;
> }
>
> +#ifdef CONFIG_PARAVIRT
> +static void __init vmware_paravirt_ops_setup(void)
> +{
> + pv_info.name = "VMware";
> + pv_cpu_ops.io_delay = paravirt_nop;
> +}
> +#else
> +#define vmware_paravirt_ops_setup() do {} w...
2016 Oct 26
5
[PATCH 0/3] x86/vmware guest improvements
This patchset includes several VMware guest improvements:
Alexey Makhalov (3):
x86/vmware: Use tsc_khz value for calibrate_cpu()
x86/vmware: Add basic paravirt ops support
x86/vmware: Add paravirt sched clock
Documentation/kernel-parameters.txt | 4 +++
arch/x86/kernel/cpu/vmware.c | 51 +++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
--
2.10.1
2016 Oct 26
5
[PATCH 0/3] x86/vmware guest improvements
This patchset includes several VMware guest improvements:
Alexey Makhalov (3):
x86/vmware: Use tsc_khz value for calibrate_cpu()
x86/vmware: Add basic paravirt ops support
x86/vmware: Add paravirt sched clock
Documentation/kernel-parameters.txt | 4 +++
arch/x86/kernel/cpu/vmware.c | 51 +++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
--
2.10.1
2008 Jul 22
6
[PATCH 0/2] Paravirt loops per jiffy calculation
...in our pvclock structures,
as part of the xen compatibility efforts.
So the first patch moves the respective xen code to pvclock.c (since
we'll be doing the same calculation anyway), while the second, implements
functions for kvm that makes use of it.
Turns out that only implementing a pv get_tsc_khz is not enough, since
it will only do the right thing for cpu0, which is not what we desire.
So we set preset_lpj. Recall this code is run before arch parameter setup,
so if we pass lpj=xx in the command line, it'll still work.
Have a good (paravirtual) time!
2008 Jul 22
6
[PATCH 0/2] Paravirt loops per jiffy calculation
...in our pvclock structures,
as part of the xen compatibility efforts.
So the first patch moves the respective xen code to pvclock.c (since
we'll be doing the same calculation anyway), while the second, implements
functions for kvm that makes use of it.
Turns out that only implementing a pv get_tsc_khz is not enough, since
it will only do the right thing for cpu0, which is not what we desire.
So we set preset_lpj. Recall this code is run before arch parameter setup,
so if we pass lpj=xx in the command line, it'll still work.
Have a good (paravirtual) time!
2016 Oct 28
3
[PATCH v3 0/3] x86/vmware guest improvements
...for the valuable comments.
Changelog for the updated patchset:
v1->v2 - Update pvinfo.name.
v2->v3 - Address comments from Thomas G,
* Created separate function: vmware_sched_clock_setup() (patch 3/3)
* Updated commit descriptions for 1/3 and 3/3
Alexey Makhalov (3):
x86/vmware: Use tsc_khz value for calibrate_cpu()
x86/vmware: Add basic paravirt ops support
x86/vmware: Add paravirt sched clock
Documentation/kernel-parameters.txt | 4 +++
arch/x86/kernel/cpu/vmware.c | 55 +++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+)
--
2.10.1
2016 Oct 28
3
[PATCH v3 0/3] x86/vmware guest improvements
...for the valuable comments.
Changelog for the updated patchset:
v1->v2 - Update pvinfo.name.
v2->v3 - Address comments from Thomas G,
* Created separate function: vmware_sched_clock_setup() (patch 3/3)
* Updated commit descriptions for 1/3 and 3/3
Alexey Makhalov (3):
x86/vmware: Use tsc_khz value for calibrate_cpu()
x86/vmware: Add basic paravirt ops support
x86/vmware: Add paravirt sched clock
Documentation/kernel-parameters.txt | 4 +++
arch/x86/kernel/cpu/vmware.c | 55 +++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+)
--
2.10.1
2008 May 16
5
[PATCH 0/4] paravirt clock source patches, #3
paravirt clock source patches, next round, with a bunch of changes
in the host code according to Avi's review comments and some minor
code tweaks.
cheers,
Gerd
2008 May 16
5
[PATCH 0/4] paravirt clock source patches, #3
paravirt clock source patches, next round, with a bunch of changes
in the host code according to Avi's review comments and some minor
code tweaks.
cheers,
Gerd
2007 Jul 22
0
[PATCH] Fix lguest clock when jiffies not available
...+1000
@@ -345,15 +345,24 @@ static void __init lguest_init_IRQ(void)
static unsigned long lguest_get_wallclock(void)
{
- return hcall(LHCALL_GET_WALLCLOCK, 0, 0, 0);
+ return lguest_data.time.tv_sec;
}
static cycle_t lguest_clock_read(void)
{
+ unsigned long sec, nsec;
+
if (lguest_data.tsc_khz)
return native_read_tsc();
- else
- return jiffies;
+
+ /* Standard loop to make sure we get matching seconds & nanoseconds */
+ do {
+ sec = lguest_data.time.tv_sec;
+ rmb();
+ nsec = lguest_data.time.tv_nsec;
+ rmb();
+ } while (unlikely(lguest_data.time.tv_sec != sec));
+ return sec*...
2007 Jul 22
0
[PATCH] Fix lguest clock when jiffies not available
...+1000
@@ -345,15 +345,24 @@ static void __init lguest_init_IRQ(void)
static unsigned long lguest_get_wallclock(void)
{
- return hcall(LHCALL_GET_WALLCLOCK, 0, 0, 0);
+ return lguest_data.time.tv_sec;
}
static cycle_t lguest_clock_read(void)
{
+ unsigned long sec, nsec;
+
if (lguest_data.tsc_khz)
return native_read_tsc();
- else
- return jiffies;
+
+ /* Standard loop to make sure we get matching seconds & nanoseconds */
+ do {
+ sec = lguest_data.time.tv_sec;
+ rmb();
+ nsec = lguest_data.time.tv_nsec;
+ rmb();
+ } while (unlikely(lguest_data.time.tv_sec != sec));
+ return sec*...
2008 Jun 03
6
[PATCH 0/5] paravirt clock source patches, #5
paravirt clock source patches, next round.
There is now a pvclock-abi.h file with the structs and some longish
comments in it and everybody is switched over to use the stuff in
there.
Some minor tweaks after super-fast review by Jeremy.
The queue is on top of the kvm git tree. The first two patches should
have no kvm dependencies and should apply to linus tree just fine.
cheers,
Gerd