From: "Jan Beulich" Subject: Re: [PATCH v4 07/10] hvm/hpet: Init comparator64 like comparator. Date: Mon, 05 May 2014 08:55:27 +0100 Message-ID: <5367600F020000780000EDB9@mail.emea.novell.com> References: <1399061888-25756-1-git-send-email-dslutz@verizon.com> <1399061888-25756-8-git-send-email-dslutz@verizon.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1399061888-25756-8-git-send-email-dslutz@verizon.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Don Slutz Cc: Tim Deegan , Keir Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 02.05.14 at 22:18, wrote: > 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 Acked-by: Jan Beulich > --- > v4: > Added paragraph starting "A disabled hpet" to commit message. > > xen/arch/x86/hvm/hpet.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/xen/arch/x86/hvm/hpet.c b/xen/arch/x86/hvm/hpet.c > index b611304..741fb7a 100644 > --- a/xen/arch/x86/hvm/hpet.c > +++ b/xen/arch/x86/hvm/hpet.c > @@ -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; > } > } > -- > 1.8.4