diff options
author | Glauber Costa <glommer@redhat.com> | 2010-05-11 16:17:45 (GMT) |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-19 08:41:05 (GMT) |
commit | 3a0d7256a6fb8c13f9fac6cd63250f97a8f0d8de (patch) | |
tree | 27a710b0f7e54c243382d47c290061699d0e755c /arch/x86/kernel/pvclock.c | |
parent | 838815a78785022f6611e5c48386567aea7b818b (diff) | |
download | linux-fsl-qoriq-3a0d7256a6fb8c13f9fac6cd63250f97a8f0d8de.tar.xz |
x86, paravirt: don't compute pvclock adjustments if we trust the tsc
If the HV told us we can fully trust the TSC, skip any
correction
Signed-off-by: Glauber Costa <glommer@redhat.com>
Acked-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kernel/pvclock.c')
-rw-r--r-- | arch/x86/kernel/pvclock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c index f5bc40e1..239427c 100644 --- a/arch/x86/kernel/pvclock.c +++ b/arch/x86/kernel/pvclock.c @@ -135,6 +135,10 @@ cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src) barrier(); } while (version != src->version); + if ((valid_flags & PVCLOCK_TSC_STABLE_BIT) && + (shadow.flags & PVCLOCK_TSC_STABLE_BIT)) + return ret; + /* * Assumption here is that last_value, a global accumulator, always goes * forward. If we are less than that, we should not be much smaller. |