aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/vpt.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-06-24 10:48:21 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-06-24 10:48:21 +0100
commit448dac02973ea594c7d5a9ba31da3b6e3ae1ef2d (patch)
tree529e08837d6790332110b42e1d44895f2688aad9 /xen/arch/x86/hvm/vpt.c
parent46303e409518cb9192a7cdd33e2b305e9b4c0e5c (diff)
downloadxen-448dac02973ea594c7d5a9ba31da3b6e3ae1ef2d.tar.gz
xen-448dac02973ea594c7d5a9ba31da3b6e3ae1ef2d.tar.bz2
xen-448dac02973ea594c7d5a9ba31da3b6e3ae1ef2d.zip
save/restore : Save guest's preferred TSC frequency in image
For save/restore or live migration between two different frequency platforms, guest's preferred TSC frequency is required to caculate guest's TSC after resotre, so save it in the image header. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Diffstat (limited to 'xen/arch/x86/hvm/vpt.c')
-rw-r--r--xen/arch/x86/hvm/vpt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c
index 929d4cf57d..071ef14517 100644
--- a/xen/arch/x86/hvm/vpt.c
+++ b/xen/arch/x86/hvm/vpt.c
@@ -32,6 +32,8 @@ void hvm_init_guest_time(struct domain *d)
spin_lock_init(&pl->pl_time_lock);
pl->stime_offset = -(u64)get_s_time();
pl->last_guest_time = 0;
+
+ d->arch.hvm_domain.gtsc_khz = cpu_khz;
}
u64 hvm_get_guest_time(struct vcpu *v)