From: Glauber Costa <[EMAIL PROTECTED]> If the calling cpu rewrites the system clock msr for any reason, release the page we allocated in the last time.
Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index e65a9d6..6abd784 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -588,6 +588,9 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data) kvm_write_wall_clock(vcpu->kvm, data); break; case MSR_KVM_SYSTEM_TIME: { + if (vcpu->arch.time_page) + kvm_release_page_dirty(vcpu->arch.time_page); + vcpu->arch.time = data & PAGE_MASK; vcpu->arch.time_offset = data & ~PAGE_MASK; ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits