]> git.proxmox.com Git - mirror_qemu.git/commit
ppc/pnv: use a do-while() loop in pnv_phb4_translate_tve()
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Fri, 28 Jan 2022 12:15:02 +0000 (13:15 +0100)
committerCédric Le Goater <clg@kaod.org>
Fri, 28 Jan 2022 12:15:02 +0000 (13:15 +0100)
commit799c179ed844b01542e729405c0bf5ef4cd294dc
tree159e58ca1cca6eef2f384d7c65e835e58860c142
parent83d2bea68a778b98ecbf9472be6f1ed8031719ac
ppc/pnv: use a do-while() loop in pnv_phb4_translate_tve()

pnv_phb4_translate_tve() is quite similar to pnv_phb3_translate_tve(),
and that includes the fact that 'taddr' can be considered uninitialized
when throwing the "TCE access fault" error because, in theory, the loop
that sets 'taddr' can be skippable due to 'lev' being an signed int.

No one complained about this specific case yet, but since we took the
time to handle the same situtation in pnv_phb3_translate_tve(), let's
replicate it here as well.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220127122234.842145-3-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/pci-host/pnv_phb4.c