[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 2/5] hw/intc/arm_gicv3: Check for !MEMTX_OK instead of
From: |
Peter Maydell |
Subject: |
Re: [RFC PATCH v2 2/5] hw/intc/arm_gicv3: Check for !MEMTX_OK instead of MEMTX_ERROR |
Date: |
Mon, 23 Aug 2021 20:07:51 +0100 |
On Mon, 23 Aug 2021 at 17:42, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> We are going to introduce more MemTxResult bits, so it is
> safer to check for !MEMTX_OK rather than MEMTX_ERROR.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
but note that 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.
thanks
-- PMM
- [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument, Philippe Mathieu-Daudé, 2021/08/23
- [RFC PATCH v2 1/5] softmmu/physmem: Simplify flatview_write and address_space_access_valid, Philippe Mathieu-Daudé, 2021/08/23
- [RFC PATCH v2 2/5] hw/intc/arm_gicv3: Check for !MEMTX_OK instead of MEMTX_ERROR, Philippe Mathieu-Daudé, 2021/08/23
- [RFC PATCH v2 3/5] exec/memattrs: Introduce MemTxAttrs::bus_perm field, Philippe Mathieu-Daudé, 2021/08/23
- [RFC PATCH v2 4/5] softmmu/physmem: Introduce flatview_access_allowed() to check bus perms, Philippe Mathieu-Daudé, 2021/08/23
- [RFC PATCH v2 5/5] softmmu/physmem: Have flaview API check MemTxAttrs::bus_perm field, Philippe Mathieu-Daudé, 2021/08/23