[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 8/8] x86/HPET: don't arbitrarily cap delta in reprogram_hpet_evt_channel()


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 22 Jan 2026 12:29:08 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7gcUJCYdFH8VVWljgHuoSQiTwCh92/y7kYgFfRNKOUM=; b=oWANhRousfD1bXbYwqAyLdPvpgfKkfFYTj0VFwCIgDh8qjEGuM3lLI+UvXdmuh/bMYGCJyLaWVOeFp52kDDclsHvinOztIkn60GmR9lnLneI4RRV15ndUqyDf3FVe2PwqauZnNi587pF2FyJWtIsmxm+FaZaRI2zGJxHBjkLVpySG92euF/OJtAhUD3aXvRMC1bJkP19BxDFeJV8K0OL5ClIXxcIHSIRE/TZs6Ry08rZWYU4gJoRNkxX0RBNz1ZqTmaJe/glQjn2PG2lmwEvKHhG8rIico/LEZFtj+l1B5F5N+l21QV607Bskspd29XooVzrbjZzfAN+r4G24Vci+g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kc8+4HGUOO8oapIS8Ms7+vpARSYiAD7gpv0mmVAq3em2po27h7z85uF0B0gDYXwzsE3mKDg3MCkFfn1eP5LhDgkUV0oLWpdEdX8MU5Pp39YHX/SdyF5WHVcLUm1bg3aOcphS88jsv4q85YYexfG8ibC5qfmbPEYuhf4xw/jJpZIlmKbwFvVkB4nnSrGQ5urvul/K6dLmYc+zQN7/P20IAfk9Drav6m1lhXOjgAUwDC3jftlZDpumXVd2HVf7XIY2cfSaE9Xp0lJ65Ws3MuAMjdk5bPS1ENO2hVYFjGfMDLV6eJdSS+AGIkoygEZLhF91BRlX+zT9UabzgMhTQGRkMA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Thu, 22 Jan 2026 11:29:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Jan 22, 2026 at 11:35:06AM +0100, Jan Beulich wrote:
> On 22.01.2026 11:23, Roger Pau Monné wrote:
> > On Mon, Nov 17, 2025 at 03:40:08PM +0100, Jan Beulich wrote:
> >> @@ -162,10 +161,15 @@ static int reprogram_hpet_evt_channel(
> >>  
> >>      ch->next_event = expire;
> >>  
> >> -    delta = min_t(int64_t, delta, MAX_DELTA_NS);
> >>      delta = max_t(int64_t, delta, MIN_DELTA_NS);
> >>      delta = ns2ticks(delta, ch->shift, ch->mult);
> >>  
> >> +    if ( delta > UINT32_MAX )
> >> +    {
> >> +        hpet_write32(hpet_read32(HPET_COUNTER), HPET_Tn_CMP(ch->idx));
> > 
> > Should Xen disable interrupts around this call to avoid unexpected
> > latency between the counter read and the comparator write?
> 
> Such latency could then still arise, due NMI or SMI. What's your underlying
> concern here?

For NMI or SMI there isn't much we can do.  I guess this is much less
of a concern here than it is in hpet_next_event(), given the next
event is expected to be after a full HPET counter period.  One of
those events taking a full HPET counter period overlap would make a
lot of others things explode.

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.