[Top][All Lists]

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

Re: [Qemu-ppc] [PATCH v3 2/3] machine: make MemoryHotplugState accessibl

From: David Hildenbrand
Subject: Re: [Qemu-ppc] [PATCH v3 2/3] machine: make MemoryHotplugState accessible via the machine
Date: Mon, 23 Apr 2018 13:11:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 23.04.2018 12:44, David Gibson wrote:
> On Mon, Apr 23, 2018 at 11:36:48AM +0200, David Hildenbrand wrote:
>> On 23.04.2018 05:28, David Gibson wrote:
>>> On Fri, Apr 20, 2018 at 02:34:55PM +0200, David Hildenbrand wrote:
>>>> Let's allow to query the MemoryHotplugState from the machine.
>>>> This allows us to generically detect if a certain machine has support
>>>> for memory devices, and to generically manage it (find free address
>>>> range, plug/unplug a memory region).
>>>> Signed-off-by: David Hildenbrand <address@hidden>
>>> So, we're creating a hook where it seems very likely that the only
>>> implementationss will be simply to retrieve the right field from the
>>> machine specific structure.
>>> So.. should we instead just move the hotplug_memory structure to the
>>> based MachineState type?
>> It allows us in patch nr. 3 to report different error messages.
>> "Not supported" vs. "Not enabled (maxmem)".
>> We could also handle that via a simple boolean flag inside of the
>> struct. What do you think?
> A third option would be to make it a pointer, rather than directly
> embedded in the MachineState.  That would also avoid the extra
> allocation for machines that don't use it.

That sounds like a good alternative, will look into it! Thanks!



David / dhildenb

reply via email to

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