Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215797
b: refs/heads/master
c: 217fc9c
h: refs/heads/master
i:
  215795: dd8d629
v: v3
  • Loading branch information
Avi Kivity committed Oct 24, 2010
1 parent 944769e commit ae6b74c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 34d1f4905eb66478a890ea808ec58bc842e6e589
refs/heads/master: 217fc9cfca21a0bc2f4246183ebd8ee9863b019d
7 changes: 6 additions & 1 deletion trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include <asm/i387.h>
#include <asm/xcr.h>
#include <asm/pvclock.h>
#include <asm/div64.h>

#define MAX_IO_MSRS 256
#define CR0_RESERVED_BITS \
Expand Down Expand Up @@ -917,11 +918,15 @@ static inline int kvm_tsc_changes_freq(void)

static inline u64 nsec_to_cycles(u64 nsec)
{
u64 ret;

WARN_ON(preemptible());
if (kvm_tsc_changes_freq())
printk_once(KERN_WARNING
"kvm: unreliable cycle conversion on adjustable rate TSC\n");
return (nsec * __get_cpu_var(cpu_tsc_khz)) / USEC_PER_SEC;
ret = nsec * __get_cpu_var(cpu_tsc_khz);
do_div(ret, USEC_PER_SEC);
return ret;
}

void kvm_write_tsc(struct kvm_vcpu *vcpu, u64 data)
Expand Down

0 comments on commit ae6b74c

Please sign in to comment.