qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH 1/3] hw/mips/jazz: Fix modifying QOM class internal state fro


From: Richard Henderson
Subject: Re: [PATCH 1/3] hw/mips/jazz: Fix modifying QOM class internal state from instance
Date: Tue, 23 May 2023 11:26:30 -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 MIPSCPUClass 'no_data_aborts' field
in the instance machine_init() handler, set it in the machine
class_init handler. Since 2 machines require this, share the
common code in a new machine_class_ignore_data_abort() helper.

Inspired-by: Bernhard Beschow<shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
---
  hw/mips/jazz.c | 41 +++++++++++++++++++++++------------------
  1 file changed, 23 insertions(+), 18 deletions(-)

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

r~



reply via email to

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