mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
hvm/hpet: In hpet_save, correctly compute mc64.
When the master clock is not enabled, mc64 has the right value. Basicly do the same thing as hpet_read_maincounter(). Signed-off-by: Don Slutz <dslutz@verizon.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: Tim Deegan <tim@xen.org>
This commit is contained in:
1 parent
825e70b1ec
commit
f06ffcd4a6
1 file changed
+2
-1
@@ -499,7 +499,8 @@ static int hpet_save(struct domain *d, hvm_domain_context_t *h)
|
||||
spin_lock(&hp->lock);
|
||||
|
||||
/* Write the proper value into the main counter */
|
||||
hp->hpet.mc64 = hp->mc_offset + guest_time_hpet(hp);
|
||||
if ( hpet_enabled(hp) )
|
||||
hp->hpet.mc64 = hp->mc_offset + guest_time_hpet(hp);
|
||||
|
||||
/* Save the HPET registers */
|
||||
rc = _hvm_init_entry(h, HVM_SAVE_CODE(HPET), 0, HVM_SAVE_LENGTH(HPET));
|
||||
|
||||