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