qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] hw/intc/arm_gicv3: Replace mis-used MEMTX_* constants by


From: Richard Henderson
Subject: Re: [PATCH 2/2] hw/intc/arm_gicv3: Replace mis-used MEMTX_* constants by booleans
Date: Tue, 31 Aug 2021 09:56:45 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 8/26/21 11:07 AM, Philippe Mathieu-Daudé wrote:
Quoting Peter Maydell:

   These MEMTX_* aren't from the memory transaction API functions;
   they're just being used by gicd_readl() and friends as a way to
   indicate a success/failure so that the actual MemoryRegionOps
   read/write fns like gicv3_dist_read() can log a guest error.
   Arguably this is a bit of a misuse of the MEMTX_* constants and
   perhaps we should have gicd_readl etc return a bool instead.

Follow his suggestion and replace the MEMTX_* constants by
boolean values, simplifying a bit the gicv3_dist_read() /
gicv3_dist_write() handlers.

Suggested-by: Peter Maydell<peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé<philmd@redhat.com>
---
  hw/intc/arm_gicv3_dist.c | 201 +++++++++++++++++++++------------------
  1 file changed, 106 insertions(+), 95 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]