Merge branch 'kvm-updates/2.6.33' of git://git.kernel.org/pub/scm/virt/kvm/kvm

* 'kvm-updates/2.6.33' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: PIT: control word is write-only
kvmclock: count total_sleep_time when updating guest clock
Export the symbol of getboottime and mmonotonic_to_bootbased

+8 -4
+3
arch/x86/kvm/i8254.c
··· 467 467 return -EOPNOTSUPP; 468 468 469 469 addr &= KVM_PIT_CHANNEL_MASK; 470 + if (addr == 3) 471 + return 0; 472 + 470 473 s = &pit_state->channels[addr]; 471 474 472 475 mutex_lock(&pit_state->lock);
+3 -4
arch/x86/kvm/x86.c
··· 670 670 { 671 671 static int version; 672 672 struct pvclock_wall_clock wc; 673 - struct timespec now, sys, boot; 673 + struct timespec boot; 674 674 675 675 if (!wall_clock) 676 676 return; ··· 685 685 * wall clock specified here. guest system time equals host 686 686 * system time for us, thus we must fill in host boot time here. 687 687 */ 688 - now = current_kernel_time(); 689 - ktime_get_ts(&sys); 690 - boot = ns_to_timespec(timespec_to_ns(&now) - timespec_to_ns(&sys)); 688 + getboottime(&boot); 691 689 692 690 wc.sec = boot.tv_sec; 693 691 wc.nsec = boot.tv_nsec; ··· 760 762 local_irq_save(flags); 761 763 kvm_get_msr(v, MSR_IA32_TSC, &vcpu->hv_clock.tsc_timestamp); 762 764 ktime_get_ts(&ts); 765 + monotonic_to_bootbased(&ts); 763 766 local_irq_restore(flags); 764 767 765 768 /* With all the info we got, fill in the values */
+2
kernel/time/timekeeping.c
··· 880 880 881 881 set_normalized_timespec(ts, -boottime.tv_sec, -boottime.tv_nsec); 882 882 } 883 + EXPORT_SYMBOL_GPL(getboottime); 883 884 884 885 /** 885 886 * monotonic_to_bootbased - Convert the monotonic time to boot based. ··· 890 889 { 891 890 *ts = timespec_add_safe(*ts, total_sleep_time); 892 891 } 892 + EXPORT_SYMBOL_GPL(monotonic_to_bootbased); 893 893 894 894 unsigned long get_seconds(void) 895 895 {