Re: [Qemu-devel] 答复: [PATCH] intc: arm_gicv3: limit GICR ipriority index

2017-09-05 Thread P J P
+-- On Tue, 5 Sep 2017, Peter Maydell wrote --+ | The code cannot be reached with a non-aligned value, | because we register these functions via the gic_ops[] | MemoryRegionops in hw/intc/arm_gicv3.c, and since we | do not specify .valid.unaligned=true there, the memory.c | code will throw out atte

Re: [Qemu-devel] 答复: [PATCH] intc: arm_gicv3: limit GICR ipriority index

2017-09-05 Thread Eric Blake
On 09/05/2017 07:35 AM, Peter Maydell wrote: > On 5 September 2017 at 13:30, niuguoxiang wrote: >> I think only assert is not enough, because assert() depends on NDEBUG >> preprocessing > > Incidentally, QEMU can never be compiled with NDEBUG not > set -- we will #error in the compilation if it

[Qemu-devel] 答复: [PATCH] intc: arm_gicv3: limit GICR ipriority index

2017-09-05 Thread niuguoxiang
I think only assert is not enough, because assert() depends on NDEBUG preprocessing, please check : /usr/include/assert.h 37#if defined __cplusplus && __GNUC_PREREQ (2,95) 38# define __ASSERT_VOID_CAST static_cast 39#else 40# define __ASSERT_VOID_CAST (void) 41#endif 48#ifdef NDEBUG

Re: [Qemu-devel] 答复: [PATCH] intc: arm_gicv3: limit GICR ipriority index

2017-09-05 Thread Peter Maydell
On 5 September 2017 at 13:30, niuguoxiang wrote: > I think only assert is not enough, because assert() depends on NDEBUG > preprocessing The code cannot be reached with a non-aligned value, because we register these functions via the gic_ops[] MemoryRegionops in hw/intc/arm_gicv3.c, and since we