qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] vl.c: make current_machine as non-global var


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2] vl.c: make current_machine as non-global variable
Date: Thu, 4 Apr 2019 17:41:54 +0700

On Thu, 4 Apr 2019 at 17:05, Igor Mammedov <address@hidden> wrote:
> On Tue, 2 Apr 2019 23:23:42 +0700
> Peter Maydell <address@hidden> 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



reply via email to

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