[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] ppc/pnv: Fix variable size in pnv_psi_power
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] ppc/pnv: Fix variable size in pnv_psi_power9_irq_set() |
Date: |
Wed, 13 Mar 2019 16:19:23 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 3/13/19 3:54 PM, Greg Kurz wrote:
> PSI registers are 64-bit.
>
> Spotted by Coverity: CID 1399704
>
> Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Thanks,
C.
> ---
> hw/ppc/pnv_psi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
> index 5a923e41518d..5345c8389e57 100644
> --- a/hw/ppc/pnv_psi.c
> +++ b/hw/ppc/pnv_psi.c
> @@ -786,7 +786,7 @@ static const MemoryRegionOps pnv_psi_p9_xscom_ops = {
>
> static void pnv_psi_power9_irq_set(PnvPsi *psi, int irq, bool state)
> {
> - uint32_t irq_method = psi->regs[PSIHB_REG(PSIHB9_INTERRUPT_CONTROL)];
> + uint64_t irq_method = psi->regs[PSIHB_REG(PSIHB9_INTERRUPT_CONTROL)];
>
> if (irq > PSIHB9_NUM_IRQS) {
> qemu_log_mask(LOG_GUEST_ERROR, "PSI: Unsupported irq %d\n", irq);
>