qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH v2] vl.c: make current_machine as


From: Peter Maydell
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH v2] vl.c: make current_machine as non-global variable
Date: Wed, 3 Apr 2019 07:03:47 +0700

On Wed, 3 Apr 2019 at 02:16, Eduardo Habkost <address@hidden> wrote:
>
> On Tue, Apr 02, 2019 at 11:23:42PM +0700, Peter Maydell 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.
>
> Is there a real use case for calling qdev_get_machine() in user
> mode?

In this case it's "I'm in a function which is in obj-common (so shared
between user-only and system-emulation) and I need to do something
if we're in system emulation mode". It could probably be restructured
somehow.

thanks
-- PMM



reply via email to

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