[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/67] ppc/pnv: Fix LPC POWER8 register sanity check
From: |
Nicholas Piggin |
Subject: |
[PULL 04/67] ppc/pnv: Fix LPC POWER8 register sanity check |
Date: |
Mon, 4 Nov 2024 10:17:53 +1000 |
POWER8 does not have the ISA IRQ -> SERIRQ routing system of later
CPUs, instead all ISA IRQs are sent to the CPU via a single PSI
interrupt. There is a sanity check in the POWER8 case to ensure the
routing bits have not been set, because that would indicate a
programming error.
Those bits were incorrectly specified because of ppc bit numbering
fun. Coverity detected this as an always-zero expression.
Cc: qemu-stable@nongnu.org
Reported-by: Cédric Le Goater <clg@redhat.com>
Resolves: Coverity CID 1558829 (partially)
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
hw/ppc/pnv_lpc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c
index 80b79dfbbc..8c203d2059 100644
--- a/hw/ppc/pnv_lpc.c
+++ b/hw/ppc/pnv_lpc.c
@@ -427,8 +427,8 @@ static void pnv_lpc_eval_serirq_routes(PnvLpcController
*lpc)
int irq;
if (!lpc->psi_has_serirq) {
- if ((lpc->opb_irq_route0 & PPC_BITMASK(8, 13)) ||
- (lpc->opb_irq_route1 & PPC_BITMASK(4, 31))) {
+ if ((lpc->opb_irq_route0 & PPC_BITMASK32(8, 13)) ||
+ (lpc->opb_irq_route1 & PPC_BITMASK32(4, 31))) {
qemu_log_mask(LOG_GUEST_ERROR,
"OPB: setting serirq routing on POWER8 system, ignoring.\n");
}
--
2.45.2
- [PULL 00/67] ppc-for-9.2-1 queue, Nicholas Piggin, 2024/11/03
- [PULL 03/67] ppc/pnv: Fix LPC serirq routing calculation, Nicholas Piggin, 2024/11/03
- [PULL 04/67] ppc/pnv: Fix LPC POWER8 register sanity check,
Nicholas Piggin <=
- [PULL 05/67] target/ppc: Fix mtDPDES targeting SMT siblings, Nicholas Piggin, 2024/11/03
- [PULL 06/67] target/ppc: PMIs are level triggered, Nicholas Piggin, 2024/11/03
- [PULL 07/67] target/ppc: Fix doorbell delivery to threads in powersave, Nicholas Piggin, 2024/11/03
- [PULL 08/67] target/ppc: Fix HFSCR facility checks, Nicholas Piggin, 2024/11/03
- [PULL 09/67] target/ppc: Fix VRMA to not check virtual page class key protection, Nicholas Piggin, 2024/11/03
- [PULL 10/67] ppc/pnv: ADU fix possible buffer overrun with invalid size, Nicholas Piggin, 2024/11/03
- [PULL 11/67] MAINTAINERS: Cover PowerPC SPI model in PowerNV section, Nicholas Piggin, 2024/11/03
- [PULL 12/67] hw/ssi/pnv_spi: Match _xfer_buffer_free() with _xfer_buffer_new(), Nicholas Piggin, 2024/11/03