From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>, xen-devel@lists.xenproject.org
Cc: Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH 1/2] x86/irq: fix calculation of max PV dom0 pIRQs
Date: Wed, 20 Nov 2024 12:06:46 +0000 [thread overview]
Message-ID: <b9772a66-ee5f-4cfc-ae55-8d53788f8456@citrix.com> (raw)
In-Reply-To: <20241120113555.38146-2-roger.pau@citrix.com>
On 20/11/2024 11:35 am, Roger Pau Monne wrote:
> The current calculation of PV dom0 pIRQs uses:
>
> n = min(fls(num_present_cpus()), dom0_max_vcpus());
>
> The usage of fls() is wrong, as num_present_cpus() already returns the number
> of present CPUs, not the bitmap mask of CPUs.
>
> Fix by removing the usage of fls().
>
> Fixes: 7e73a6e7f12a ('have architectures specify the number of PIRQs a hardware domain gets')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Yeah, that fls() fails the dimensional analysis sniff test.
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Is there any hint as to what the reasoning was?
~Andrew
next prev parent reply other threads:[~2024-11-20 12:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 11:35 [PATCH 0/2] x86/irq: fix calculation of maximum pIRQs for dom0 Roger Pau Monne
2024-11-20 11:35 ` [PATCH 1/2] x86/irq: fix calculation of max PV dom0 pIRQs Roger Pau Monne
2024-11-20 12:06 ` Andrew Cooper [this message]
2024-11-21 10:49 ` Jan Beulich
2024-11-21 11:04 ` Roger Pau Monné
2024-11-21 11:39 ` Jan Beulich
2024-11-22 8:01 ` Roger Pau Monné
2024-11-22 9:27 ` Jan Beulich
2024-11-20 11:35 ` [PATCH 2/2] x86/pvh: also print hardware domain pIRQ limit for PVH Roger Pau Monne
2024-11-20 11:45 ` Andrew Cooper
2024-11-21 10:54 ` Jan Beulich
2024-11-21 11:08 ` Roger Pau Monné
2024-11-21 11:14 ` Andrew Cooper
2024-11-21 11:24 ` Roger Pau Monné
2024-11-21 11:27 ` Jan Beulich
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=b9772a66-ee5f-4cfc-ae55-8d53788f8456@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.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 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.