From: "Jan Beulich" Subject: Re: [PATCH v2 06/10] hvm/hpet: comparator can only change when master clock is enabled. Date: Tue, 15 Apr 2014 08:05:08 +0100 Message-ID: <534CF6440200007800008CBF@nat28.tlf.novell.com> References: <1396967094-29484-1-git-send-email-dslutz@verizon.com> <1396967094-29484-7-git-send-email-dslutz@verizon.com> <534C15E902000078000088C4@nat28.tlf.novell.com> <534C3C1A.7090002@terremark.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <534C3C1A.7090002@terremark.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: Keir Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 14.04.14 at 21:50, wrote: > On 04/14/14 11:07, Jan Beulich wrote: >> As to the change - I'm not sure: The quoted description from the >> specification cal also be read to mean that interrupt generation is >> optional, but comparator increment will always happen. As long as >> this can't be clarified, I'd prefer to stay with the code as is. > > I think the code needs to change to match the spec. > > #define timer_enabled(h, n) (timer_config(h, n) & HPET_TN_ENABLE) > > vs > > #define hpet_enabled(h) (h->hpet.config & HPET_CFG_ENABLE) > > > The change uses hpet_enabled() (I.E. Overall Enable). Correct. But do we really need this? When the HPET is globally disabled, hpet_read_maincounter() returns a fixed value, and hence - due to the comparators not changing either - hpet_get_comparator() will too even without the addition. So if at all, the change would be mostly for documentation purposes. Jan