qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/3] hw/intc/arm_gicv3: Move checking of redist-region-count


From: Richard Henderson
Subject: Re: [PATCH 1/3] hw/intc/arm_gicv3: Move checking of redist-region-count to arm_gicv3_common_realize
Date: Fri, 1 Oct 2021 12:24:03 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 9/30/21 11:08 AM, Peter Maydell wrote:
The GICv3 devices have an array property redist-region-count.
Currently we check this for errors (bad values) in
gicv3_init_irqs_and_mmio(), just before we use it.  Move this error
checking to the arm_gicv3_common_realize() function, where we
sanity-check all of the other base-class properties. (This will
always be before gicv3_init_irqs_and_mmio() is called, because
that function is called in the subclass realize methods, after
they have called the parent-class realize.)

The motivation for this refactor is:
  * we would like to use the redist_region_count[] values in
    arm_gicv3_common_realize() in a subsequent patch, so we need
    to have already done the sanity-checking first
  * this removes the only use of the Error** argument to
    gicv3_init_irqs_and_mmio(), so we can remove some error-handling
    boilerplate

Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
---

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

r~



reply via email to

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