[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v3 06/19] Implement "-dimm" command line opt
From: |
Vasilis Liaskovitis |
Subject: |
Re: [Qemu-devel] [RFC PATCH v3 06/19] Implement "-dimm" command line option |
Date: |
Mon, 24 Sep 2012 12:42:43 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Sep 22, 2012 at 01:46:57PM +0000, Blue Swirl wrote:
> On Fri, Sep 21, 2012 at 11:17 AM, Vasilis Liaskovitis
> <address@hidden> wrote:
> > Example:
> > "-dimm id=dimm0,size=512M,node=0,populated=off"
>
> There should not be a need to introduce a new top level option,
> instead you should just use -device, like
> -device dimm,base=0,id=dimm0,size=512M,node=0,populated=off
>
> That would also specify the start address.
What is "base"? the start address? I think the start address should be
calculated by the
chipset / board, not by the user.
The "-dimm" option is supposed to specify the dimm/memory layout, and not create
any devices.
If we don't want this new option, I have a question:
A "-device/device_add" means we create a new qdev device at startup or as a
hotplug operation respectively. So, the semantics of
"-device dimm,id=dimm0,size=512M,node=0,populated=on" are clear to me.
What does "-device dimm,populated=off" mean from a qdev perspective? There are 2
alternatives:
- The device is created on the dimmbus, but is not used/populated yet. Than the
activation/acpi-hotplug of the dimm may require a separate command (we used to
have
"dimm_add" in versions < 3). "device_add" handling always hotplugs a new qdev
device, so this wouldn't fit this usecase, because the device already exists. In
this case, the actual "acpi hotplug" operation is decoupled from qdev device
creation.
- The dimmdevice is not created when "-device dimm,populated=off" (this would
require some ugly checking in normal -device argument handling). Only the dimm
layout is saved. The hotplug is triggered from a normal device_add later. So in
this case, the "acpi hotplug" happens at the same time as the qdev hotplug.
Do you see a simpler alternative without introducing a new option?
Using the "-dimm" option follows the second semantic and avoids changing the
"-device"
semantics. Dimm layout description is decoupled from dimmdevice creation, and
qdev
hotplug coincides with acpi hotplug.
thanks,
- Vasilis
- [Qemu-devel] [RFC PATCH v3 00/19] ACPI memory hotplug, Vasilis Liaskovitis, 2012/09/21
- [Qemu-devel] [RFC PATCH v3 01/19][SeaBIOS] Add ACPI_EXTRACT_DEVICE* macros, Vasilis Liaskovitis, 2012/09/21
- [Qemu-devel] [RFC PATCH v3 03/19][SeaBIOS] acpi-dsdt: Implement functions for memory hotplug, Vasilis Liaskovitis, 2012/09/21
- [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction, Vasilis Liaskovitis, 2012/09/21
- [Qemu-devel] [RFC PATCH v3 04/19][SeaBIOS] acpi: generate hotplug memory devices, Vasilis Liaskovitis, 2012/09/21
- [Qemu-devel] [RFC PATCH v3 07/19] acpi_piix4: Implement memory device hotplug registers, Vasilis Liaskovitis, 2012/09/21
- [Qemu-devel] [RFC PATCH v3 08/19] pc: calculate dimm physical addresses and adjust memory map, Vasilis Liaskovitis, 2012/09/21