On 5/26/20 12:05 PM, Aleksandar Markovic wrote: > уто, 26. мај 2020. у 09:42 Philippe Mathieu-Daudé <f4...@amsat.org> је > написао/ла: >> >> On 5/18/20 10:09 PM, Aleksandar Markovic wrote: >>> Log the cases where a guest attempts read or write using bad >>> register offset. >>> >>> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> >>> Tested-by: Philippe Mathieu-Daudé <f4...@amsat.org> >> >> Not well tested apparently, because it doesn't build with GCC 5.4.0 >> (Ubuntu): >> >> hw/mips/malta.c: In function ‘malta_fpga_read’: >> hw/mips/malta.c:430:85: error: format ‘%x’ expects argument of type >> ‘unsigned int’, but argument 2 has type ‘hwaddr {aka long unsigned int}’ >> [-Werror=format=] >> hw/mips/malta.c: In function ‘malta_fpga_write’: >> hw/mips/malta.c:517:85: error: format ‘%x’ expects argument of type >> ‘unsigned int’, but argument 2 has type ‘hwaddr {aka long unsigned int}’ >> [-Werror=format=] >> cc1: all warnings being treated as errors >> >> I amended this snippet ...: >> >> -- >8 -- >> @@ -428,8 +428,8 @@ static uint64_t malta_fpga_read(void *opaque, hwaddr >> addr, >> >> default: >> qemu_log_mask(LOG_GUEST_ERROR, >> - "malta_fpga_read: Bad register offset 0x" >> - TARGET_FMT_lx "\n", addr); >> + "malta_fpga_read: Bad register addr >> 0x%"HWADDR_PRIX"\n", >> + addr); >> break; >> } >> return val; >> @@ -515,8 +515,8 @@ static void malta_fpga_write(void *opaque, hwaddr addr, >> >> default: >> qemu_log_mask(LOG_GUEST_ERROR, >> - "malta_fpga_write: Bad register offset 0x" >> - TARGET_FMT_lx "\n", addr); >> + "malta_fpga_write: Bad register addr >> 0x%"HWADDR_PRIX"\n", >> + addr); >> break; >> } >> } >> --- >> >> ... and queued to mips-next, >> > > Hi, Philippe, > > Many thanks for correcting my mistake in this patch! > May I ask you to refer to your queue as hw/mips-next, rather than > mips-next, for the sake of clarity?
Tags with '/' are hard to manage, let's use mips-hw-next, mips-target-next for your pull requests and mips-kvm-next for Huacai's ones. > And, when do you plan to send the pull request? Waiting for Gerd's audio-next one to get merged because he took my "mips_fulong2e: Remove unused 'audio/audio.h' include" patch and I don't want Peter to have to manually resolve conflicts (there shouldn't be, but I don't want to risk bother him with a "automatic 3-way merge" warning). > > Thanks, > Aleksandar > > >> Thanks, >> >> Phil. >> >>> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.de...@gmail.com> >>> --- >>> hw/mips/mips_malta.c | 14 ++++++-------- >>> 1 file changed, 6 insertions(+), 8 deletions(-) >>> >>> diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c >>> index e4c4de1b4e..88869b828e 100644 >>> --- a/hw/mips/mips_malta.c >>> +++ b/hw/mips/mips_malta.c >>> @@ -427,10 +427,9 @@ static uint64_t malta_fpga_read(void *opaque, hwaddr >>> addr, >>> break; >>> >>> default: >>> -#if 0 >>> - printf("malta_fpga_read: Bad register offset 0x" TARGET_FMT_lx >>> "\n", >>> - addr); >>> -#endif >>> + qemu_log_mask(LOG_GUEST_ERROR, >>> + "malta_fpga_read: Bad register offset 0x" >>> + TARGET_FMT_lx "\n", addr); >>> break; >>> } >>> return val; >>> @@ -515,10 +514,9 @@ static void malta_fpga_write(void *opaque, hwaddr addr, >>> break; >>> >>> default: >>> -#if 0 >>> - printf("malta_fpga_write: Bad register offset 0x" TARGET_FMT_lx >>> "\n", >>> - addr); >>> -#endif >>> + qemu_log_mask(LOG_GUEST_ERROR, >>> + "malta_fpga_write: Bad register offset 0x" >>> + TARGET_FMT_lx "\n", addr); >>> break; >>> } >>> } >>> >