mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
x86/irq: fix calculation of max PV dom0 pIRQs
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:7e73a6e7f1('have architectures specify the number of PIRQs a hardware domain gets') Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> master commit:5c56361c61master date: 2024-11-25 11:33:06 +0100
This commit is contained in:
1 parent
6a0ef94a8f
commit
755b136aa4
1 file changed
+1
-1
@@ -2727,7 +2727,7 @@ void __init ioapic_init(void)
|
||||
|
||||
unsigned int __hwdom_init arch_hwdom_irqs(const struct domain *d)
|
||||
{
|
||||
unsigned int n = fls(num_present_cpus());
|
||||
unsigned int n = num_present_cpus();
|
||||
/* Bounding by the domain pirq EOI bitmap capacity. */
|
||||
const unsigned int max_irqs = min_t(unsigned int, nr_irqs,
|
||||
PAGE_SIZE * BITS_PER_BYTE);
|
||||
|
||||