]> Git Repo - linux.git/blobdiff - arch/powerpc/kvm/emulate.c
Documentation: admin-guide: PM: Add cpuidle document
[linux.git] / arch / powerpc / kvm / emulate.c
index fa888bfc347e6e6e10055cd7b2e36a6c5c4ecf2b..9f5b8c01c4e165a969d3317be6b5c5b9ae71b2f9 100644 (file)
@@ -61,11 +61,10 @@ void kvmppc_emulate_dec(struct kvm_vcpu *vcpu)
 
        dec_time = vcpu->arch.dec;
        /*
-        * Guest timebase ticks at the same frequency as host decrementer.
-        * So use the host decrementer calculations for decrementer emulation.
+        * Guest timebase ticks at the same frequency as host timebase.
+        * So use the host timebase calculations for decrementer emulation.
         */
-       dec_time = dec_time << decrementer_clockevent.shift;
-       do_div(dec_time, decrementer_clockevent.mult);
+       dec_time = tb_to_ns(dec_time);
        dec_nsec = do_div(dec_time, NSEC_PER_SEC);
        hrtimer_start(&vcpu->arch.dec_timer,
                ktime_set(dec_time, dec_nsec), HRTIMER_MODE_REL);
This page took 0.031991 seconds and 4 git commands to generate.