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]>
---
arch/x86/kvm/x86.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
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 *
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;
--
1.4.2
-------------------------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel