On Thu, 4 Apr 2019 at 17:05, Igor Mammedov <imamm...@redhat.com> wrote: > On Tue, 2 Apr 2019 23:23:42 +0700 > Peter Maydell <peter.mayd...@linaro.org> wrote: > > One wrinkle to watch out for is code paths that are used in the > > linux-user emulator, where there is no machine at all... For instance > > cpu_common_realizefn() handles this case by explicitly checking > > whether the thing it gets back from qdev_get_machine() is a > > TYPE_MACHINE or not. > this one can be solved by adding 'ignore_memory_transaction_failures' > property to the CPU class where it applies (I'm not sure why it's > in generic cpu code instead of ARM only) and then setting compat > property in affected boards code.
It is not arm-specific, it just happens that all the current users are arm boards. It is a generic thing that can apply to any CPU for any target architecture, but only if the board requests it. The current code seemed a reasonable way to implement this that didn't involve having to write too much invasive plumbing code to get the behaviour to apply in the cases where it needed to be applied, but if there's a better way to do this I'm happy to review/test patches. thanks -- PMM