hvm/hpet: Init comparator64 like comparator.
authorDon Slutz <dslutz@verizon.com>
Fri, 2 May 2014 20:18:05 +0000 (16:18 -0400)
committerTim Deegan <tim@xen.org>
Thu, 8 May 2014 11:03:53 +0000 (12:03 +0100)
The software-developers-hpet-spec-1-0a.pdf says that the comparator
starts as all 1's.  Also make the hidden register comparator64 the same.

Since only the hidden register comparator64 is used by hpet_save, it
needs to start out with the right value.

A disabled hpet (like when a guest is starting), should start with
the value the spec says.  Both the guest (via reading the
comparator) and an administrator using xen-hvmctx, will see all 0's
not all 1's.

Signed-off-by: Don Slutz <dslutz@verizon.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/hvm/hpet.c

index b6113041cda27f381f919b4c03382d10c5e94a01..741fb7ae9d75a3fea1d62b63bde5ac3522e85b67 100644 (file)
@@ -636,6 +636,7 @@ void hpet_init(struct vcpu *v)
         h->hpet.timers[i].config =
             HPET_TN_INT_ROUTE_CAP | HPET_TN_64BIT_CAP | HPET_TN_PERIODIC_CAP;
         h->hpet.timers[i].cmp = ~0ULL;
+        h->hpet.comparator64[i] = ~0ULL;
         h->pt[i].source = PTSRC_isa;
     }
 }