All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Neowutran <xen@neowutran.ovh>
Cc: xen-devel@lists.xenproject.org,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	"Elliott Mitchell" <ehem+xen@m5p.com>
Subject: Re: [PATCH v2] Bug fix - Integer overflow when cpu frequency > u32 max value.
Date: Mon, 19 Dec 2022 09:00:17 +0100	[thread overview]
Message-ID: <be1e0ba4-cd88-330a-aad4-2ffc14b075a6@suse.com> (raw)
In-Reply-To: <Y5+KgBxxmlYfq7e2@mattapan.m5p.com>

On 18.12.2022 22:47, Elliott Mitchell wrote:
> On Sun, Dec 18, 2022 at 01:14:07PM +0100, Neowutran wrote:
>> xen/x86: prevent overflow with high frequency TSCs
>>
>> Promote tsc_khz to a 64-bit type before multiplying by 1000 to avoid a
>> 'overflow before widen' bug.
>> Otherwise just above 4.294GHz the value will overflow.
>> Processors with clocks this high are now in production and require this to work
>> correctly.
>>
>> Signed-off-by: Neowutran <xen@neowutran.ovh>
> 
> Needing a bit of word-wrapping, but that can be adjusted during commit to
> the Xen tree.

Right - also the first line of the body really wants to be the title.
I'd be happy to make edits while committing, but as said in reply to
v1 I also would prefer to suffix the literal "1000" instead of adding
a cast. I'd also be happy to make that adjustment (including to the
description), but I'd prefer to do so with your agreement.

Jan


  reply	other threads:[~2022-12-19  8:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-18 12:14 [PATCH v2] Bug fix - Integer overflow when cpu frequency > u32 max value Neowutran
2022-12-18 21:47 ` Elliott Mitchell
2022-12-19  8:00   ` Jan Beulich [this message]
2022-12-19  8:55     ` Neowutran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be1e0ba4-cd88-330a-aad4-2ffc14b075a6@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ehem+xen@m5p.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xen@neowutran.ovh \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.