mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
ppc/xive: Fix ESB length overflow on 32-bit hosts
The length of this region can be > 32-bits, which overflows size_t on 32-bit hosts. Change to uint64_t. Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
This commit is contained in:
parent
889c5c4c7a
commit
07f2770503
3 changed files with 4 additions and 4 deletions
|
@ -218,7 +218,7 @@ static inline bool xive_source_esb_has_2page(XiveSource *xsrc)
|
|||
xsrc->esb_shift == XIVE_ESB_4K_2PAGE;
|
||||
}
|
||||
|
||||
static inline size_t xive_source_esb_len(XiveSource *xsrc)
|
||||
static inline uint64_t xive_source_esb_len(XiveSource *xsrc)
|
||||
{
|
||||
return (1ull << xsrc->esb_shift) * xsrc->nr_irqs;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue