[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: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] Make pointer to fw_cfg device global. |
Date: |
Wed, 23 May 2012 15:54:05 +0100 |
On 23 May 2012 15:41, Andreas Färber <address@hidden> wrote:
> Am 23.05.2012 14:44, schrieb Peter Maydell:
>> 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...
>
> While I concur with the design sentiment of avoiding globals where
> possible, I can understand having multiple CPU types in one machine, but
> multiple machines in one emulation? Do you have a specific example that
> cannot easily be modeled as multiple socket-connected executables?
I mostly meant the "two different CPUs" case, but there's not
a great deal of difference between them. You're just instantiating
a set of QOM objects and wiring them up appropriately in either
case: if you can support different CPUs then you can trivially
support multiple machines, because that's just a special case of
two separate CPUs which happen to not share any memory.
We don't have any support for running QOM interface links over
sockets anyway, so that seems like a red herring.
-- PMM
- Re: [Qemu-devel] [PATCH 2/2] Add PIIX4 properties to control PM system states., (continued)
Re: [Qemu-devel] [PATCH 1/2] Make pointer to fw_cfg device global., Gleb Natapov, 2012/05/23
Re: [Qemu-devel] [PATCH 1/2] Make pointer to fw_cfg device global., Peter Maydell, 2012/05/23