[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [RFC v3 07/15] hw/arm/virt: Add memory hotplug framework
From: |
David Hildenbrand |
Subject: |
Re: [Qemu-arm] [RFC v3 07/15] hw/arm/virt: Add memory hotplug framework |
Date: |
Wed, 4 Jul 2018 13:47:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 03.07.2018 21:34, Auger Eric wrote:
> Hi David,
>
> On 07/03/2018 08:44 PM, David Hildenbrand wrote:
>> On 03.07.2018 09:19, Eric Auger wrote:
>>> From: Shameer Kolothum <address@hidden>
>>>
>>> This patch adds the the memory hot-plug/hot-unplug infrastructure
>>> in machvirt.
>>>
>>> Signed-off-by: Eric Auger <address@hidden>
>>> Signed-off-by: Shameer Kolothum <address@hidden>
>>> Signed-off-by: Kwangwoo Lee <address@hidden>
>>>
>>> ---
>>>
>>> v1 -> v2:
>>> - s/virt_dimm_plug|unplug/virt_memory_plug|unplug
>>> - s/pc_dimm_memory_plug/pc_dimm_plug
>>> - reworded title and commit message
>>> - added pre_plug cb
>>> - don't handle get_memory_region failure anymore
>>> ---
>>> default-configs/arm-softmmu.mak | 2 ++
>>> hw/arm/virt.c | 68
>>> ++++++++++++++++++++++++++++++++++++++++-
>>> 2 files changed, 69 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/default-configs/arm-softmmu.mak
>>> b/default-configs/arm-softmmu.mak
>>> index 834d45c..28fe8f3 100644
>>> --- a/default-configs/arm-softmmu.mak
>>> +++ b/default-configs/arm-softmmu.mak
>>> @@ -152,3 +152,5 @@ CONFIG_PCI_DESIGNWARE=y
>>> CONFIG_STRONGARM=y
>>> CONFIG_HIGHBANK=y
>>> CONFIG_MUSICPAL=y
>>> +CONFIG_MEM_HOTPLUG=y
>>> +
>>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>>> index 6fefb78..7190962 100644
>>> --- a/hw/arm/virt.c
>>> +++ b/hw/arm/virt.c
>>> @@ -60,6 +60,8 @@
>>> #include "standard-headers/linux/input.h"
>>> #include "hw/arm/smmuv3.h"
>>> #include "hw/acpi/acpi.h"
>>> +#include "hw/mem/pc-dimm.h"
>>> +#include "hw/mem/nvdimm.h"
>>>
>>> #define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \
>>> static void virt_##major##_##minor##_class_init(ObjectClass *oc, \
>>> @@ -1785,6 +1787,53 @@ static const CPUArchIdList
>>> *virt_possible_cpu_arch_ids(MachineState *ms)
>>> return ms->possible_cpus;
>>> }
>>>
>>> +static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState
>>> *dev,
>>> + Error **errp)
>>> +{
>>> + const bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
>>> +
>>> + if (is_nvdimm) {
>>> + error_setg(errp, "nvdimm is not yet supported");
>>> + return;
>>> + }
>>
>> You mention that actual hotplug is not supported, only coldplug.
>> Wouldn't this be the right place to check for that? (only skimmed over
>> your patches, how do you handle that?)
> At the moment I don't check it. I did not look yet at ways to
> discriminate both cases.
Looking at dev->hotplugged should be enough I guess.
>
> Thanks
>
> Eric
>>
>>
--
Thanks,
David / dhildenb
- Re: [Qemu-arm] [Qemu-devel] [RFC v3 06/15] hw/arm/virt: Allocate device_memory, (continued)
- [Qemu-arm] [RFC v3 11/15] hw/arm/virt-acpi-build: Add PC-DIMM in SRAT, Eric Auger, 2018/07/03
- [Qemu-arm] [RFC v3 02/15] hw/boards: Add a MachineState parameter to kvm_type callback, Eric Auger, 2018/07/03
- [Qemu-arm] [RFC v3 03/15] kvm: add kvm_arm_get_max_vm_phys_shift, Eric Auger, 2018/07/03
- [Qemu-arm] [RFC v3 04/15] hw/arm/virt: support kvm_type property, Eric Auger, 2018/07/03
- [Qemu-arm] [RFC v3 09/15] hw/arm/boot: Expose the PC-DIMM nodes in the DT, Eric Auger, 2018/07/03
- [Qemu-arm] [RFC v3 15/15] hw/arm/virt: Add nvdimm and nvdimm-persistence options, Eric Auger, 2018/07/03
- [Qemu-arm] [RFC v3 01/15] linux-headers: header update for KVM/ARM KVM_ARM_GET_MAX_VM_PHYS_SHIFT, Eric Auger, 2018/07/03
- [Qemu-arm] [RFC v3 10/15] acpi: move build_srat_hotpluggable_memory to generic ACPI source, Eric Auger, 2018/07/03
- [Qemu-arm] [RFC v3 12/15] nvdimm: use configurable ACPI IO base and size, Eric Auger, 2018/07/03
- [Qemu-arm] [RFC v3 13/15] hw/arm/virt: Add nvdimm hot-plug infrastructure, Eric Auger, 2018/07/03