qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH 2/3] hw/ppc/e500plat: Fix modifying QOM class internal state


From: Richard Henderson
Subject: Re: [PATCH 2/3] hw/ppc/e500plat: Fix modifying QOM class internal state from instance
Date: Tue, 23 May 2023 11:29:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 5/22/23 23:44, Philippe Mathieu-Daudé wrote:
QOM object instance should not modify its class state (because
all other objects instanciated from this class get affected).

Instead of modifying the PPCE500MachineClass 'mpic_version' field
in the instance machine_init() handler, set it in the machine
class init handler (e500plat_machine_class_init).

Inspired-by: Bernhard Beschow<shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
---
  hw/ppc/e500plat.c | 25 +++++++++++--------------
  1 file changed, 11 insertions(+), 14 deletions(-)

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

r~



reply via email to

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