[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 1/2] Make pointer to fw_cfg device global.

From: Gleb Natapov
Subject: Re: [Qemu-devel] [PATCH 1/2] Make pointer to fw_cfg device global.
Date: Wed, 23 May 2012 15:47:57 +0300

On Wed, May 23, 2012 at 01:44:45PM +0100, Peter Maydell wrote:
> On 20 May 2012 10:02, Gleb Natapov <address@hidden> wrote:
> > There can be only one fw_cfg device, so saving global reference to it
> > removes the need to pass its pointer around.
> This seems like a backwards step to me: one of the things that prevents
> us supporting "two separate machines in one emulation" is that we have
> various things that assume there's only one instance of themselves and
> use globals. I don't think we should be adding any more...
So you do it usual way. Have "struct Machine" and put pointer to fw_cfg
there. Current code already saves global pointer to fw_cfg, the patch just
makes it official.


reply via email to

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