target/ppc: Fix radix logging
PATCH 1/1 target/ppc: Fix radix logging
ppc_radix64_partition_scoped_xlate() logs the host page protection bits variable but it is uninitialized since it is set later in ppc_radix64_check_prot(). Remove the
--- target/ppc/mmu-radix64.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
target/ppc/mmu-radix64.c +2 -6
@@ -327,13 +327,9 @@ static int ppc_radix64_partition_scoped_xlate(PowerPCCPU *cpu,uint64_t pte;qemu_log_mask (CPU_LOG_MMU ,"%s for %s @0x%" VADDR_PRIx -" mmu_idx %u (prot %c%c%c) 0x%" HWADDR_PRIx"\n" , +" mmu_idx %u 0x%" HWADDR_PRIx"\n" , __func__,access_str (access_type), - eaddr, mmu_idx, - *h_prot &PAGE_READ ?'r' :'-' , - *h_prot &PAGE_WRITE ?'w' :'-' , - *h_prot &PAGE_EXEC ?'x' :'-' , - g_raddr); + eaddr, mmu_idx, g_raddr); *h_page_size =PRTBE_R_GET_RTS (pate.dw0);/* No valid pte or access denied due to protection */
Signature · 1 line
2.34.1
Quoted 4 lines · On Thu, 3 Feb 2022 15:21:45 +0100 Cédric Le Goater <[email protected]> wrote:
ppc_radix64_partition_scoped_xlate()logs the host page protection bits variable but it is uninitialized since it is set later inppc_radix64_check_prot(). Remove the
Remove the what ?
Quoted 3 lines
Fixes Coverity CID 1468942Signed-off-by Cédric Le Goater <[email protected]>---
LGTM apart from that.
Quoted 23 lines
target/ppc/mmu-radix64.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)target/ppc/mmu-radix64.c +2
-6@@ -327,13 +327,9 @@ static int ppc_radix64_partition_scoped_xlate(PowerPCCPU *cpu,uint64_t pte;qemu_log_mask (CPU_LOG_MMU ,"%s for %s @0x%" VADDR_PRIx -" mmu_idx %u (prot %c%c%c) 0x%" HWADDR_PRIx"\n" , +" mmu_idx %u 0x%" HWADDR_PRIx"\n" , __func__,access_str (access_type), - eaddr, mmu_idx, - *h_prot &PAGE_READ ?'r' :'-' , - *h_prot &PAGE_WRITE ?'w' :'-' , - *h_prot &PAGE_EXEC ?'x' :'-' , - g_raddr); + eaddr, mmu_idx, g_raddr); *h_page_size =PRTBE_R_GET_RTS (pate.dw0);/* No valid pte or access denied due to protection */
Quoted 9 lines · Greg Kurz
Quoted 4 lines · On Thu, 3 Feb 2022 15:21:45 +0100 Cédric Le Goater <[email protected]> wrote:
ppc_radix64_partition_scoped_xlate()logs the host page protection bits variable but it is uninitialized since it is set later inppc_radix64_check_prot(). Remove theRemove the what ?
Arg ...
Changed to :
ppc_radix64_partition_scoped_xlate() logs the host page protection bits variable but it is uninitialized. The value is set later on in ppc_radix64_check_prot(). Remove the output.
Thanks,
C.
Quoted 33 lines
Quoted 4 lines
Fixes Coverity CID 1468942Signed-off-by Cédric Le Goater <[email protected]>---
LGTM apart from that.
Reviewed-by Greg Kurz <[email protected]>Quoted 23 lines
target/ppc/mmu-radix64.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)target/ppc/mmu-radix64.c +2
-6@@ -327,13 +327,9 @@ static int ppc_radix64_partition_scoped_xlate(PowerPCCPU *cpu,uint64_t pte;qemu_log_mask (CPU_LOG_MMU ,"%s for %s @0x%" VADDR_PRIx -" mmu_idx %u (prot %c%c%c) 0x%" HWADDR_PRIx"\n" , +" mmu_idx %u 0x%" HWADDR_PRIx"\n" , __func__,access_str (access_type), - eaddr, mmu_idx, - *h_prot &PAGE_READ ?'r' :'-' , - *h_prot &PAGE_WRITE ?'w' :'-' , - *h_prot &PAGE_EXEC ?'x' :'-' , - g_raddr); + eaddr, mmu_idx, g_raddr); *h_page_size =PRTBE_R_GET_RTS (pate.dw0);/* No valid pte or access denied due to protection */
Cédric Le Goater
AppliedQuoted 6 lines · Cédric Le Goater
ppc_radix64_partition_scoped_xlate()logs the host page protection bits variable but it is uninitialized since it is set later inppc_radix64_check_prot(). Remove theFixes Coverity CID 1468942Signed-off-by Cédric Le Goater <[email protected]>
Applied to ppc-7.0 (with a commit log update)
Thanks,
C.