qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jim MacArthur <jim.macarthur@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] hw/dma/omap_dma.c: Use 64 bit maths for omap_dma_transfer_setup
Date: Fri, 5 Dec 2025 15:10:27 +0000	[thread overview]
Message-ID: <4df48949-bf78-4169-b72f-8871d31a66da@linaro.org> (raw)
In-Reply-To: <CAFEAcA_s2fDnr6PQfvjjYT_wnmMg1YUw=tVY5SnM2-QrDAh68A@mail.gmail.com>

On 12/5/25 10:33, Peter Maydell wrote:
> On Thu, 4 Dec 2025 at 19:34, Jim MacArthur <jim.macarthur@linaro.org> wrote:
>> If both frame and element count are 65535, which appears valid from my
>> reading of the OMAP5912 documentation, then some of the calculations
>> will overflow the 32-bit signed integer range and produce a negative
>> min_elems value.
>>
>> Raised by #3204 (https://gitlab.com/qemu-project/qemu/-/issues/3204).
> The real hardware is surely not doing 64-bit arithmetic though.
> It's presumably working with elements * frames as unsigned 32 bit
> multiplication.
>
> -- PMM

I agree it's unlikely that the hardware would use 64 bit maths, but 
without any spec (that I've found so far) or real hardware to test on, I 
can't be sure what the expected behaviour is.

If we think that uint32_t is a more likely situation than the current 
`int` then I'm happy to change it to that.

Jim



      reply	other threads:[~2025-12-05 15:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04 19:33 [PATCH] hw/dma/omap_dma.c: Use 64 bit maths for omap_dma_transfer_setup Jim MacArthur
2025-12-04 21:33 ` Alex Bennée
2025-12-05 15:57   ` Philippe Mathieu-Daudé
2025-12-05 16:10     ` Jim MacArthur
2025-12-05 16:20       ` Peter Maydell
2025-12-05 16:36         ` Jim MacArthur
2025-12-05 10:33 ` Peter Maydell
2025-12-05 15:10   ` Jim MacArthur [this message]

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=4df48949-bf78-4169-b72f-8871d31a66da@linaro.org \
    --to=jim.macarthur@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).