[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 20/21] hw/mips: Add some logging for bad register offset c
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v6 20/21] hw/mips: Add some logging for bad register offset cases |
Date: |
Wed, 27 May 2020 09:52:00 +0200 |
Hi Aleksandar,
On Tue, May 26, 2020 at 12:46 PM Aleksandar Markovic
<address@hidden> wrote:
> уто, 26. мај 2020. у 12:38 Philippe Mathieu-Daudé <address@hidden> је
> написао/ла:
> > On 5/26/20 12:05 PM, Aleksandar Markovic wrote:
> > > уто, 26. мај 2020. у 09:42 Philippe Mathieu-Daudé <address@hidden> је
> > > написао/ла:
> > >>
> > >> 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é <address@hidden>
> > >>> Tested-by: Philippe Mathieu-Daudé <address@hidden>
> > >>
> > >> 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).
> >
>
> Philippe, I think you created a lot of problems here without any real need.
Did I?
>
> We should sync between us rather than sent "surprise" "pull requests".
This I clearly understood. I doubt this will ever happen again.
>
> I am not happy with coordination of our common MIPS work.
I am also unhappy with my MIPS contributions.
Regards,
Phil.
>
> > >
> > > Thanks,
> > > Aleksandar
> > >
> > >
> > >> Thanks,
> > >>
> > >> Phil.
> > >>
> > >>> Signed-off-by: Aleksandar Markovic <address@hidden>
> > >>> ---
> > >>> 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;
> > >>> }
> > >>> }
> > >>>
> > >
- [PATCH v6 14/21] target/mips: fpu: Remove now unused FLOAT_RINT macro, (continued)
- [PATCH v6 14/21] target/mips: fpu: Remove now unused FLOAT_RINT macro, Aleksandar Markovic, 2020/05/18
- [PATCH v6 15/21] target/mips: fpu: Name better paired-single variables, Aleksandar Markovic, 2020/05/18
- [PATCH v6 16/21] target/mips: fpu: Refactor conversion from ieee to mips exception flags, Aleksandar Markovic, 2020/05/18
- [PATCH v6 18/21] target/mips: msa: Split helpers for MADDV.<B|H|W|D>, Aleksandar Markovic, 2020/05/18
- [PATCH v6 19/21] target/mips: msa: Split helpers for MSUBV.<B|H|W|D>, Aleksandar Markovic, 2020/05/18
- [PATCH v6 20/21] hw/mips: Add some logging for bad register offset cases, Aleksandar Markovic, 2020/05/18
[PATCH v6 21/21] hw/mips: Rename malta/mipssim/r4k/jazz files in hw/mips, Aleksandar Markovic, 2020/05/18
[PATCH v6 17/21] MAINTAINERS: Change Aleksandar Rikalo's email address, Aleksandar Markovic, 2020/05/18