From: "Jan Beulich" Subject: Re: [PATCH v3 11/11] hvm/hpet: handle 1st period special Date: Fri, 25 Apr 2014 13:32:37 +0100 Message-ID: <535A7205020000780000C510@nat28.tlf.novell.com> References: <1397756585-27091-1-git-send-email-dslutz@verizon.com> <1397756585-27091-12-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: <1397756585-27091-12-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: Keir Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 17.04.14 at 19:43, wrote: > v3: > Better commit message. > More setting of first_mc64 & first_enabled when needed. > Switch to bool_t. > > xen/arch/x86/hvm/hpet.c | 83 ++++++++++++++++++++++++++++++++++++------- > xen/include/asm-x86/hvm/vpt.h | 2 ++ > 2 files changed, 73 insertions(+), 12 deletions(-) I still can't help myself thinking that this must be achievable with less special casing - I just can't imagine that hardware also has this huge an amount of special case logic just for the first period. > @@ -208,12 +216,18 @@ static void hpet_stop_timer(HPETState *h, unsigned int tn, > * 1/(2^10) second, namely, 0.9765625 milliseconds */ > #define HPET_TINY_TIME_SPAN ((h->stime_freq >> 10) / STIME_PER_HPET_TICK) > > +static void hpet_time_fired(struct vcpu *v, void *priv) > +{ > + bool_t *first_enabled_p = (bool_t *)priv; Pointless cast. Jan